Table of Contents

Enum CudaHostAllocFlags

Namespace
DotCompute.Backends.CUDA.Memory
Assembly
DotCompute.Backends.CUDA.dll

Flags for pinned memory allocation.

[Flags]
public enum CudaHostAllocFlags

Fields

Mapped = 2

Maps allocation to device address space (cudaHostAllocMapped = 0x02).

None = 0

No special allocation flags (cudaHostAllocDefault = 0x00).

Portable = 1

Makes allocation portable across CUDA contexts (cudaHostAllocPortable = 0x01).

WriteCombined = 4

Allocates 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.