pub unsafe extern "C" fn cutensorMgContraction(
handle: cutensorMgHandle_t,
plan: cutensorMgContractionPlan_t,
alpha: *const c_void,
ptrA: *mut *const c_void,
ptrB: *mut *const c_void,
beta: *const c_void,
ptrC: *mut *const c_void,
ptrD: *mut *mut c_void,
deviceWorkspace: *mut *mut c_void,
hostWorkspace: *mut c_void,
streams: *mut cudaStream_t,
) -> cutensorStatus_tExpand description
Execute a contraction operation.
Executes a contraction operation according to the provided plan. It receives all the operands as arrays of pointers that are ordered according to their tensor descriptors’ devices parameter. The device workspace and streams are ordered according to the library handle’s devices parameter. The function is thread safe as long as concurrent threads use different library handles.
Remark
calls asynchronous functions, non-blocking, no reentrant, and conditionally thread-safe.
§Parameters
handle: The library handle.plan: The copy plan.alpha: The alpha scaling factor (host pointer).ptrA: The A operand tensor pointers.ptrB: The B operand tensor pointers.beta: The beta scaling factor (host pointer).ptrC: The operand C tensor pointers.ptrD: The operand D tensor pointers.deviceWorkspace: The device workspace.hostWorkspace: The host pinned memory workspace.streams: The execution streams.
§Return value
cutensorStatus_t::CUTENSOR_STATUS_CUDA_ERROR: An issue interacting with the CUDA runtime occurred.cutensorStatus_t::CUTENSOR_STATUS_INVALID_VALUE: Some input parameters were invalid.cutensorStatus_t::CUTENSOR_STATUS_SUCCESS: The operation completed successfully.