Installation
Although xtensor-blas
is a header-only library, we provide standardized means to install it, with package managers or with cmake.
Besides the xtensor headers, all these methods place the cmake project configuration file in the right location so that third-party projects can use cmake’s find_package to locate xtensor headers.
See also
Read the Performance and Linking chapter on how to link against BLAS and improve performance
Using the conda-forge package
A package for xtensor-blas is available for the mamba (or conda) package manager.
mamba install -c conda-forge xtensor-blas
From source with cmake
You can install xtensor-blas
from source with cmake.
Note that you need to have a BLAS installation available (e.g. OpenBLAS, MKL …).
On Unix platforms, from the source directory:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/prefix ..
make install
On Windows platforms, from the source directory:
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=/path/to/prefix ..
nmake
nmake install