Table of Contents

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 = 4

Let CUDA automatically determine the copy direction. This is the recommended option when using unified virtual addressing.

DeviceToDevice = 3

Copy from device memory to device memory.

DeviceToHost = 2

Copy from device memory to host memory.

HostToDevice = 1

Copy from host memory to device memory.

HostToHost = 0

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