https://github.com/root-project/vecmath
SIMD Vectorization Math Library, built on top of veccore
https://github.com/root-project/vecmath
Last synced: 5 months ago
JSON representation
SIMD Vectorization Math Library, built on top of veccore
- Host: GitHub
- URL: https://github.com/root-project/vecmath
- Owner: root-project
- License: other
- Created: 2018-06-08T06:42:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-23T19:50:52.000Z (almost 6 years ago)
- Last Synced: 2025-06-17T08:44:39.368Z (about 1 year ago)
- Language: CMake
- Size: 164 KB
- Stars: 9
- Watchers: 6
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Intro
The vecmath project provides a collection of vectorized based math utilities based on VecCore library.
# Requirements
+ VecCore(starting from cee2341)
+ Optional: Vc, UMESIMD as VecCore backends
# How to use.
## 1) Use VecMath installed package
### Install this library.
```bash
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
```
### Use it from your project
In your CMakeLists.txt:
```cmake
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
```cmake
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"`
## 2) Build VecMath in source as a git submodule
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:
```cmake
set(VecCore_BACKEND Vc) #or any other VecCore backend
add_subdirectory(VecMath)
#...
target_link_libraries(YOUR_TARGET VecMath)
```
## API
Inside you .cxx file
```cpp
#include
#include
```