Home

Awesome

NimLAPACK

Nim bindings for the LAPACK libraries.

These are low-level bindings generated via c2nim. See nimlapack.html for the API documentation.

For a higher-level linear algebra library based on this, check out neo.

Linking LAPACK implementations

The library requires to link some LAPACK implementation to perform the actual linear algebra operations. By default, it tries to link whatever is the default system-wide LAPACK implementation.

You can link against a different LAPACK implementation by a combination of:

See the tasks inside nimblas.nimble for a few examples.

Packages for various LAPACK implementations are available from the package managers of many Linux distributions. On OSX one can add the brew formulas from Homebrew Science, such as brew install homebrew/science/openblas. On Windows you can download pre-built binaries from the OpenBLAS github repository and add the library folder to your PATH or copy it into your executable folder.

You may also need to add suitable paths for the includes and library dirs. On OSX, this should do the trick

switch("clibdir", "/usr/local/opt/openblas/lib")
switch("cincludes", "/usr/local/opt/openblas/include")