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 (page-locked / pinned, no special properties). Corresponds to
cudaHostAllocDefault(0x00).Mapped = 2Map the allocation into the device address space. The returned host pointer can be used directly by CUDA kernels. Corresponds to
cudaHostAllocMapped(0x02).Pinned = 0Alias for Default; all
cudaHostAllocallocations are page-locked (pinned).Portable = 1Make the allocation portable across CUDA contexts. This allows the memory to be used by multiple CUDA contexts. Corresponds to
cudaHostAllocPortable(0x01).WriteCombined = 4Allocate write-combined memory. This can improve transfer performance in some cases but may reduce CPU read performance. Corresponds to
cudaHostAllocWriteCombined(0x04).
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.