Skip to content
Ivan Ukhov edited this page Nov 26, 2017 · 18 revisions

This page gives an overview of the BLASLAPACK family of packages.

There are three types of packages:

  • wrappers,
  • bindings, and
  • sources.

Wrappers operate on Rust types, such as isize and f32, whereas bindings operate on C types from libc, such as c_int and c_float. Internally, wrappers invoke the corresponding bindings with as little overhead as possible. Sources compile (if needed) and link to particular implementations of BLAS and LAPACK.

In order to be able to work with the chosen wrapper/binding package, one has to choose a source package as well and add it to the dependencies section in Cargo.toml along with the wrapper/binding package. For instance, Cargo.toml might look as follows:

[dependencies]
blas = "0.19"
openblas-src = "0.5"

Remember to mention the source package in the source code as well. For instance, main.rs might look as follows:

extern crate blas;
extern crate openblas_src;

The following sections list the available wrapper, binding, and source packages.

Wrappers

The following packages provide wrappers for BLAS and LAPACK:

The blas and cblas packages contain BLAS functions, whereas lapack and lapacke contain LAPACK functions. The blas and lapack packages contain Fortran functions, whereas cblas and lapacke contain C functions.

Bindings

The following packages provide bindings to BLAS and LAPACK:

The separation here is analogous to the one described in the previous section.

Sources

The following packages provide sources of BLAS and LAPACK:

In addition, there are the following packages that aggregate the above source packages in order to provide a single access point to them:

The former is meant to be used with BLAS-related packages, whereas the latter is meant to be used with LAPACK-related packages. In this case, the desired implementation is selected by activating an appropriate feature.

Clone this wiki locally