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
capabilitiesSimdSummaryconfigExecutorConfiguration
Methods
AnalyzeHistoricalPerformance(ExecutionContext)
Analyzes historical performance to inform future decisions.
public static HistoricalPerformanceAnalysis AnalyzeHistoricalPerformance(ExecutionContext context)
Parameters
contextExecutionContextExecution 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
elementCountlongNumber of elements.
contextExecutionContextExecution context.
Returns
- WorkloadProfile
Workload analysis profile.
Type Parameters
TElement 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
elementCountlongNumber of elements to process.
contextExecutionContextExecution context with thread-local information.
Returns
- SimdExecutionStrategy
Optimal execution strategy.
Type Parameters
TElement type.
EstimateCacheEfficiency(long, Type)
Estimates cache efficiency for the given workload.
public static double EstimateCacheEfficiency(long elementCount, Type elementType)
Parameters
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
elementCountlongNumber of elements.
Returns
- double
Vectorization potential (0.0 to 1.0).
Type Parameters
TElement 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
TElement type.
IsTypeOptimalForAvx512(Type)
Determines if the type is optimal for AVX-512 operations.
public static bool IsTypeOptimalForAvx512(Type elementType)
Parameters
elementTypeTypeElement 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
profileWorkloadProfileWorkload profile.
elementCountlongNumber of elements.
Returns
- SimdExecutionStrategy
Selected execution strategy.