Copyright | [2009..2015] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
IPC memory management for low-level driver interface.
Restricted to devices which support unified addressing on Linux operating systems.
Since CUDA-4.0.
- data IPCDevicePtr a
- data IPCFlag = LazyEnablePeerAccess
- export :: DevicePtr a -> IO (IPCDevicePtr a)
- open :: IPCDevicePtr a -> [IPCFlag] -> IO (DevicePtr a)
- close :: DevicePtr a -> IO ()
IPC memory management
data IPCDevicePtr a Source #
A CUDA memory handle used for inter-process communication.
Eq (IPCDevicePtr a) Source # | |
Show (IPCDevicePtr a) Source # | |
Flags for controlling IPC memory access
export :: DevicePtr a -> IO (IPCDevicePtr a) Source #
Create an inter-process memory handle for an existing device memory
allocation. The handle can then be sent to another process and made
available to that process via open
.
Requires CUDA-4.1.
open :: IPCDevicePtr a -> [IPCFlag] -> IO (DevicePtr a) Source #
Open an inter-process memory handle exported from another process, returning a device pointer usable in the current process.
Maps memory exported by another process with create
into the current
device address space. For contexts on different devices, open
can
attempt to enable peer access if the user called
add
, and is controlled by the
LazyEnablePeerAccess
flag.
Each handle from a given device and context may only be open
ed by one
context per device per other process. Memory returned by open
must be
freed via close
.
Requires CUDA-4.1.
close :: DevicePtr a -> IO () Source #
Close and unmap memory returned by open
. The original allocation in
the exporting process as well as imported mappings in other processes
are unaffected.
Any resources used to enable peer access will be freed if this is the last mapping using them.
Requires CUDA-4.1.