Enum MemoryHint
- Namespace
- DotCompute.Abstractions.Pipelines.Enums
- Assembly
- DotCompute.Abstractions.dll
Memory optimization hints for pipeline execution. These hints guide memory allocation and management strategies.
[Flags]
public enum MemoryHint
Fields
AlignedAccess = 524288Memory should be aligned for optimal SIMD performance.
ArrayOfStructures = 8388608Prefer array-of-structures layout for better locality.
AvoidMemoryPool = 8192Avoid memory pooling, use direct allocation.
ConcurrentAccess = 16777216Memory will be accessed by multiple threads, optimize for concurrent access.
DeviceOnly = 512Memory will be used only on device, optimize for device-specific access.
HighBandwidth = 32768Optimize for high bandwidth memory access.
HostOnly = 1024Memory will be used only on host, optimize for host access.
LargeDataset = 64Large dataset that may not fit in cache, use streaming access.
LowLatency = 65536Optimize for low latency memory access.
LowMemoryUsage = 16384Optimize for low memory usage, prefer compression where possible.
NonCached = 2097152Use non-cached memory for better cache utilization of other data.
None = 0No specific memory hints.
PinnedMemory = 2048Use pinned memory for faster host-device transfers.
RandomAccess = 2Expect random memory access patterns, optimize accordingly.
ReadHeavy = 4Data will be read multiple times, optimize for read performance.
Reusable = 32Data will be reused multiple times, optimize for caching.
SequentialAccess = 1Prefer sequential memory access patterns for better cache performance.
Memory will be shared between host and device, optimize for unified access.
SingleThreadAccess = 33554432Memory will be accessed by a single thread, optimize accordingly.
SingleUse = 16Data will be used only once, optimize for single-use access.
SmallDataset = 128Small dataset that should fit in cache, optimize for locality.
StreamingAccess = 131072Memory will be accessed in a streaming fashion, optimize for throughput.
StructureOfArrays = 4194304Prefer structure-of-arrays layout for better vectorization.
UseMemoryPool = 4096Use memory pooling to reduce allocation overhead.
VectorizedAccess = 262144Memory layout should be optimized for vectorized operations.
WriteCombining = 1048576Use write-combining memory for better write performance.
WriteHeavy = 8Data will be written frequently, optimize for write performance.