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

public class BulkTurboEvaluator extends ScalarTurboEvaluator1
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:
  • Field Details

    • postfix

      protected MathExpression.Token[] postfix
    • compiledScalarHandle

      protected final MethodHandle 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

      protected KernelInterceptException interceptedKernel
  • Constructor Details

  • Method Details

    • compileToPrimitiveProgram

      protected final void compileToPrimitiveProgram()
    • getVarCount

      public int getVarCount()
    • compile

      public SIMDCompositeExpression compile() throws Throwable
      Description copied from class: ScalarTurboEvaluator1
      ////////////////////////////////////////UPDATE STARTS////////////////////////////////////////////////////////////////////////////////
      Specified by:
      compile in interface TurboExpressionEvaluator
      Overrides:
      compile in class ScalarTurboEvaluator1
      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.