Table of Contents

Class CudaMemoryAlignment

Namespace
DotCompute.Backends.CUDA.Types
Assembly
DotCompute.Backends.CUDA.dll

CUDA memory alignment requirements

public static class CudaMemoryAlignment
Inheritance
CudaMemoryAlignment
Inherited Members

Fields

MinAlignment

Minimum alignment for coalesced access (256 bytes). Canonical source: Gpu.

public const int MinAlignment = 256

Field Value

int

OptimalAlignment

The optimal alignment.

public const int OptimalAlignment = 512

Field Value

int

SurfaceAlignment

The surface alignment.

public const int SurfaceAlignment = 512

Field Value

int

TextureAlignment

The texture alignment.

public const int TextureAlignment = 512

Field Value

int

Methods

AlignUp(long, int)

Gets align up.

public static long AlignUp(long size, int alignment = 512)

Parameters

size long

The size.

alignment int

The alignment.

Returns

long

The result of the operation.

IsAligned(long, int)

Determines whether aligned.

public static bool IsAligned(long size, int alignment = 512)

Parameters

size long

The size.

alignment int

The alignment.

Returns

bool

true if the condition is met; otherwise, false.