Function rcudnn_sys::cudaIpcGetMemHandle[][src]

pub unsafe extern "C" fn cudaIpcGetMemHandle(
    handle: *mut cudaIpcMemHandle_t,
    devPtr: *mut c_void
) -> cudaError_t
Expand description

\brief Gets an interprocess memory handle for an existing device memory allocation

Takes a pointer to the base of an existing device memory allocation created with ::cudaMalloc and exports it for use in another process. This is a lightweight operation and may be called multiple times on an allocation without adverse effects.

If a region of memory is freed with ::cudaFree and a subsequent call to ::cudaMalloc returns memory with the same device address, ::cudaIpcGetMemHandle will return a unique handle for the new memory.

IPC functionality is restricted to devices with support for unified addressing on Linux operating systems. IPC functionality is not supported on Tegra platforms.

\param handle - Pointer to user allocated ::cudaIpcMemHandle to return the handle in. \param devPtr - Base pointer to previously allocated device memory

\returns ::cudaSuccess, ::cudaErrorMemoryAllocation, ::cudaErrorMapBufferObjectFailed, ::cudaErrorNotSupported, ::cudaErrorInvalidValue \note_init_rt \note_callback

\sa ::cudaMalloc, ::cudaFree, ::cudaIpcGetEventHandle, ::cudaIpcOpenEventHandle, ::cudaIpcOpenMemHandle, ::cudaIpcCloseMemHandle, ::cuIpcGetMemHandle