Linear algebra package for Rust with rust-ndarray.
Currently three LAPACKE implementations are supported and tested:
There are two ways to link LAPACKE backend:
There are three features corresponding to the backend implementations (openblas
/ netlib
/ intel-mkl
):
toml
[depencdencies]
ndarray = "0.10"
ndarray-linalg = { version = "0.8", features = ["openblas"] }
For the sake of linking flexibility, you can provide LAPACKE implementation (as an extern crate
) yourself.
You should link a LAPACKE implementation to a final crate (like binary executable or dylib) only, not to a Rust library.
```toml [depencdencies] ndarray = "0.10" ndarray-linalg = "0.8" openblas-src = "0.5" # or another backend of your choice
```
You must add extern crate
to your code in this case:
rust
extern crate ndarray;
extern crate ndarray_linalg;
extern crate openblas_src; // or another backend of your choice
If you creating a library depending on this crate, we encourage you not to link any backend for flexibility:
toml
[depencdencies]
ndarray = "0.10"
ndarray-linalg = { version = "0.8", default-features = false }
However, if you hope simplicity instead of the flexibility, you can link your favorite backend in the way described above.
See examples directory.