Evaluator
Evaluator()
An optimized evaluator of an expression.
Methods
Name | Description |
---|---|
compile | Compile the evaluator to a shared library using C++ and optionally inline assembly and load it. |
evaluate | Evaluate the expression for multiple inputs and return the result. |
evaluate_complex | Evaluate the expression for multiple inputs and return the result. |
evaluate_complex_flat | Evaluate the expression for multiple inputs that are flattened and return the flattened result. |
evaluate_flat | Evaluate the expression for multiple inputs that are flattened and return the flattened result. |
compile
compile(
Evaluator.
function_name,
filename,
library_name,='default',
inline_asm=3,
optimization_level=None,
compiler_path )
Compile the evaluator to a shared library using C++ and optionally inline assembly and load it. The inline ASM option can be set to ‘default’, ‘x64’, ‘aarch64’ or ‘none’.
evaluate
Evaluator.evaluate(inputs)
Evaluate the expression for multiple inputs and return the result.
evaluate_complex
Evaluator.evaluate_complex(inputs)
Evaluate the expression for multiple inputs and return the result.
evaluate_complex_flat
Evaluator.evaluate_complex_flat(inputs)
Evaluate the expression for multiple inputs that are flattened and return the flattened result. This method has less overhead than evaluate_complex
.
evaluate_flat
Evaluator.evaluate_flat(inputs)
Evaluate the expression for multiple inputs that are flattened and return the flattened result. This method has less overhead than evaluate
.