11 unstable releases (3 breaking)
new 0.3.1 | Apr 15, 2025 |
---|---|
0.3.0 | Apr 14, 2025 |
0.2.6 | Apr 3, 2025 |
0.2.5 | Mar 31, 2025 |
0.0.1 | Feb 8, 2025 |
#854 in Machine learning
871 downloads per month
Used in 2 crates
(via rstsr-openblas)
160KB
6K
SLoC
OpenBLAS FFI bindings
This crate contains OpenBLAS FFI bindings.
Current FFI version is OpenBLAS v0.3.29.
OpenBLAS (C/Fortran/ASM) source code is available on github.
This crate is not official bindgen project. It is originally intended to serve rust tensor toolkit RSTSR and rust electronic structure toolkit REST.
- Audience: Anyone uses OpenBLAS function may also find it useful, not only RSTSR or REST program developers.
- FFI-only: Program developer is not required to actually install every components in OpenBLAS. Rust FFI bindings is only declaration.
- Do not include LAPACK and LAPACKE: For LAPACK or LAPACKE, we refer to netlib LAPACK FFI bindings (such as
lapack-sys
orrstsr-lapack-ffi
). OpenBLAS's declaration of LAPACK functions is no difference to netlib LAPACK, but only different in implementation.
Cargo features
ilp64
: Useint64_t
for dimension specification, or lapack error code types if this feature specified. Otherwise, useint32_t
.- Please note that in
f77blas.rs
, error code is returned byc_int
; incblas.rs
, OpenBLAS utility functions usec_int
for input or output.
- Please note that in
quad_precision
andex_precision
: Specify type extra-precisionxdouble
type inf77blas.rs
. Probably few people will require these features.
Crate structure
header
: Header files copied (or renamed) from original source.scripts
: Script to generate FFI bindgens.src
: FFI bindings:f77blas
: Corresponds tof77blas.h
header in compiled library include (orcommon_interface.h
in OpenBLAS original source code). BLAS and some LAPACK functions that implemented by OpenBLAS, no post-suffix underscore.cblas
: Corresponds tocblas.h
header. Original CBLAS included, along with OpenBLAS utility functions (e.g.openblas_get_num_threads
) and some BLAS extensions (e.g.cblas_zgemm_batch
).