Skip to main content

cutensorMgCreateContractionPlan

Function cutensorMgCreateContractionPlan 

Source
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_t
Expand 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