Cpp-Taskflow
2.4-master-branch
|
Cpp-Taskflow is a fast C++ header-only library to help you quickly write parallel programs with complex task dependencies. Cpp-Taskflow is by far faster, more expressive, fewer lines of code, and easier for drop-in integration than existing parallel task programming libraries such as OpenMP Tasking and Intel Thread Building Block (TBB) FlowGraph.
Cpp-Taskflow has a unified interface for both static tasking and dynamic tasking, allowing users to quickly master our parallel task programming model in a natural idiom.
Static Tasking | Dynamic Tasking |
Cpp-Taskflow supports conditional tasking for you to implement cyclic and dynamic control flows that are otherwise difficult to do with existing task programming frameworks.
Cpp-Taskflow is composable. You can create large parallel graphs through composition of modular and reusable blocks that are easier to optimize at an individual scope.
Cpp-Taskflow supports heterogeneous tasking for you to accelerate a wide range of scientific computing applications by harnessing the power of CPU-GPU collaborative computing.
Cpp-Taskflow is committed to support both academic and industry research projects, making it reliable and cost-effective for long-term and large-scale developments. Our users say:
See a quick presentation and visit our GitHub to learn more about Cpp-Taskflow.
Cpp-Taskflow is header-only and there is no need for installation. Simply download the source and copy the headers under the taskflow
subdirectory to your project.
Here is a rather simple program to get you started.
The program creates four tasks A, B, C, and D. The dependency constraints force A to run before B and C, and D to run after B and C. The maximum concurrency is this example is two, where B and C can run at the same time.
Cpp-Taskflow is written in C++14 and is built on top of C++ standardized threading libraries. To compile the above program, you need to tell the compiler where to find the Cpp-Taskflow header files. For example, with gcc you need the -I
option.
The execution order of B and C might differ as they can run concurrently.
To use Cpp-Taskflow, you only need a compiler that supports C++14:
Cpp-Taskflow works on Linux, Windows, and OSX.
Cpp-Taskflow is open-source under permissive MIT license.