Expand description
CJC Runtime System
Provides the core runtime infrastructure for the CJC programming language:
Buffer<T>: Deterministic memory allocation with COW (Copy-On-Write) semanticsTensor: N-dimensional tensor with element-wise ops, matmul, and stable reductionsObjectSlab/GcRef: Deterministic RC-backed object slab (replaces mark-sweep GC)FrameArena/ArenaStore: Bump-arena per function frame for non-escaping valuesValue: Tagged union for the CJC interpreteraccumulator: BinnedAccumulator for order-invariant deterministic summationdispatch: Hybrid summation strategy dispatch (Kahan vs Binned)
Re-exports§
pub use buffer::Buffer;pub use tensor::Tensor;pub use scratchpad::Scratchpad;pub use aligned_pool::AlignedPool;pub use aligned_pool::AlignedByteSlice;pub use paged_kv::KvBlock;pub use paged_kv::PagedKvCache;pub use gc::GcRef;pub use gc::GcHeap;pub use binned_alloc::BinnedAllocator;pub use frame_arena::FrameArena;pub use frame_arena::ArenaStore;pub use object_slab::ObjectSlab;pub use object_slab::SlabRef;pub use sparse::SparseCsr;pub use sparse::SparseCoo;pub use tensor_tiled::TiledMatmul;pub use det_map::DetMap;pub use det_map::murmurhash3;pub use det_map::murmurhash3_finalize;pub use det_map::value_hash;pub use det_map::values_equal_static;pub use value::Value;pub use value::Bf16;pub use value::FnValue;pub use error::RuntimeError;pub use tensor_dtype::DType;pub use tensor_dtype::TypedStorage;
Modules§
- accumulator
- BinnedAccumulator — Deterministic, order-invariant floating-point summation.
- aligned_
pool - binned_
alloc - Deterministic Binned Free Lists
- buffer
- builtins
- Shared builtin function implementations for CJC eval and MIR-exec.
- clustering
- Clustering algorithms — K-Means, DBSCAN, Agglomerative.
- complex
- Complex BLAS — ComplexF64 with Fixed-Sequence Arithmetic.
- datetime
- DateTime support for CJC.
- det_map
- differentiate
- Numerical Differentiation — deterministic finite-difference routines.
- dispatch
- Hybrid Summation Dispatch — Routes reductions to the appropriate accumulator.
- distributions
- Probability distributions — CDF, PDF, PPF for Normal, t, Chi-squared, F, Binomial, Poisson.
- error
- f16
- Half Precision (f16) — IEEE 754 binary16 with promotion to f64.
- fft
- FFT — Cooley-Tukey radix-2 FFT, inverse FFT, real FFT, PSD.
- frame_
arena - Frame Arena — bump allocator for non-escaping values.
- gc
- GC compatibility layer — thin wrapper over
ObjectSlab. - hypothesis
- Statistical hypothesis tests — t-test (one-sample, two-sample, paired), chi-squared goodness-of-fit, ANOVA, F-test.
- integrate
- Numerical Integration — deterministic quadrature routines.
- interpolate
- Interpolation & Curve Fitting
- json
- Hand-rolled JSON parser and emitter for CJC.
- kernel
- Raw-pointer kernel functions that operate directly on f64 slices.
- lib_
registry - Library Registry — informational trait for CJC library self-description.
- linalg
- ml
- ML Toolkit — loss functions, optimizers, activations, metrics.
- object_
slab - Object Slab — deterministic RC-backed replacement for mark-sweep GC.
- ode
- ODE / PDE Solver Infrastructure — Minimal Primitives
- optimize
- Optimization & Root Finding — deterministic numerical solvers.
- paged_
kv - quantized
- Quantized BLAS — i8/i4 dequantization into BinnedAccumulator.
- scratchpad
- sparse
- sparse_
eigen - Sparse Eigenvalue Solvers — Lanczos and Arnoldi
- sparse_
solvers - Iterative solvers for sparse linear systems.
- stationarity
- Stationarity tests for time series analysis. ADF (Augmented Dickey-Fuller), KPSS, and Phillips-Perron tests. All use Kahan-compensated sums for numerical determinism.
- stats
- Descriptive statistics — population & sample variance, sd, se, median, quantile, IQR, skewness, kurtosis, z-score, standardize.
- tensor
- tensor_
dtype - Typed tensor infrastructure: DType enum and TypedStorage.
- tensor_
pool - Thread-local tensor buffer pool for reusing allocations.
- tensor_
simd - SIMD acceleration for tensor operations (AVX2, 4-wide f64).
- tensor_
tiled - Tensor Tiling — L2-friendly tiled matrix multiplication.
- timeseries
- Time series analysis functions: ACF, PACF, EWMA, EMA, seasonal decomposition, differencing.
All floating-point reductions use
BinnedAccumulatorF64for deterministic results. - value
- window
- Sliding-window functions for CJC.