shape_runtime/simd_rolling/mod.rs
1//! SIMD-accelerated rolling window operations
2//!
3//! This module provides high-performance rolling window calculations using:
4//! - Portable SIMD via the `wide` crate (works on stable Rust)
5//! - Algorithmic optimizations (deque-based min/max, Welford's algorithm for std)
6//! - Smart thresholds to avoid SIMD overhead on small arrays
7
8mod clip;
9mod diff;
10mod minmax;
11mod std;
12mod window;
13
14// Re-export public API
15pub use clip::clip;
16pub use diff::{diff, pct_change};
17pub use minmax::{rolling_max_deque, rolling_min_deque};
18pub use std::{rolling_std, rolling_std_welford};
19pub use window::{rolling_mean, rolling_sum};
20
21/// Threshold for SIMD: arrays smaller than this use scalar fallback
22pub(crate) const SIMD_THRESHOLD: usize = 64;