pub struct Contraction;Expand description
A contraction op: D[mD] = α * op_a(A[mA]) * op_b(B[mB]) + β * op_c(C[mC]).
Implementations§
Source§impl Contraction
impl Contraction
Sourcepub unsafe fn new<'h>(
handle: &'h Handle,
a: &TensorDescriptor<'h>,
modes_a: &[i32],
b: &TensorDescriptor<'h>,
modes_b: &[i32],
c: &TensorDescriptor<'h>,
modes_c: &[i32],
d: &TensorDescriptor<'h>,
modes_d: &[i32],
compute_desc: *const c_void,
) -> Result<OperationDescriptor<'h>>
pub unsafe fn new<'h>( handle: &'h Handle, a: &TensorDescriptor<'h>, modes_a: &[i32], b: &TensorDescriptor<'h>, modes_b: &[i32], c: &TensorDescriptor<'h>, modes_c: &[i32], d: &TensorDescriptor<'h>, modes_d: &[i32], compute_desc: *const c_void, ) -> Result<OperationDescriptor<'h>>
Build a contraction descriptor.
compute_desc is an opaque pointer — pass core::ptr::null()
for the library default (compute-type matches C’s dtype).
§Safety
compute_desc must be null or a valid cutensorComputeDescriptor_t.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Contraction
impl RefUnwindSafe for Contraction
impl Send for Contraction
impl Sync for Contraction
impl Unpin for Contraction
impl UnsafeUnpin for Contraction
impl UnwindSafe for Contraction
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