Skip to content

Group cuda

Modules > cuda

More...

Classes

Type Name
class cuvis::CudaImage
Image data from a measurement that stays resident in CUDA device memory.
class cuvis::CudaIpcExport
A live cross-process export of a device buffer.
class cuvis::cuda_unavailable_error
The loaded cuvis library does not provide a CUDA function that was called.

Public Types

Type Name
typedef cuvis_cuda_imbuffer_t cuda_imbuffer_t
Image buffer described by a device handle.
enum int cuda_ipc_backend_t
IPC transport backing a device buffer export.
typedef cuvis_cuda_ipc_descriptor_t cuda_ipc_descriptor_t
Everything a consumer needs to map an exported buffer.
enum int cuda_ipc_handle_type_t
Kind of OS handle carried in a descriptor's blob.
typedef CUVIS_HANDLE cuda_ipc_t
handle to an active ipc export registration
typedef CUVIS_HANDLE cuda_mem_t
handle to a shareable CUDA device buffer
typedef cuvis_cuda_mem_view_t cuda_mem_view_t
Raw device pointer, size and device index.

Public Functions

Type Name
bool cuda_ipc_backend_available (cuda_ipc_backend_t backend)
Whether this device and driver support one IPC backend.
std::vector< std::string > const & cuda_missing_symbols ()
The CUDA entry points the loaded cuvis library did not provide.
bool cuda_supported ()
Whether the loaded cuvis library provides every CUDA entry point.

Detailed Description

The CUDA entry points are looked up in the loaded cuvis library at first use instead of being imported at link time, so an older library is a degraded run rather than a dead process. The declarations still come from cuvis.h, so the header must have the CUDA block even when the library turns out not to export it. Two questions are kept apart because they fail for different reasons: cuda_supported asks whether the library provides the functions, cuda_ipc_backend_available asks whether this device and driver support a transport.

Nothing here needs the CUDA toolkit. The device pointer is handed out as an opaque address for a consumer to wrap.

Public Types Documentation

typedef cuda_imbuffer_t

Image buffer described by a device handle.

using cuvis::cuda_imbuffer_t = typedef cuvis_cuda_imbuffer_t;


enum cuda_ipc_backend_t

IPC transport backing a device buffer export.

enum cuda_ipc_backend_t {
    automatic = CUVIS_CUDA_IPC_BACKEND_AUTO,
    pool = CUVIS_CUDA_IPC_BACKEND_POOL,
    legacy = CUVIS_CUDA_IPC_BACKEND_LEGACY,
    vmm = CUVIS_CUDA_IPC_BACKEND_VMM
};


typedef cuda_ipc_descriptor_t

Everything a consumer needs to map an exported buffer.

using cuvis::cuda_ipc_descriptor_t = typedef cuvis_cuda_ipc_descriptor_t;


enum cuda_ipc_handle_type_t

Kind of OS handle carried in a descriptor's blob.

enum cuda_ipc_handle_type_t {
    none = CUVIS_CUDA_IPC_HANDLE_NONE,
    win32 = CUVIS_CUDA_IPC_HANDLE_WIN32,
    win32_kmt = CUVIS_CUDA_IPC_HANDLE_WIN32_KMT,
    posix_fd = CUVIS_CUDA_IPC_HANDLE_POSIX_FD
};


typedef cuda_ipc_t

handle to an active ipc export registration

using cuvis::cuda_ipc_t = typedef CUVIS_HANDLE;


typedef cuda_mem_t

handle to a shareable CUDA device buffer

using cuvis::cuda_mem_t = typedef CUVIS_HANDLE;


typedef cuda_mem_view_t

Raw device pointer, size and device index.

using cuvis::cuda_mem_view_t = typedef cuvis_cuda_mem_view_t;


Public Functions Documentation

function cuda_ipc_backend_available

Whether this device and driver support one IPC backend.

bool cuda_ipc_backend_available (
    cuda_ipc_backend_t backend
) 

Returns false rather than throwing when the library provides no CUDA API, so a caller can ask both questions with one call.


function cuda_missing_symbols

The CUDA entry points the loaded cuvis library did not provide.

std::vector< std::string > const & cuda_missing_symbols () 

Empty when cuda_supported is true. Naming them is the only field diagnostic that separates an old SDK from a device that cannot do IPC.


function cuda_supported

Whether the loaded cuvis library provides every CUDA entry point.

bool cuda_supported () 

Answers only the library question and never touches the device. Cheap and cached; safe to call before General::init.