oxiblas-ndarray-0.1.0 has been yanked.
OxiBLAS ndarray Integration
This crate provides seamless integration between OxiBLAS and the ndarray crate,
allowing you to use OxiBLAS BLAS and LAPACK operations directly on ndarray types.
Features
- Conversions: Efficient conversion between ndarray and OxiBLAS matrix types
- BLAS Operations: Level 1-3 BLAS operations (dot, gemv, gemm, etc.)
- LAPACK Operations: Decompositions (LU, QR, SVD, EVD, Cholesky)
- Linear Solve: Direct and iterative solvers
Quick Start
use ;
use *;
// Matrix multiplication
let a = from_shape_fn;
let b = from_shape_fn;
let c = matmul;
assert_eq!;
// Matrix-vector multiplication
let x = array!;
let y = matvec;
assert_eq!;
// Dot product
let v1 = array!;
let v2 = array!;
let d = dot_ndarray;
assert!;
LAPACK Operations
use array;
use *;
// Solve linear system
let a = array!;
let b = array!;
let x = solve_ndarray.unwrap;
// LU decomposition
let lu = lu_ndarray.unwrap;
let det = lu.det; // Determinant
// QR decomposition
let qr = qr_ndarray.unwrap;
// SVD
let svd = svd_ndarray.unwrap;
// Symmetric eigenvalue decomposition
let evd = eig_symmetric.unwrap;
Memory Layout
OxiBLAS uses column-major (Fortran) order internally. This crate handles both row-major and column-major ndarray layouts:
- Column-major arrays: Zero-copy or minimal-copy operations
- Row-major arrays: Automatic conversion (with copy) when needed
For best performance, use column-major arrays when possible:
use ;
use *;
// Create column-major array (preferred)
let a: = zeros_f;
assert!;
// Or convert existing row-major array
let row_major = zeros;
let col_major = to_column_major;