Expand description
§Chronix Compute Engine
CPU compute engine for Chronix analytics operations — dot products, matrix solving, exponential smoothing, differencing, autocorrelation, and batch statistics. Built on multi-tier SIMD acceleration and rayon parallelism.
§Architecture
┌──────────────────────────────────┐
│ ComputeEngine trait │
├──────────────────────────────────┤
│ batch_dot_product() │
│ batch_matrix_solve() │
│ batch_exponential_smooth() │
│ batch_difference() │
│ batch_autocorrelation() │
└──────────────┬───────────────────┘
│
┌─────┴────┐
│ CpuEngine │
│ rayon+SIMD│
└───────────┘§SIMD Operations
Multi-tier SIMD for common statistical operations:
simd_sum,simd_mean,simd_variance,simd_min_max,simd_dot_product,simd_std_dev- x86_64: runtime-detected AVX-512F (8×f64) → AVX2+FMA (4×f64) → SSE2 (2×f64, baseline)
- aarch64: NEON (2×f64, baseline)
- Scalar 4-wide ILP fallback on other architectures
simd_tier()returns the active tier for diagnostics
§Buffer Pool
BufferPool<T> provides reusable Vec<T> to minimize allocation overhead
in hot compute paths.
Structs§
- Buffer
Pool - A pool of reusable
Vec<T>buffers that avoids repeated allocation on hot compute paths:get()hands out a cleared buffer,put()returns it. - Compute
Config - Configuration for the compute engine.
- CpuEngine
- CPU compute engine using SIMD and rayon parallelism.
Enums§
- Compute
Error - Errors from compute operations.
Traits§
- Compute
Engine - Compute engine trait — defines batch numerical operations used by forecast, anomaly detection, and multivariate engines.
Functions§
- simd_
dot_ product - Computes the dot product of two equal-length slices using SIMD.
- simd_
mean - Computes the arithmetic mean of a slice.
- simd_
mean_ variance - Two-pass mean + sample variance using SIMD kernels.
- simd_
min_ max - Computes the minimum and maximum of a slice simultaneously using SIMD.
- simd_
population_ variance - Computes the population variance of the slice using SIMD (divides by
n). - simd_
range_ filter_ i64 - SIMD-accelerated timestamp range filter.
- simd_
std_ dev - Computes the sample standard deviation.
- simd_
sum - Computes the sum of a slice with multi-tier SIMD acceleration and Kahan (compensated) summation for numerical stability.
- simd_
tier - Returns a human-readable string describing the active SIMD tier.
- simd_
variance - Computes the population variance given a precomputed mean.