Class BulkTurboEvaluator
java.lang.Object
com.github.gbenroscience.parser.turbo.tools.ScalarTurboEvaluator1
com.github.gbenroscience.parser.turbo.tools.vector.BulkTurboEvaluator
- All Implemented Interfaces:
Savable,TurboExpressionEvaluator,Serializable
Non-SIMD Turbo Evaluator - High-Performance Block Vectorization Engine *
Strategy: Processes data in cache-friendly column-major blocks (e.g., 2048
elements) per instruction stream opcode. This eliminates runtime allocations
completely, flattens interpreter switch branches, and allows HotSpot JIT
Superword Level Parallelism (SLP) to natively auto-vectorize the inner
primitive primitive loops via AVX/Neon instructions.
* @author GBEMIRO
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic final classNested classes/interfaces inherited from class com.github.gbenroscience.parser.turbo.tools.ScalarTurboEvaluator1
ScalarTurboEvaluator1.AndroidFriendlyMethodHandles, ScalarTurboEvaluator1.MethodHandlePolyfill -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]protected final MethodHandleprotected intprotected KernelInterceptExceptionprotected double[]protected int[]protected MathExpression.Token[]protected int[]protected intFields inherited from class com.github.gbenroscience.parser.turbo.tools.ScalarTurboEvaluator1
errorLog, registry, SCALAR_GATEKEEPER_HANDLE, slots, VECTOR_2_GATEKEEPER_HANDLE, VECTOR_GATEKEEPER_HANDLE, willFoldConstants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompile()////////////////////////////////////////UPDATE STARTS////////////////////////////////////////////////////////////////////////////////protected final voidstatic final voidflatten(double[][] jagged, double[] flatBuffer) Turbo-flattens a jagged array into a destination array.intprotected static doublepow(double base, double exp) Optimized power utility for performance-critical math kernels.Methods inherited from class com.github.gbenroscience.parser.turbo.tools.ScalarTurboEvaluator1
acot, acsc, add, asec, combineArgs, compileScalar, cot, createConstantHandle, csc, cube, divide, executeQuadraticRoot, executeTartagliaRoot, executeTurboIntegral, executeTurboODE, executeTurboRoot, getDoubleFromArray, getNextResult, getOptimizedPowerHandle, getUnaryFunctionHandle, gradToRad, invokeComplexStats, invokeComplexStats1, invokeCustomFunction, invokeRegistryMethod, isWillFoldConstants, modulo, multiply, quad, scalarStatsGatekeeper, sec, setWillFoldConstants, square, subtract, unwrapToDouble, vectorNonStatsGatekeeper, vectorStatsGatekeeper
-
Field Details
-
postfix
-
compiledScalarHandle
-
opcodes
protected int[] opcodes -
targetSlots
protected int[] targetSlots -
literalConstants
protected double[] literalConstants -
argumentCount
protected int[] argumentCount -
varCount
protected int varCount -
instructionCount
protected int instructionCount -
interceptedKernel
-
-
Constructor Details
-
BulkTurboEvaluator
- Throws:
Throwable
-
-
Method Details
-
compileToPrimitiveProgram
protected final void compileToPrimitiveProgram() -
getVarCount
public int getVarCount() -
compile
Description copied from class:ScalarTurboEvaluator1////////////////////////////////////////UPDATE STARTS////////////////////////////////////////////////////////////////////////////////- Specified by:
compilein interfaceTurboExpressionEvaluator- Overrides:
compilein classScalarTurboEvaluator1- Returns:
- A FastCompositeExpression ready for evaluation
- Throws:
Throwable- if compilation fails
-
flatten
public static final void flatten(double[][] jagged, double[] flatBuffer) Turbo-flattens a jagged array into a destination array. Reuses the provided 'flatBuffer' to ensure ZERO heap allocation. -
pow
protected static double pow(double base, double exp) Optimized power utility for performance-critical math kernels.
-