Expand description
Runtime-API device memory.
Modules§
- pinned_
flags - Flags for
cudaHostAlloc. Seebaracuda_cuda_sys::runtime::types::cudaHostAllocFlagsfor raw values.
Structs§
- Device
Buffer - Owned, typed allocation of device memory (Runtime API).
- Managed
Buffer - Unified managed-memory buffer — allocated via
cudaMallocManaged. Accessible from both host and device without explicit copies. - Pinned
Host Buffer - Pinned (page-locked) host allocation — CUDA-owned memory that supports real async H↔D copies without staging.
- Pinned
Registration - RAII guard for
cudaHostRegister— pins an existing host slice and unregisters on drop.
Enums§
- Prefetch
Target - Target for
mem_prefetch_async/mem_advise. The CUDA Runtime API’s v1 variants take an ordinal — passcudaCpuDeviceId(-1) for host.
Functions§
- mem_
advise ⚠ cudaMemAdvise— unified-memory placement hint.adviceis a constant frombaracuda_cuda_sys::runtime::types::cudaMemoryAdvise.- mem_
get_ info cudaMemGetInfo—(free, total)bytes on the current device.- mem_
prefetch_ ⚠async - Prefetch
countbytes of unified memory atdev_ptrtotarget, ordered onstream.dev_ptrmust be a managed-memory allocation (fromManagedBufferorcudaMallocManaged). - memcpy_
peer - Peer-to-peer device memory copy. Both buffers must be on enabled-peer
devices (see
crate::Device::enable_peer_access). - memcpy_
peer_ async - Async peer-to-peer memcpy ordered on
stream.