pub struct TensorDescriptor<'h> { /* private fields */ }Expand description
A tensor descriptor: modes + extents + dtype + stride layout.
Implementations§
Source§impl<'h> TensorDescriptor<'h>
impl<'h> TensorDescriptor<'h>
Sourcepub fn new(
handle: &'h Handle,
extents: &[i64],
strides: Option<&[i64]>,
dtype: DataType,
alignment_bytes: u32,
) -> Result<Self>
pub fn new( handle: &'h Handle, extents: &[i64], strides: Option<&[i64]>, dtype: DataType, alignment_bytes: u32, ) -> Result<Self>
extents[i] is the size along mode i. strides = None gets a
row-major packed layout.
Sourcepub fn as_raw(&self) -> cutensorTensorDescriptor_t
pub fn as_raw(&self) -> cutensorTensorDescriptor_t
Raw cutensorTensorDescriptor_t. Use with care.
Trait Implementations§
Source§impl<'h> Debug for TensorDescriptor<'h>
impl<'h> Debug for TensorDescriptor<'h>
Source§impl Drop for TensorDescriptor<'_>
impl Drop for TensorDescriptor<'_>
Auto Trait Implementations§
impl<'h> !Send for TensorDescriptor<'h>
impl<'h> !Sync for TensorDescriptor<'h>
impl<'h> Freeze for TensorDescriptor<'h>
impl<'h> RefUnwindSafe for TensorDescriptor<'h>
impl<'h> Unpin for TensorDescriptor<'h>
impl<'h> UnsafeUnpin for TensorDescriptor<'h>
impl<'h> UnwindSafe for TensorDescriptor<'h>
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