evalexpr-jit 0.2.3

JIT compilation and symbolic differentiation of evalexpr expressions with Cranelift.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::sync::Arc;

/// Type alias for a JIT-compiled function that evaluates a single equation.
///
/// This represents a function that:
/// - Takes a slice of input values corresponding to variables in order
/// - Returns a single f64 result from evaluating the equation
/// - Is both Send and Sync for thread safety
pub type JITFunction = Arc<dyn Fn(&[f64]) -> f64 + Send + Sync>;

/// Type alias for a JIT-compiled function that evaluates multiple equations at once.
///
/// This represents a function that:
/// - Takes a slice of input values corresponding to variables
/// - Takes a mutable slice to store the results
/// - Evaluates multiple equations and writes results into the output slice
/// - Is both Send and Sync for thread safety
pub type CombinedJITFunction = Arc<dyn Fn(&[f64], &mut [f64]) + Send + Sync>;