Class MemoryOptions
- Namespace
- DotCompute.Abstractions.Models
- Assembly
- DotCompute.Abstractions.dll
Configuration options for memory management and allocation
public sealed class MemoryOptions
- Inheritance
-
MemoryOptions
- Inherited Members
Constructors
MemoryOptions()
Creates a new instance of MemoryOptions with default values
public MemoryOptions()
Properties
AccessPattern
Gets or sets the memory access pattern hint
public MemoryAccessPattern AccessPattern { get; set; }
Property Value
Alignment
Gets or sets the alignment requirement for memory allocations
public int Alignment { get; set; }
Property Value
EnablePooling
Gets or sets whether to enable memory pooling
public bool EnablePooling { get; set; }
Property Value
EnablePrefetching
Gets or sets whether to enable memory prefetching
public bool EnablePrefetching { get; set; }
Property Value
EnableZeroCopy
Gets or sets whether to enable zero-copy operations where possible
public bool EnableZeroCopy { get; set; }
Property Value
InitialPoolSize
Gets or sets the initial pool size in bytes
public long InitialPoolSize { get; set; }
Property Value
MaxPoolSize
Gets or sets the maximum pool size in bytes
public long MaxPoolSize { get; set; }
Property Value
OptimizationLevel
Gets or sets the memory optimization level
public MemoryOptimizationLevel OptimizationLevel { get; set; }
Property Value
PreferredTransferType
Gets or sets the memory transfer type preference
public MemoryTransferType PreferredTransferType { get; set; }
Property Value
UsePinnedMemory
Gets or sets whether to use pinned memory for host allocations
public bool UsePinnedMemory { get; set; }
Property Value
Methods
Clone()
Creates a copy of the current MemoryOptions
public MemoryOptions Clone()
Returns
- MemoryOptions
A new MemoryOptions instance with the same values