pub struct BackendDescriptor { /* private fields */ }Expand description
RAII wrapper around a cudnnBackendDescriptor_t that destroys the
descriptor on drop.
Implementations§
Source§impl BackendDescriptor
impl BackendDescriptor
Sourcepub fn create(kind: cudnnBackendDescriptorType_t) -> Result<Self, GpuError>
pub fn create(kind: cudnnBackendDescriptorType_t) -> Result<Self, GpuError>
cudnnBackendCreateDescriptor.
Sourcepub fn is_finalized(&self) -> bool
pub fn is_finalized(&self) -> bool
True iff finalize() has succeeded.
Sourcepub unsafe fn set_attribute_raw(
&mut self,
name: cudnnBackendAttributeName_t,
attr_type: cudnnBackendAttributeType_t,
count: i64,
data: *const c_void,
) -> Result<(), GpuError>
pub unsafe fn set_attribute_raw( &mut self, name: cudnnBackendAttributeName_t, attr_type: cudnnBackendAttributeType_t, count: i64, data: *const c_void, ) -> Result<(), GpuError>
Generic cudnnBackendSetAttribute — caller supplies the
element type and a *const c_void pointer to a contiguous
array of count elements.
§Safety
data must point to count valid elements of the type
expected by attr_type. The descriptor must outlive the call.
Sourcepub fn set_i64(
&mut self,
name: cudnnBackendAttributeName_t,
value: i64,
) -> Result<(), GpuError>
pub fn set_i64( &mut self, name: cudnnBackendAttributeName_t, value: i64, ) -> Result<(), GpuError>
Set a single i64 attribute.
Sourcepub fn set_i64_array(
&mut self,
name: cudnnBackendAttributeName_t,
values: &[i64],
) -> Result<(), GpuError>
pub fn set_i64_array( &mut self, name: cudnnBackendAttributeName_t, values: &[i64], ) -> Result<(), GpuError>
Set an array of i64 attributes.
Sourcepub fn set_f32(
&mut self,
name: cudnnBackendAttributeName_t,
value: f32,
) -> Result<(), GpuError>
pub fn set_f32( &mut self, name: cudnnBackendAttributeName_t, value: f32, ) -> Result<(), GpuError>
Set a single f32 attribute (e.g. an alpha scaling parameter).
Sourcepub fn set_f64(
&mut self,
name: cudnnBackendAttributeName_t,
value: f64,
) -> Result<(), GpuError>
pub fn set_f64( &mut self, name: cudnnBackendAttributeName_t, value: f64, ) -> Result<(), GpuError>
Set a single f64 attribute.
Sourcepub fn set_dev_ptr(
&mut self,
name: cudnnBackendAttributeName_t,
ptr: *mut c_void,
) -> Result<(), GpuError>
pub fn set_dev_ptr( &mut self, name: cudnnBackendAttributeName_t, ptr: *mut c_void, ) -> Result<(), GpuError>
Set a single device-pointer attribute.
Sourcepub fn set_descriptor(
&mut self,
name: cudnnBackendAttributeName_t,
sub: &BackendDescriptor,
) -> Result<(), GpuError>
pub fn set_descriptor( &mut self, name: cudnnBackendAttributeName_t, sub: &BackendDescriptor, ) -> Result<(), GpuError>
Set a single sub-descriptor reference.
Sourcepub fn set_descriptors(
&mut self,
name: cudnnBackendAttributeName_t,
subs: &[&BackendDescriptor],
) -> Result<(), GpuError>
pub fn set_descriptors( &mut self, name: cudnnBackendAttributeName_t, subs: &[&BackendDescriptor], ) -> Result<(), GpuError>
Set an array of sub-descriptor references.
Sourcepub fn set_data_type(
&mut self,
name: cudnnBackendAttributeName_t,
dt: cudnnDataType_t,
) -> Result<(), GpuError>
pub fn set_data_type( &mut self, name: cudnnBackendAttributeName_t, dt: cudnnDataType_t, ) -> Result<(), GpuError>
Set a cudnnDataType_t attribute.
Trait Implementations§
Source§impl Debug for BackendDescriptor
impl Debug for BackendDescriptor
Source§impl Drop for BackendDescriptor
impl Drop for BackendDescriptor
impl Send for BackendDescriptor
Auto Trait Implementations§
impl Freeze for BackendDescriptor
impl RefUnwindSafe for BackendDescriptor
impl !Sync for BackendDescriptor
impl Unpin for BackendDescriptor
impl UnsafeUnpin for BackendDescriptor
impl UnwindSafe for BackendDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more