Table of Contents

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

Memory should be aligned for optimal SIMD performance.

ArrayOfStructures = 8388608

Prefer array-of-structures layout for better locality.

AvoidMemoryPool = 8192

Avoid memory pooling, use direct allocation.

ConcurrentAccess = 16777216

Memory will be accessed by multiple threads, optimize for concurrent access.

DeviceOnly = 512

Memory will be used only on device, optimize for device-specific access.

HighBandwidth = 32768

Optimize for high bandwidth memory access.

HostOnly = 1024

Memory will be used only on host, optimize for host access.

LargeDataset = 64

Large dataset that may not fit in cache, use streaming access.

LowLatency = 65536

Optimize for low latency memory access.

LowMemoryUsage = 16384

Optimize for low memory usage, prefer compression where possible.

NonCached = 2097152

Use non-cached memory for better cache utilization of other data.

None = 0

No specific memory hints.

PinnedMemory = 2048

Use pinned memory for faster host-device transfers.

RandomAccess = 2

Expect random memory access patterns, optimize accordingly.

ReadHeavy = 4

Data will be read multiple times, optimize for read performance.

Reusable = 32

Data will be reused multiple times, optimize for caching.

SequentialAccess = 1

Prefer sequential memory access patterns for better cache performance.

SharedMemory = 256

Memory will be shared between host and device, optimize for unified access.

SingleThreadAccess = 33554432

Memory will be accessed by a single thread, optimize accordingly.

SingleUse = 16

Data will be used only once, optimize for single-use access.

SmallDataset = 128

Small dataset that should fit in cache, optimize for locality.

StreamingAccess = 131072

Memory will be accessed in a streaming fashion, optimize for throughput.

StructureOfArrays = 4194304

Prefer structure-of-arrays layout for better vectorization.

UseMemoryPool = 4096

Use memory pooling to reduce allocation overhead.

VectorizedAccess = 262144

Memory layout should be optimized for vectorized operations.

WriteCombining = 1048576

Use write-combining memory for better write performance.

WriteHeavy = 8

Data will be written frequently, optimize for write performance.