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.status—CUresultwith itsbaracuda_types::CudaStatusimpl.functions—PFN_*function-pointer type aliases.driver— theDriverstruct and the process-widedriver()accessor that loadslibcudaonce vialibloadingand resolves every other symbol throughcuGetProcAddress.
§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
Driversingleton: a lazily-loaded handle tolibcudawith 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 itsCudaStatusimpl.- types
- Core handle types used by the CUDA Driver API.