Environment

We’ll work with whatever machines you have available for development (remote access is fine). Preferably, you have the AVX2 ISA extension available (lscpu|grep avx2). Even better, you have have AVX-512 available for testing.

You will need git, cmake, and GCC. At least GCC 11, preferably version 13 or 14.

Local setup

Setup your environment with the paths you like. I’ll use the following variables:

src=~/src
prefix=~/local
export CMAKE_PREFIX_PATH=$prefix

Optional: install latest GCC from source

If you want to build it quicker add --disable-bootstrap to the GCC configure flags.

cd $src
git clone --depth 1 --single-branch --branch releases/gcc-14 \
  git://gcc.gnu.org/git/gcc

cd gcc
./contrib/download_prerequisites
mkdir build
cd build
../configure --prefix=$prefix/gcc14 --enable-languages=c++ --disable-multilib
make -j8
make install
export CC=$prefix/gcc14/bin/gcc
export CXX=$prefix/gcc14/bin/g++

Install Google Benchmark (master branch)

benchmark @ GitHub

cd $src
git clone --depth 1 https://github.com/google/benchmark.git
cd benchmark
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DBENCHMARK_ENABLE_TESTING=OFF \
  -DCMAKE_BUILD_TYPE=Release ..
make -j24
make install

Install vir-simd

vir-simd @ GitHub

cd $src
git clone https://github.com/mattkretz/vir-simd.git
cd vir-simd
make install prefix=$prefix

Prepare Benchmark Exercises

cd $src
git clone https://git.gsi.de/mkretz/simd-benchmark-exercises simd-benchmarks
cd simd-benchmarks
make -j8

results matching ""

    No results matching ""