cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::event::ipc Namespace Reference

Definitions and functionality related to CUDA events (not including the event wrapper type event_t itself) More...

Typedefs

using handle_t = CUipcEventHandle
 The concrete value passed between processes, used to tell the CUDA Runtime API which event is desired. More...
 

Functions

handle_t export_ (const event_t &event)
 Enable use of an event which this process created by other processes. More...
 
event_t import (const device_t &device, const handle_t &event_ipc_handle)
 Obtain a proper CUDA event, corresponding to an event created by another process, using a handle communicated via operating-system inter-process communications. More...
 
event_t import (const context_t &context, const handle_t &event_ipc_handle)
 

Detailed Description

Definitions and functionality related to CUDA events (not including the event wrapper type event_t itself)

Typedef Documentation

◆ handle_t

typedef CUipcEventHandle cuda::event::ipc::handle_t

The concrete value passed between processes, used to tell the CUDA Runtime API which event is desired.

The CUDA driver's raw handle for events passed between processes.

Function Documentation

◆ export_()

handle_t cuda::event::ipc::export_ ( const event_t event)
inline

Enable use of an event which this process created by other processes.

Parameters
eventthe event to share with other processes
Returns
the handle to pass directly to other processes with which they may obtain a proper CUDA event

◆ import() [1/2]

event_t cuda::event::ipc::import ( const device_t device,
const handle_t event_ipc_handle 
)
inline

Obtain a proper CUDA event, corresponding to an event created by another process, using a handle communicated via operating-system inter-process communications.

Note
IMHO, the CUDA runtime API should allow for obtaining the device from an event handle (or otherwise - have a handle provide both an event handle and a device ID), but that is not currently the case.
Parameters
event_ipc_handlethe handle obtained via inter-process communications
devicethe device with which the imported event is associated

◆ import() [2/2]

event_t cuda::event::ipc::import ( const context_t context,
const handle_t event_ipc_handle 
)
inline
Parameters
contextthe device-context with which the imported event is associated
event_ipc_handleThe handle created by another process, to be imported
Returns
An event usable in the current process