Function cuMemPoolExportToShareableHandle

Source
pub unsafe extern "C" fn cuMemPoolExportToShareableHandle(
    handle_out: *mut c_void,
    pool: CUmemoryPool,
    handleType: CUmemAllocationHandleType,
    flags: c_ulonglong,
) -> CUresult
Expand description

\brief 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 ::cuMemPoolImportFromShareableHandle. Individual pointers can then be shared with the ::cuMemPoolExportPointer and ::cuMemPoolImportPointer 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 CU_MEM_HANDLE_TYPE_NONE.

\param[out] handle_out - Returned OS handle \param[in] pool - pool to export \param[in] handleType - the type of handle to create \param[in] flags - must be 0

\returns ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_OUT_OF_MEMORY

\sa ::cuMemPoolImportFromShareableHandle, ::cuMemPoolExportPointer, ::cuMemPoolImportPointer, ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool, ::cuDeviceGetMemPool, ::cuMemPoolCreate, ::cuMemPoolSetAccess, ::cuMemPoolSetAttribute