Struct kn_cuda_sys::wrapper::descriptor::TensorDescriptor
source · pub struct TensorDescriptor { /* private fields */ }Implementations§
source§impl TensorDescriptor
impl TensorDescriptor
pub fn new_f32(shape: Vec<i32>, strides: Vec<i32>) -> Self
pub fn new(shape: Vec<i32>, strides: Vec<i32>, dtype: cudnnDataType_t) -> Self
pub fn rank(&self) -> usize
pub fn shape(&self) -> &[i32]
pub fn strides(&self) -> &[i32]
pub unsafe fn inner(&self) -> cudnnTensorDescriptor_t
pub fn size_bytes(&self) -> usize
pub fn has_positive_strides(&self) -> bool
Trait Implementations§
source§impl Debug for TensorDescriptor
impl Debug for TensorDescriptor
Auto Trait Implementations§
impl RefUnwindSafe for TensorDescriptor
impl !Send for TensorDescriptor
impl !Sync for TensorDescriptor
impl Unpin for TensorDescriptor
impl UnwindSafe for TensorDescriptor
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