Table of Contents

Enum MemoryAccessPattern

Namespace
DotCompute.Abstractions.Types
Assembly
DotCompute.Abstractions.dll

Defines memory access patterns for kernel optimization. Understanding access patterns enables better memory coalescing and cache utilization.

public enum MemoryAccessPattern

Fields

Broadcast = 8

Broadcast operations. Single value broadcast to multiple threads.

Coalesced = 2

Coalesced memory access pattern. Threads in a warp access contiguous memory segments. Optimized for GPU memory architecture, maximizes bandwidth.

Gather = 6

Gather operations. Threads gather data from scattered memory locations. May benefit from texture memory or vectorized loads.

Mixed = 4

Mixed access patterns. Combination of different access patterns.

Random = 3

Random memory access pattern. No predictable pattern in memory accesses. Worst case for cache utilization and memory coalescing. May benefit from texture memory or cache hints.

Scatter = 5

Scatter operations. Threads scatter data to non-contiguous memory locations. May result in poor memory coalescing and cache utilization.

ScatterGather = 7

Scatter-gather operations. Threads gather data from scattered memory locations or scatter data.

Sequential = 0

Sequential memory access pattern. Threads access consecutive memory locations in order. Provides optimal memory coalescing and cache line utilization.

Strided = 1

Strided memory access pattern. Threads access memory with a fixed stride between accesses. May result in reduced memory bandwidth utilization.

Tiled = 9

Tiled memory access pattern. Data is accessed in small, localized blocks (tiles). Benefits from blocking algorithms and shared memory usage on GPUs. Common in matrix operations and image processing kernels.

Unknown = 10

Unknown access pattern. Pattern cannot be determined through static analysis. Requires runtime profiling for optimization.