This project provides some templates to help parallelization.
Requires C++11 compiler (tested with Clang (version 6) and Visual Studio 2013, doesn't work with Visual Studio 2012).
mkdir build
cd build
cmake ..
make
Two examples are provided: returnValue and returnVoid.
returnValue shows you how to implement a function with a return value and get the result at the end of all the calculation.
returnVoid shows you how to implement a function with no return value.
Inside build folder;
./examples/returnValue/returnValue
./examples/returnVoid/returnVoid
.
├── CMakeLists.txt
├── examples
│ ├── CMakeLists.txt
│ ├── returnValue
│ │ └── src
│ │ └── main.cpp
│ └── returnVoid
│ └── src
│ └── main.cpp
└── lib
├── factory
│ └── FutureFactory.hxx
├── policy
│ ├── Policy.hxx
│ └── ResultPolicy.hxx
└── thread
└── FutureSynchronyzer.hxx
Fix std::bad_function_call inside returnValue example (appears randomly).