pub unsafe extern "C" fn cutensorMgCreateContractionPlan(
handle: cutensorMgHandle_t,
plan: *mut cutensorMgContractionPlan_t,
desc: cutensorMgContractionDescriptor_t,
find: cutensorMgContractionFind_t,
deviceWorkspaceSize: *const i64,
hostWorkspaceSize: i64,
) -> cutensorStatus_tExpand description
Create a contraction plan.
A contraction plan implements the contraction operation expressed through the contraction descriptor in accordance to the options specified in the contraction find. It contains all the information needed to execute a contraction operation. Planning may fail if insufficient workspace is provided.
Remark
non-blocking, no reentrant, and thread-safe.
§Parameters
handle: The library handle.plan: The resulting contraction plan.desc: The contraction descriptor.find: The contraction find.deviceWorkspaceSize: The amount of workspace in bytes, for each device in the handle.hostWorkspaceSize: The amount of pinned host memory in bytes.
§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.