Skip to main content

sim_lib_interference_compute/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4//! Normalized tile-local `f32` lowering over the canonical Tensor executor.
5//!
6//! The host keeps physical geometry and absolute phase in `f64`. Each prepared
7//! tile exposes only bounded offsets and residual phase to ordinary open Tensor
8//! operations, so no executor needs interference-specific behavior.
9//!
10//! The lowering preserves the homogeneous, isotropic, three-dimensional scalar
11//! free-field scope. It does not add polarization, impedance, interfaces,
12//! obstacles, or diffraction. Amplitude-squared metrics are normalized
13//! observables, not physical intensity, power, or energy.
14
15mod constants;
16mod coordinates;
17mod dense;
18mod diff;
19mod evidence;
20mod lower;
21mod preflight;
22mod provider;
23mod resident;
24mod tile;
25
26pub use constants::{
27    PlaneTileConstants, PointTileConstants, SourcePhaseEstimate, SourceTileConstants,
28};
29pub use dense::{DenseExecutionEvidence, DenseF32Field, solve_dense_f32_cpu};
30pub use diff::{
31    ConformanceMetric, DifferentialError, DifferentialMaximum, DifferentialReport,
32    DifferentialTolerances, ScalarTolerance, compare_dense_to_reference,
33    compare_materialized_to_reference,
34};
35pub use evidence::{
36    HARDWARE_DETERMINISM_REPEATS, HardwareEvidenceMetrics, HardwareEvidenceReport,
37    HardwareMeasurementResult,
38};
39pub use lower::{LoweredTile, LoweringPlan};
40pub use preflight::{
41    LoweringError, PhaseBudget, PreflightCheck, REQUIRED_TENSOR_OPERATION_NAMES, TileProfile,
42};
43pub use provider::{
44    CpuFallbackReason, InterferenceComputeLib, ProviderRoute, TensorStudyConfig,
45    TensorStudySnapshot, TensorStudySolver, interference_compute_lib_symbol,
46};
47pub use tile::{PlaneTile, TilePlan};
48
49/// Checked modeled and optional physical-provider evidence recipes.
50pub static RECIPES: sim_cookbook::EmbeddedDir =
51    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
52
53#[cfg(test)]
54mod hardware_tests;
55#[cfg(test)]
56mod modeled_tests;
57#[cfg(test)]
58mod tests;