pub unsafe extern "C" fn cutensorMgContractionGetWorkspace(
handle: cutensorMgHandle_t,
desc: cutensorMgContractionDescriptor_t,
find: cutensorMgContractionFind_t,
preference: cutensorWorksizePreference_t,
deviceWorkspaceSize: *mut i64,
hostWorkspaceSize: *mut i64,
) -> cutensorStatus_tExpand description
Computes the workspace that is needed for the contraction.
The function calculates the workspace required for the contraction operation to succeed. It takes a workspace preference, which can tune how much workspace is needed. It returns the device workspace size in the same order as the devices are passed to the library handle.
Remark
non-blocking, no reentrant, and thread-safe.
§Parameters
handle: The library handle.desc: The contraction descriptor.find: The contraction find.preference: The workspace preference.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.