Skip to main content

cudaMemPoolExportToShareableHandle

Function cudaMemPoolExportToShareableHandle 

Source
pub unsafe extern "C" fn cudaMemPoolExportToShareableHandle(
    shareableHandle: *mut c_void,
    memPool: cudaMemPool_t,
    handleType: cudaMemAllocationHandleType,
    flags: c_uint,
) -> cudaError_t
Expand description

Exports a memory pool to the requested handle type.

Given an IPC capable mempool, create an OS handle to share the pool with another process. A recipient process can convert the shareable handle into a mempool with cudaMemPoolImportFromShareableHandle. Individual pointers can then be shared with the cudaMemPoolExportPointer and cudaMemPoolImportPointer APIs. The implementation of what the shareable handle is and how it can be transferred is defined by the requested handle type.

Note: To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than cudaMemHandleTypeNone.

§Parameters

  • handleType: the type of handle to create.
  • flags: must be 0.

§Return value

See also: cuMemPoolExportToShareableHandle, cudaMemPoolImportFromShareableHandle, cudaMemPoolExportPointer, cudaMemPoolImportPointer.