Skip to main content

Crate baracuda_cuda_sys

Crate baracuda_cuda_sys 

Source
Expand description

Raw FFI + dynamic loader for the CUDA Driver API (and, in later sprint days, the Runtime API). Consumed by the safe wrappers in baracuda-driver / baracuda-runtime.

§Layout

  • types — opaque handle types (CUcontext, CUstream, …), integer handle newtypes (CUdevice, CUdeviceptr), and flag modules.
  • statusCUresult with its baracuda_types::CudaStatus impl.
  • functionsPFN_* function-pointer type aliases.
  • driver — the Driver struct and the process-wide driver() accessor that loads libcuda once via libloading and resolves every other symbol through cuGetProcAddress.

§Dynamic loading

Nothing in this crate is linked against libcuda at build time. On machines without CUDA, calling driver() returns baracuda_core::LoaderError::LibraryNotFound — callers never crash merely by linking this crate.

Re-exports§

pub use driver::driver;
pub use driver::Driver;
pub use runtime::runtime;
pub use runtime::Runtime;
pub use status::CUresult;
pub use types::*;

Modules§

driver
The Driver singleton: a lazily-loaded handle to libcuda with a cached, version-aware function-pointer table.
functions
C function-pointer aliases for the CUDA Driver API.
runtime
Raw FFI + dynamic loader for the CUDA Runtime API (libcudart).
status
CUresult — the Driver API status enum — plus its CudaStatus impl.
types
Core handle types used by the CUDA Driver API.