This repository contains some simple code examples. It helps to understand how to use the AFF3CT library in your code. The first step is to compile AFF3CT into a library.
Get the AFF3CT library:
git submodule update --init --recursiveCompile the library on Linux/MacOS/MinGW/WSL:
cd lib/aff3ct
mkdir build
cd build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-Wall -funroll-loops -march=native" \
-DAFF3CT_COMPILE_EXE="OFF" -DAFF3CT_COMPILE_STATIC_LIB="ON" -DAFF3CT_COMPILE_SHARED_LIB="ON"
cmake --build . -j 10
cmake --install . --prefix ../../../aff3ct_install
ln -sfn ../../../aff3ct_install/lib/cmake/aff3ct-* ../../../aff3ct_install/lib/cmake/aff3ctNow the AFF3CT library has been built in the lib/aff3ct/build folder.
The source codes of the examples are in the examples/ folder.
You can go in this folder to see the next steps.
Note
Those examples are documented here.
Warning
If you are encountering some problems with
cpptrace (typically when you
try to compile an example), you can simply disable it by adding
-DSPU_STACKTRACE="OFF" in the previous cmake command line as follow:
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-Wall -funroll-loops -march=native" \
-DAFF3CT_COMPILE_EXE="OFF" -DAFF3CT_COMPILE_STATIC_LIB="ON" -DAFF3CT_COMPILE_SHARED_LIB="ON" \
-DSPU_STACKTRACE="OFF"