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 = 8Broadcast operations. Single value broadcast to multiple threads.
Coalesced = 2Coalesced memory access pattern. Threads in a warp access contiguous memory segments. Optimized for GPU memory architecture, maximizes bandwidth.
Gather = 6Gather operations. Threads gather data from scattered memory locations. May benefit from texture memory or vectorized loads.
Mixed = 4Mixed access patterns. Combination of different access patterns.
Random = 3Random 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 = 5Scatter operations. Threads scatter data to non-contiguous memory locations. May result in poor memory coalescing and cache utilization.
ScatterGather = 7Scatter-gather operations. Threads gather data from scattered memory locations or scatter data.
Sequential = 0Sequential memory access pattern. Threads access consecutive memory locations in order. Provides optimal memory coalescing and cache line utilization.
Strided = 1Strided memory access pattern. Threads access memory with a fixed stride between accesses. May result in reduced memory bandwidth utilization.
Tiled = 9Tiled 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 = 10Unknown access pattern. Pattern cannot be determined through static analysis. Requires runtime profiling for optimization.