Skip to main content

cutensorMgCopyGetWorkspace

Function cutensorMgCopyGetWorkspace 

Source
pub unsafe extern "C" fn cutensorMgCopyGetWorkspace(
    handle: cutensorMgHandle_t,
    desc: cutensorMgCopyDescriptor_t,
    deviceWorkspaceSize: *mut i64,
    hostWorkspaceSize: *mut i64,
) -> cutensorStatus_t
Expand description

Computes the workspace that is needed for the copy.

The function calculates the minimum workspace required for the copy operation to succeed. 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 copy descriptor.
  • deviceWorkspaceSize: The workspace size in bytes, for each device in the handle.
  • hostWorkspaceSize: The workspace size in bytes for pinned host memory.

§Return value