Enum CudaHostAllocFlags
- Namespace
- DotCompute.Backends.CUDA.Types.Native
- Assembly
- DotCompute.Backends.CUDA.dll
Flags that control the allocation behavior of CUDA host memory.
[Flags]
public enum CudaHostAllocFlags : uint
Fields
Default = 0Default host allocation with no special properties.
Mapped = 2Map the allocation into the device address space. The returned host pointer can be used directly by CUDA kernels.
Pinned = 1Allocate pinned (page-locked) memory. Pinned memory provides faster transfers to/from GPU memory.
Portable = 8Make the allocation portable across CUDA contexts. This allows the memory to be used by multiple CUDA contexts.
WriteCombined = 4Allocate write-combined memory. This can improve transfer performance in some cases but may reduce CPU read performance.
Remarks
These flags are used with cudaHostAlloc and related functions to specify special properties for host memory allocations. Multiple flags can be combined using bitwise OR operations.