Enum CudaMemcpyKind
- Namespace
- DotCompute.Backends.CUDA.Types.Native
- Assembly
- DotCompute.Backends.CUDA.dll
Specifies the direction of a memory copy operation in CUDA.
public enum CudaMemcpyKind
Fields
Default = 4Let CUDA automatically determine the copy direction. This is the recommended option when using unified virtual addressing.
DeviceToDevice = 3Copy from device memory to device memory.
DeviceToHost = 2Copy from device memory to host memory.
HostToDevice = 1Copy from host memory to device memory.
HostToHost = 0Copy from host memory to host memory.
Remarks
This enumeration is used with memory copy functions like cudaMemcpy and cudaMemcpyAsync to specify whether data is being copied between host memory, device memory, or both. The Default option allows CUDA to automatically determine the copy direction based on the memory pointers involved.