Registry / crypto / blas-sys

blas-sys

JSON →
library0.9.0rscratesunverified

Provides FFI bindings to the BLAS (Basic Linear Algebra Subprograms) Fortran library.

# Cargo.toml [dependencies] blas-sys = "0.9.0"
INSTALL
IMPORT
SIG · BLAS-SYS
B
blas-sys
cryptorustv0.9.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dgemm_
use blas_sys::c::dgemm_;

Calls BLAS dgemm_ to multiply two matrices.

use blas_sys::c::dgemm_; fn main() { // Example: C = alpha * A * B + beta * C let (m, n, k) = (2, 2, 2); let a = vec![1.0, 2.0, 3.0, 4.0]; let b = vec![5.0, 6.0, 7.0, 8.0]; let mut c = vec![0.0; 4]; let alpha = 1.0; let beta = 0.0; unsafe { dgemm_( b"N" as *const u8 as *const i8, b"N" as *const u8 as *const i8, &m, &n, &k, &alpha, a.as_ptr(), &m, b.as_ptr(), &k, &beta, c.as_mut_ptr(), &m, ); } println!("{:?}", c); }
Debug
Known issues
gotchaRequires a system BLAS library (e.g., OpenBLAS, Intel MKL) to be installed.
fix
Install a BLAS library or use a Rust-native alternative like `ndarray-linalg`.
affects: >=0.1.0
Upgrade
Version history
0.9.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
43 hits · last 30 days
node
38
Meta
1
OpenAI (training)
1
Resources
blas-sys — cargo add blas-sys · libregistry