The vecmath project provides a collection of vectorized based math utilities based on VecCore library.
- VecCore(starting from cee2341)
- Optional: Vc, UMESIMD as VecCore backends
mkdir build/ && cd build/
cmake ../ -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DVecCore_DIR="path to dir with VecCoreConfig.cmake" #if VecCore is not installed inside prefix
make install
In your CMakeLists.txt:
find_package(VecMath 0.1.0 REQUIRED COMPONENTS Vc) #or any other VecCore backend
#...
target_link_libraries(YOUR_TARGET VecMath::VecMath)
or if you can't use new cmake target_link_libraries
use old interface
include_directories(${VecMath_INCLUDE_DIRS})
add_definitions(${VecMath_DEFINITIONS})
target_link_libraries(YOUR_TARGET ${VecMath_LIBRARIES})
Pass this to cmake generation of your project to find VecMath(if it is not in CMAKE_INSTALL_PREFIX):
-DVecMath_DIR="Path to dir where VecMathConfig.cmake is installed"
Create git submodule in YOU_PROJECT/VecMath pointing to this repository
cd YOUR_PROJECT
git submodule add https://gitlab.cern.ch/GeantV/VecMath.git
In your CMakeLists.txt:
set(VecCore_BACKEND Vc) #or any other VecCore backend
add_subdirectory(VecMath)
#...
target_link_libraries(YOUR_TARGET VecMath)
Inside you .cxx file
#include <VecMath/Math.h>
#include <VecMath/Rng.h>