Table of Contents

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

MemoryAccessPattern

Alignment

Gets or sets the alignment requirement for memory allocations

public int Alignment { get; set; }

Property Value

int

EnablePooling

Gets or sets whether to enable memory pooling

public bool EnablePooling { get; set; }

Property Value

bool

EnablePrefetching

Gets or sets whether to enable memory prefetching

public bool EnablePrefetching { get; set; }

Property Value

bool

EnableZeroCopy

Gets or sets whether to enable zero-copy operations where possible

public bool EnableZeroCopy { get; set; }

Property Value

bool

InitialPoolSize

Gets or sets the initial pool size in bytes

public long InitialPoolSize { get; set; }

Property Value

long

MaxPoolSize

Gets or sets the maximum pool size in bytes

public long MaxPoolSize { get; set; }

Property Value

long

OptimizationLevel

Gets or sets the memory optimization level

public MemoryOptimizationLevel OptimizationLevel { get; set; }

Property Value

MemoryOptimizationLevel

PreferredTransferType

Gets or sets the memory transfer type preference

public MemoryTransferType PreferredTransferType { get; set; }

Property Value

MemoryTransferType

UsePinnedMemory

Gets or sets whether to use pinned memory for host allocations

public bool UsePinnedMemory { get; set; }

Property Value

bool

Methods

Clone()

Creates a copy of the current MemoryOptions

public MemoryOptions Clone()

Returns

MemoryOptions

A new MemoryOptions instance with the same values