pub unsafe extern "C" fn cutensorMgCreateContractionDescriptor(
handle: cutensorMgHandle_t,
desc: *mut cutensorMgContractionDescriptor_t,
descA: cutensorMgTensorDescriptor_t,
modesA: *const i32,
descB: cutensorMgTensorDescriptor_t,
modesB: *const i32,
descC: cutensorMgTensorDescriptor_t,
modesC: *const i32,
descD: cutensorMgTensorDescriptor_t,
modesD: *const i32,
compute: cutensorComputeType_t,
) -> cutensorStatus_tExpand description
Create a contraction descriptor.
A contraction descriptor encodes the operands for a contraction operation of the form: $$ D = \alpha \mathcal{A} \mathcal{B} + \beta \mathcal{C} $$. The contraction operation presently supports tensors that are either on one or multiple devices, but does not support tensors stored on the host (for now). It uses the einstein notation, i.e., modes shared between only modesA and modesB are contracted. Currently, descC and descD as well as modesC and modesD must be identical. The compute type represents the lowest precision that may be used in the course of the calculation.
Remark
non-blocking, no reentrant, and thread-safe.
§Parameters
handle: The library handle.desc: The resulting tensor contraction descriptor.descA: The tensor descriptor for operand A.modesA: The modes for operand A.descB: The tensor descriptor for operand B.modesB: The modes for operand B.descC: The tensor descriptor for operand C.modesC: The modes for operand C.descD: The tensor descriptor for operand D.modesD: The modes for operand D.compute: The compute type for the operation.
§Return value
cutensorStatus_t::CUTENSOR_STATUS_INVALID_VALUE: Some input parameters were invalid.cutensorStatus_t::CUTENSOR_STATUS_NOT_SUPPORTED: This tensor layout or precision combination is not supported.cutensorStatus_t::CUTENSOR_STATUS_SUCCESS: The operation completed successfully.