numr 0.17.0

Numerical computing and tensor library for Rust, in the role of NumPy: n-dimensional arrays, linear algebra, FFT, statistics and autograd on CPU, CUDA and WebGPU
Documentation
//! CPU runtime tensor operation implementations
//!
//! This module loads all operation implementations from the src/ops/cpu/ directory.
//! One file per operation type (unary, binary, reduce, etc.).

use super::{CpuClient, CpuRuntime};
use crate::ops::TensorOps;

// TensorOps is a supertrait that composes all individual operation traits.
// This empty impl satisfies the supertrait requirement.
impl TensorOps<CpuRuntime> for CpuClient {}

// Load all CPU operation implementations from src/ops/cpu/.
//
// THIS LIST IS THE MODULE TREE for src/ops/cpu/. That directory has no mod.rs
// and `crate::ops` declares no `mod cpu`, so a file added under src/ops/cpu/
// is compiled ONLY if it gets a `#[path]` + `mod` entry here.
#[path = "../../ops/cpu/type_conversion.rs"]
mod type_conversion;

#[path = "../../ops/cpu/complex.rs"]
mod complex;

#[path = "../../ops/cpu/normalization.rs"]
mod normalization;

#[path = "../../ops/cpu/matmul.rs"]
mod matmul;

#[path = "../../ops/cpu/grouped_matmul.rs"]
mod grouped_matmul;

// Fused matmul+bias carries `MatmulOps::matmul_bias`'s body; `matmul` keeps the
// trait impl and delegates to it.
#[path = "../../ops/cpu/matmul_bias.rs"]
mod matmul_bias;

// I8 matmul widens to I32, so it cannot share `matmul`'s same-dtype generic path.
#[path = "../../ops/cpu/matmul_i8.rs"]
pub mod matmul_i8;

// Half matmul written as its F32 accumulator (`MatmulOps::matmul_wide`).
#[path = "../../ops/cpu/matmul_wide.rs"]
mod matmul_wide;

// Column-split parallelism for the tiled matmul paths. Rayon-only: without it
// there is no pool to split across and `matmul` takes its serial branch.
#[cfg(feature = "rayon")]
#[path = "../../ops/cpu/matmul_columns.rs"]
mod matmul_columns;

#[path = "../../ops/cpu/conv.rs"]
mod conv;

#[path = "../../ops/cpu/conv_fused.rs"]
mod conv_fused;

#[path = "../../ops/cpu/cumulative.rs"]
mod cumulative;

#[path = "../../ops/cpu/color.rs"]
mod color;

#[path = "../../ops/cpu/expansion.rs"]
mod expansion;
#[path = "../../ops/cpu/fwht.rs"]
mod fwht;
#[path = "../../ops/cpu/hypot.rs"]
mod hypot;
#[path = "../../ops/cpu/interval.rs"]
mod interval;
#[path = "../../ops/cpu/interval_lanes.rs"]
mod interval_lanes;
#[path = "../../ops/cpu/midpoint.rs"]
mod midpoint;
#[path = "../../ops/cpu/next_representable.rs"]
mod next_representable;
#[path = "../../ops/cpu/two_sum.rs"]
mod two_sum;

#[path = "../../ops/cpu/correctly_rounded.rs"]
mod correctly_rounded;

#[path = "../../ops/cpu/image.rs"]
mod image;

#[path = "../../ops/cpu/activation.rs"]
mod activation;

#[path = "../../ops/cpu/binary.rs"]
mod binary;

#[path = "../../ops/cpu/host_copy.rs"]
mod host_copy;

#[path = "../../ops/cpu/unary.rs"]
mod unary;

#[path = "../../ops/cpu/linalg.rs"]
mod linalg;

#[path = "../../ops/cpu/statistics.rs"]
mod statistics;

#[path = "../../ops/cpu/random.rs"]
mod random;

#[path = "../../ops/cpu/advanced_random.rs"]
mod advanced_random;

#[path = "../../ops/cpu/quasirandom.rs"]
mod quasirandom;

#[path = "../../ops/cpu/reduce.rs"]
mod reduce;

#[path = "../../ops/cpu/sorting.rs"]
mod sorting;

#[path = "../../ops/cpu/conditional.rs"]
mod conditional;

#[path = "../../ops/cpu/utility.rs"]
mod utility;

#[path = "../../ops/cpu/scalar.rs"]
mod scalar;

#[path = "../../ops/cpu/compare.rs"]
mod compare;

#[path = "../../ops/cpu/logical.rs"]
mod logical;

#[path = "../../ops/cpu/indexing.rs"]
mod indexing;

#[path = "../../ops/cpu/shape.rs"]
mod shape;

#[path = "../../ops/cpu/distance.rs"]
mod distance;

#[path = "../../ops/cpu/distance_units.rs"]
mod distance_units;

#[path = "../../ops/cpu/multivariate.rs"]
mod multivariate;

#[path = "../../ops/cpu/semiring_matmul.rs"]
mod semiring_matmul;

#[path = "../../ops/cpu/einsum.rs"]
mod einsum;

#[path = "../../ops/cpu/gemm_epilogue.rs"]
mod gemm_epilogue;

#[cfg(feature = "fp8")]
#[path = "../../ops/cpu/fp8_matmul.rs"]
mod fp8_matmul;

#[cfg(feature = "sparse")]
#[path = "../../ops/cpu/sparse_24.rs"]
mod sparse_24;