Class CpuAcceleratorOptions
- Namespace
- DotCompute.Backends.CPU.Accelerators
- Assembly
- DotCompute.Backends.CPU.dll
Configuration options for the CPU accelerator.
public sealed class CpuAcceleratorOptions
- Inheritance
-
CpuAcceleratorOptions
- Inherited Members
Properties
ComputeThreadPriority
Gets or sets the thread priority for compute threads.
public ThreadPriority ComputeThreadPriority { get; set; }
Property Value
DisabledInstructionSets
Gets or sets instruction sets to avoid.
public IList<string> DisabledInstructionSets { get; }
Property Value
EffectiveVectorWidth
Gets the effective vector width based on configuration and hardware capabilities.
public int EffectiveVectorWidth { get; }
Property Value
- int
The vector width in bits (128, 256, or 512).
EnableAutoVectorization
Gets or sets whether to enable automatic vectorization.
public bool EnableAutoVectorization { get; set; }
Property Value
EnableFrequencyScalingDetection
Gets or sets whether to enable CPU frequency scaling detection.
public bool EnableFrequencyScalingDetection { get; set; }
Property Value
EnableHardwareCounters
Gets or sets whether to enable hardware performance counters.
public bool EnableHardwareCounters { get; set; }
Property Value
EnableKernelCaching
Gets or sets whether to enable kernel caching.
public bool EnableKernelCaching { get; set; }
Property Value
EnableLoopUnrolling
Gets or sets whether to enable loop unrolling optimizations.
public bool EnableLoopUnrolling { get; set; }
Property Value
EnableMemoryPrefetching
Gets or sets whether to enable memory prefetching.
public bool EnableMemoryPrefetching { get; set; }
Property Value
EnableNumaAwareAllocation
Gets or sets whether to enable NUMA-aware memory allocation.
public bool EnableNumaAwareAllocation { get; set; }
Property Value
EnableProfiling
Gets or sets whether to enable performance profiling.
public bool EnableProfiling { get; set; }
Property Value
MaxCachedKernels
Gets or sets the maximum number of cached kernels.
public int MaxCachedKernels { get; set; }
Property Value
MaxMemoryAllocation
Gets or sets the maximum memory allocation size in bytes.
public long MaxMemoryAllocation { get; set; }
Property Value
MaxWorkGroupSize
Gets or sets the maximum work group size. If null, uses the system's processor count.
public int? MaxWorkGroupSize { get; set; }
Property Value
- int?
MemoryAlignment
Gets or sets the memory alignment requirement in bytes.
public int MemoryAlignment { get; set; }
Property Value
MemoryPrefetchDistance
Gets or sets the memory prefetch distance in cache lines.
public int MemoryPrefetchDistance { get; set; }
Property Value
MinVectorizationWorkSize
Gets or sets the minimum work size for vectorization to be considered beneficial.
public int MinVectorizationWorkSize { get; set; }
Property Value
PerformanceMode
Gets or sets the performance mode for the CPU accelerator. Controls optimization level and resource usage patterns. Default: Balanced
public CpuPerformanceMode PerformanceMode { get; set; }
Property Value
PreferPerformanceOverPower
Gets or sets whether to prefer performance over power efficiency.
public bool PreferPerformanceOverPower { get; set; }
Property Value
PreferredInstructionSets
Gets or sets custom instruction set preferences. Empty list means use all available instruction sets.
public IList<string> PreferredInstructionSets { get; }
Property Value
ProfilingSamplingIntervalMs
Gets or sets the profiling sampling interval in milliseconds.
public int ProfilingSamplingIntervalMs { get; set; }
Property Value
TargetVectorWidth
Gets or sets the target vector width in bits. If 0, the system will automatically detect the best width.
public int TargetVectorWidth { get; set; }
Property Value
UseHugePages
Gets or sets whether to use huge pages when available.
public bool UseHugePages { get; set; }
Property Value
Methods
GetEffectiveWorkGroupSize()
Gets the effective work group size based on configuration and system capabilities.
public int GetEffectiveWorkGroupSize()
Returns
ShouldUseInstructionSet(string)
Determines if the specified instruction set should be used.
public bool ShouldUseInstructionSet(string instructionSet)
Parameters
instructionSetstring
Returns
Validate()
Validates the options and returns any validation errors.
public IList<string> Validate()