pub struct ContractionDescriptor { /* private fields */ }Implementations§
Source§impl ContractionDescriptor
impl ContractionDescriptor
pub fn create( context: &Context, a: &TensorDescriptor, modes_a: &[Mode], b: &TensorDescriptor, modes_b: &[Mode], c: &TensorDescriptor, modes_c: &[Mode], d: &TensorDescriptor, modes_d: &[Mode], compute: ComputeType, ) -> Result<Self>
Sourcepub unsafe fn from_raw(
handle: cutensorMgContractionDescriptor_t,
context: &Context,
a_pointer_count: usize,
b_pointer_count: usize,
c_pointer_count: usize,
d_pointer_count: usize,
) -> Result<Self>
pub unsafe fn from_raw( handle: cutensorMgContractionDescriptor_t, context: &Context, a_pointer_count: usize, b_pointer_count: usize, c_pointer_count: usize, d_pointer_count: usize, ) -> Result<Self>
Wraps an existing cuTENSORMg contraction descriptor.
§Safety
handle must be a valid cuTENSORMg contraction descriptor associated
with context. Pointer counts must match the tensors used to create the
descriptor. The returned value takes ownership of handle and destroys
it on drop.
pub fn workspace( &self, find: &ContractionFind, preference: WorkspacePreference, ) -> Result<Workspace>
pub const fn as_raw(&self) -> cutensorMgContractionDescriptor_t
Sourcepub fn into_raw(self) -> cutensorMgContractionDescriptor_t
pub fn into_raw(self) -> cutensorMgContractionDescriptor_t
Consumes this descriptor and returns the owned raw cuTENSORMg descriptor.
The caller becomes responsible for destroying the descriptor.
Trait Implementations§
Source§impl Debug for ContractionDescriptor
impl Debug for ContractionDescriptor
Source§impl Drop for ContractionDescriptor
impl Drop for ContractionDescriptor
Auto Trait Implementations§
impl !Send for ContractionDescriptor
impl !Sync for ContractionDescriptor
impl Freeze for ContractionDescriptor
impl RefUnwindSafe for ContractionDescriptor
impl Unpin for ContractionDescriptor
impl UnsafeUnpin for ContractionDescriptor
impl UnwindSafe for ContractionDescriptor
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