evalexpr_jit/types.rs
1use std::sync::Arc;
2
3/// Type alias for a JIT-compiled function that evaluates a single equation.
4///
5/// This represents a function that:
6/// - Takes a slice of input values corresponding to variables in order
7/// - Returns a single f64 result from evaluating the equation
8/// - Is both Send and Sync for thread safety
9pub type JITFunction = Arc<dyn Fn(&[f64]) -> f64 + Send + Sync>;
10
11/// Type alias for a JIT-compiled function that evaluates multiple equations at once.
12///
13/// This represents a function that:
14/// - Takes a slice of input values corresponding to variables
15/// - Takes a mutable slice to store the results
16/// - Evaluates multiple equations and writes results into the output slice
17/// - Is both Send and Sync for thread safety
18pub type CombinedJITFunction = Arc<dyn Fn(&[f64], &mut [f64]) + Send + Sync>;