Enum CudaHostAllocFlags
- Namespace
- DotCompute.Backends.CUDA.Memory
- Assembly
- DotCompute.Backends.CUDA.dll
Flags for pinned memory allocation.
[Flags]
public enum CudaHostAllocFlags
Fields
Mapped = 2Maps allocation to device address space (
cudaHostAllocMapped= 0x02).None = 0No special allocation flags (
cudaHostAllocDefault= 0x00).Portable = 1Makes allocation portable across CUDA contexts (
cudaHostAllocPortable= 0x01).WriteCombined = 4Allocates write-combined memory for improved GPU write performance (
cudaHostAllocWriteCombined= 0x04).
Remarks
Values MUST match the canonical cudaHostAlloc* constants from
cuda_runtime.h because they are passed directly to native
cudaHostAlloc, which rejects unknown bits with cudaErrorInvalidValue.