Skip to main content

Crate nabled_linalg

Crate nabled_linalg 

Source
Expand description

Ndarray-native linear algebra domains for the nabled workspace.

nabled-linalg provides decomposition routines, dense/sparse kernels, vector/tensor primitives, and matrix-function algorithms over ndarray data.

§Feature Flags

  1. blas: enables BLAS acceleration through ndarray/blas.
  2. openblas-system: enables provider-backed LAPACK paths via system OpenBLAS.
  3. openblas-static: enables provider-backed LAPACK paths via statically linked OpenBLAS.
  4. netlib-system: enables provider-backed LAPACK paths via system Netlib LAPACK.
  5. netlib-static: enables provider-backed LAPACK paths via statically linked Netlib LAPACK.
  6. magma-system: enables CUDA-backed MAGMA provider paths for supported decomposition domains.
  7. accelerator-rayon: enables selected parallel CPU kernels.
  8. accelerator-wgpu: enables bounded GPU (f32/f64) kernel paths.

§Execution Model

  1. Provider: decomposition implementation source (internal or selected LAPACK provider).
  2. Backend: operation-kernel execution target (CpuBackend, GpuBackend).
  3. Kernel: operation-family contract (for example matmat, sparse matvec, tensor contraction).

Provider selection and backend selection are orthogonal, compile-time concerns. Public APIs remain ndarray-native and backend/provider agnostic.

§Example

use ndarray::arr2;
use nabled_linalg::svd;

let a = arr2(&[[1.0_f64, 2.0], [3.0, 4.0]]);
let decomposition = svd::decompose(&a)?;
assert_eq!(decomposition.singular_values.len(), 2);

Modules§

accelerator
Compile-time backend contracts and accelerator kernels.
batched
Batched decomposition helpers over stacks of matrices.
cholesky
Cholesky decomposition over ndarray matrices.
eigen
Eigenvalue decompositions over ndarray matrices.
lu
LU decomposition over ndarray matrices.
matrix
Dense matrix pipeline primitives over ndarray arrays.
matrix_functions
Matrix functions over ndarray matrices.
orthogonalization
Orthogonalization routines over ndarray matrices.
polar
Polar decomposition over ndarray matrices.
qr
QR decomposition over ndarray matrices.
schur
Schur decomposition over ndarray matrices.
sparse
Sparse matrix primitives and iterative solves over CSR/CSC/COO structures.
svd
Singular value decomposition over ndarray matrices.
sylvester
Sylvester and Lyapunov solvers over ndarray matrices.
tensor
Tensor and cube primitives over ndarray higher-rank arrays.
triangular
Ndarray-native triangular solve kernels.
vector
Vector-first primitives for embedding-style workloads.