Function cuIpcCloseMemHandle

Source
pub unsafe extern "C" fn cuIpcCloseMemHandle(
    dptr: CUdeviceptr,
) -> CUresult
Expand description

\brief Attempts to close memory mapped with ::cuIpcOpenMemHandle

Decrements the reference count of the memory returned by ::cuIpcOpenMemHandle by 1. When the reference count reaches 0, this API unmaps the memory. The original allocation in the exporting process as well as imported mappings in other processes will be unaffected.

Any resources used to enable peer access will be freed if this is the last mapping using them.

IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED

\param dptr - Device pointer returned by ::cuIpcOpenMemHandle

\returns ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_MAP_FAILED, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_INVALID_VALUE \sa ::cuMemAlloc, ::cuMemFree, ::cuIpcGetEventHandle, ::cuIpcOpenEventHandle, ::cuIpcGetMemHandle, ::cuIpcOpenMemHandle, ::cudaIpcCloseMemHandle