Taskflow
2.4-master-branch
|
This page describes how to set up Taskflow in your project. We will also go through the building process of unit tests and examples.
Taskflow is header-only and there is no need for installation. Simply download the source and copy the headers under the directory taskflow/
to your project.
Taskflow is written in C++14 and is built on top of C++ standardized threading libraries to improve portability. To compile a Taskflow program, say simple.cpp
, you need to tell the compiler where to find the Taskflow header files and link it through the system thread library (usually POSIX threads in Linux-like systems). Take gcc for an example:
To use Taskflow, you only need a compiler that supports C++14:
Taskflow works on Linux, Windows, and Mac OS X.
Taskflow uses CMake to build examples and unit tests. We recommend using out-of-source build.
When the building completes, you can find the executables for examples and tests under the two folders, examples/
and unittests/
. By default, our CMake script automatically detects the existence of a CUDA compiler and compiles all GPU tests and examples if one is available. You may list a set of available options in the cmake.
We have developed a set of micro-benchmarks comparing Taskflow with OpenMP Task Dependency Clause and Intel TBB FlowGraph. To build these benchmarks, you need to configure the option TF_BUILD_BENCHMARKS
to ON
.
You can find the binary of each benchmark under the folder benchmarks/
.