Expand description
Linear Algebra & Matrix Solvers - Zero-Allocation Implementation
This module provides fixed-size stack-based linear algebra solvers for eigenvalue problems, linear systems, and tensor operations suitable for the #![no_std] environment of Qualia-DB.
Modules§
- cholesky
- Dynamic-size, caller-owned-buffer decompositions (nalgebra-parity, zero-heap).
Cholesky decomposition
A = L·Lᵀfor symmetric positive-definite matrices. - eigen
- Symmetric eigendecomposition — closed-form 3×3 + general Jacobi (caller-owned). Symmetric eigendecomposition — the engine’s single home for eigenvalues of a symmetric matrix.
- gemm
- Dynamic-size general matrix multiply (caller-owned, zero-heap) — the canonical
dense-GEMM core the specialized libs and the GPU
coop_gemvbackend share. Dynamic-size general matrix multiply (GEMM) — the canonical dense-linear-algebra core. - lu
- Dynamic LU decomposition (partial pivoting) + determinant — canonical
n×nLU. Dynamic LU decomposition with partial pivoting (P·A = L·U) and determinant. - qr
- Householder QR factorisation + least-squares solve (caller-owned, zero-heap).
Householder QR decomposition
A = Q·Rand least-squares solve. - spectral
- Matrix-spectral bridge: characteristic polynomial + general (non-symmetric) eigenvalues. Matrix-spectral routines that bridge linear algebra and polynomial algebra: the characteristic polynomial and general (non-symmetric) eigenvalues.
- svd
- Thin singular value decomposition
A = U·Σ·Vᵀ(viaAᵀAeigendecomposition). Thin singular value decompositionA = U·Σ·Vᵀof a row-majorm×nmatrix. - vector
- Element-wise vector ops (add / Hadamard / scale / axpy) — residual stream + gated activations.
Dynamic element-wise vector operations — the foundational rank-1 linear algebra the
transformer is built from beyond GEMM: the residual connection (
x + sublayer(x)) is vector addition, and the gated activation (SwiGLU) uses the Hadamard product (element-wise multiply). Plain arithmetic; caller-owned, zero allocation.
Structs§
- Const
Tensor Contractor - Constant tensor contraction solver
- Fixed
Lanczos Eigensolver - Lanczos eigensolver for finding lowest eigenvalues
- Matrix4x4
- Fixed-size 4x4 matrix for stack-based operations
- Static
LuDecomposition - Static LU decomposition solver
- Tensor3x3x3
- Fixed-size 3x3x3 tensor
- Vector4
- Fixed-size 4-element vector