Skip to content

lineCode/cpp-taskflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cpp-Taskflow

An easy-to-use and fast header-only library written in C++17 for task-based parallel programming.

Scale up Your Program with Cpp-Taskflow

The following example contains most of the syntax you need to use Cpp-Taskflow.

#include <taskflow.hpp>

// A simple example to capture the following task dependencies.
//
// TaskA---->TaskB---->TaskD
// TaskA---->TaskC---->TaskD
//
int main(){
  
  tf::Taskflow<> tf(std::thread::hardware_concurrency());

  auto [A, B, C, D] = tf.silent_emplace(
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; }
  );  

  A.precede(B);
  A.precede(C);
  B.precede(D);
  C.precede(D);

  tf.wait_for_all(); 

  return 0;
}

System Requirements

To use Cpp-Taskflow, you only need a C++17 compiler:

  • GNU C++ Compiler G++ v7.2 with -std=c++1z

Get Involved

Contributors

  • Tsung-Wei Huang
  • Chun-Xun Lin
  • You!

License

Copyright © 2018, Tsung-Wei Huang and Chun-Xun Lin. Released under the MIT license.

About

Fast C++ Parallel Programming with Task Dependencies

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 99.2%
  • CMake 0.8%