Table of Contents

Class SimdOptimizationEngine

Namespace
DotCompute.Backends.CPU.Kernels.Simd
Assembly
DotCompute.Backends.CPU.dll

SIMD optimization engine responsible for execution strategy selection, performance optimization, and workload analysis.

public sealed class SimdOptimizationEngine
Inheritance
SimdOptimizationEngine
Inherited Members

Constructors

SimdOptimizationEngine(SimdSummary, ExecutorConfiguration)

SIMD optimization engine responsible for execution strategy selection, performance optimization, and workload analysis.

public SimdOptimizationEngine(SimdSummary capabilities, ExecutorConfiguration config)

Parameters

capabilities SimdSummary
config ExecutorConfiguration

Methods

AnalyzeHistoricalPerformance(ExecutionContext)

Analyzes historical performance to inform future decisions.

public static HistoricalPerformanceAnalysis AnalyzeHistoricalPerformance(ExecutionContext context)

Parameters

context ExecutionContext

Execution context with historical data.

Returns

HistoricalPerformanceAnalysis

Historical performance analysis.

AnalyzeWorkload<T>(long, ExecutionContext)

Analyzes workload characteristics to guide optimization decisions.

public static WorkloadProfile AnalyzeWorkload<T>(long elementCount, ExecutionContext context) where T : unmanaged

Parameters

elementCount long

Number of elements.

context ExecutionContext

Execution context.

Returns

WorkloadProfile

Workload analysis profile.

Type Parameters

T

Element type.

DetermineExecutionStrategy<T>(long, ExecutionContext)

Determines the optimal execution strategy based on workload characteristics and hardware capabilities.

public SimdExecutionStrategy DetermineExecutionStrategy<T>(long elementCount, ExecutionContext context) where T : unmanaged

Parameters

elementCount long

Number of elements to process.

context ExecutionContext

Execution context with thread-local information.

Returns

SimdExecutionStrategy

Optimal execution strategy.

Type Parameters

T

Element type.

EstimateCacheEfficiency(long, Type)

Estimates cache efficiency for the given workload.

public static double EstimateCacheEfficiency(long elementCount, Type elementType)

Parameters

elementCount long

Number of elements.

elementType Type

Type of elements.

Returns

double

Cache efficiency estimate (0.0 to 1.0).

EstimateVectorizationPotential<T>(long)

Estimates vectorization potential for the workload.

public static double EstimateVectorizationPotential<T>(long elementCount) where T : unmanaged

Parameters

elementCount long

Number of elements.

Returns

double

Vectorization potential (0.0 to 1.0).

Type Parameters

T

Element type.

IsMemoryAligned<T>()

Checks if memory access is properly aligned for SIMD operations.

public static bool IsMemoryAligned<T>() where T : unmanaged

Returns

bool

True if aligned access is likely.

Type Parameters

T

Element type.

IsTypeOptimalForAvx512(Type)

Determines if the type is optimal for AVX-512 operations.

public static bool IsTypeOptimalForAvx512(Type elementType)

Parameters

elementType Type

Element type to check.

Returns

bool

True if type is optimal for AVX-512.

SelectOptimalStrategy(WorkloadProfile, long)

Selects the optimal execution strategy based on workload analysis.

public SimdExecutionStrategy SelectOptimalStrategy(WorkloadProfile profile, long elementCount)

Parameters

profile WorkloadProfile

Workload profile.

elementCount long

Number of elements.

Returns

SimdExecutionStrategy

Selected execution strategy.