Installation

Before using the library, you can try it online.

Multi has no external dependencies and can be used immediately after downloading.

git clone https://gitlab.com/correaa/boost-multi.git

Multi doesn’t require installation since a single header is enough to use the entire core library;

#include <multi/array.hpp>

int main() { ... }

The library can still be installed with CMake. The header (and CMake) files will be installed in the chosen prefix location (by default, /usr/local/include/multi and /usr/local/share/multi).

cd boost-multi
mkdir -p build && cd build
cmake . -B ./build  # --install-prefix=$HOME/.local
cmake --install ./build  # or sudo ...

Testing the library requires Boost.Core (headers), installed for example, via sudo apt install cmake git g++ libboost-test-dev make or sudo dnf install boost-devel cmake gcc-c++ git. A CMake build system is provided to compile and run basic tests.

ctest -C ./build

Once installed, other CMake projects (targets) can depend on Multi by adding a simple add_subdirectory(my_multi_path) or by find_package:

find_package(multi)  # see https://gitlab.com/correaa/boost-multi

Alternatively to the library can be fetched on demand:

include(FetchContent)
FetchContent_Declare(multi GIT_REPOSITORY https://gitlab.com/correaa/boost-multi.git)
FetchContent_MakeAvailable(multi)
...
target_link_libraries(my_target PUBLIC multi)

The code requires any modern C++ compiler (or CUDA compiler) with standard C++17 support; for reference, (at least) any of: LLVM’s clang (5.0+) (libc++ and libstdc++), GNU’s g++ (7.1+), Nvidia’s nvcc (11.5+) and nvc++ (22.7+), Intel’s icpx (2022.0.0+) and icc (2021.1.2+, deprecated), Baxter’s circle (build 202+), Zig in c++ mode (v0.9.0+), Edison Design’s EDG (6.5+) and Microsoft’s MSVC (+14.1).

(Multi code inside CUDA kernel can be compiled with nvcc and with clang (in CUDA mode). Inside HIP code, it can be compiled with AMD’s clang rocm (5.0+).)

Optional adaptor sublibraries (included in multi/adaptors/) have specific dependencies: fftw, , lapack, thurst, or CUDA (all of them can be installed with sudo apt install libfftw3-dev lib64-dev liblapack64-dev libthrust-dev nvidia-cuda-dev or sudo dnf install fftw-devel …​. )