cudaError_t cudaIpcGetMemHandle ( cudaIpcMemHandle_t *  handle,
void *  devPtr 
)

/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 cudaMemAlloc 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 cudaMemFree and a subsequent call to cudaMemAlloc 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.

Parameters:
handle - Pointer to user allocated cudaIpcMemHandle to return the handle in.
devPtr - Base pointer to previously allocated device memory
Returns:
cudaSuccess, cudaErrorInvalidResourceHandle, cudaErrorMemoryAllocation, cudaErrorMapBufferObjectFailed,
See also:
cudaMemAlloc, cudaMemFree, cudaIpcGetEventHandle, cudaIpcOpenEventHandle, cudaIpcOpenMemHandle, cudaIpcCloseMemHandle


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA