https://github.com/xtensor-stack/xtensor-benchmark
Easy to use benchmarks for linear algebra frameworks
https://github.com/xtensor-stack/xtensor-benchmark
Last synced: 9 months ago
JSON representation
Easy to use benchmarks for linear algebra frameworks
- Host: GitHub
- URL: https://github.com/xtensor-stack/xtensor-benchmark
- Owner: xtensor-stack
- License: bsd-3-clause
- Created: 2017-12-06T09:41:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-05T08:16:40.000Z (over 5 years ago)
- Last Synced: 2025-04-09T09:51:48.746Z (9 months ago)
- Language: C++
- Size: 104 KB
- Stars: 24
- Watchers: 5
- Forks: 8
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Benchmarks for linear algebra frameworks
This benchmarking suite allows a direct comparison of popular linear algebra frameworks in C++.
The libraries are easy-to-install using the conda package manager:
```
conda env create -f environment.yml
```
The environment.yml installs the following libraries:
- xtensor with xsimd
- Eigen3
- Armadillo
- Blitz++
After setting up the environment, it is advised to create a `build` directory, and execute `cmake`:
```
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBENCHMARK_ALL=ON
```
You should see a message for each found library, similar to the following:
```
COMPILING WITH
======================================
Found eigen : /home/myuser/miniconda3/envs/bench/include/eigen3
Found Blitz : /home/myuser/miniconda3/envs/bench/include | /home/myuser/miniconda3/envs/bench/lib/libblitz.so
Found Armadillo : /home/myuser/miniconda3/envs/bench/include | /home/myuser/miniconda3/envs/bench/lib/libarmadillo.so
Found xtensor : /home/myuser/miniconda3/envs/bench/include
Found xsimd : /home/myuser/miniconda3/envs/bench/include
```
This allows you to make sure you're compiling with the correct, up-to-date versions of the libraries.
To build and run the benchmarks, just use the following command:
```
make xbenchmark
```
If you are only interested in specific benchmarks, build with `make xtensor_benchmark` and then run manually `./xtensor_benchmark --benchmark_filter=my_benchmark`. The backend to the benchmarks is the popular google-benchmark suite, so look there for more documentation.