Skip to main content

cutensorMgCopy

Function cutensorMgCopy 

Source
pub unsafe extern "C" fn cutensorMgCopy(
    handle: cutensorMgHandle_t,
    plan: cutensorMgCopyPlan_t,
    ptrDst: *mut *mut c_void,
    ptrSrc: *mut *const c_void,
    deviceWorkspace: *mut *mut c_void,
    hostWorkspace: *mut c_void,
    streams: *mut cudaStream_t,
) -> cutensorStatus_t
Expand description

Execute a copy operation.

Executes a copy operation according to the given plan. It receives the source and destination pointers in the order prescribed by the devices parameter of the respective tensor descriptor and the device workspace and streams in the order prescribed by the devices parameter of the handle. If host transfers are involved in the execution the function will block until those host transfers have been completed. The function is thread safe as long as concurrent threads use different library handles.

Remark

calls asynchronous functions, conditionally blocking, no reentrant, and conditionally thread-safe.

§Parameters

  • handle: The library handle.
  • plan: The copy plan.
  • ptrDst: The destination tensor pointers.
  • ptrSrc: The source tensor pointers.
  • deviceWorkspace: The device workspace.
  • hostWorkspace: The host pinned memory workspace.
  • streams: The execution streams.

§Return value