taskflow/taskflow

A General-purpose Task-parallel Programming System in C++

What it solves

Taskflow is a high-performance C++ library designed to simplify the creation of task-parallel programs. It addresses the complexity of managing dependencies between tasks that need to run in parallel, reducing the amount of code required to write efficient, scalable parallel software.

How it works

Taskflow provides a header-only framework where developers can define a task graph (a tf::Taskflow object) and execute it using an executor. It allows for the definition of tasks with explicit dependencies (using precede and succeed methods), as well as more complex patterns like recursive tasking (subflows), conditional tasking for control flow, and the composition of multiple task graphs into larger modular blocks.

Who it’s for

It is intended for developers writing high-performance computing (HPC) and scientific computing applications that require sophisticated parallelization across CPUs and GPUs (via Nvidia CUDA Graph integration).

Highlights

  • Header-only: Easy installation and integration into existing C++ projects.
  • Heterogeneous Computing: Supports offloading tasks to GPUs using Nvidia CUDA Graph.
  • Advanced Tasking: Supports recursive subflows, conditional tasking, and asynchronous tasking.
  • Built-in Profiler: Includes TFProf, a web-based interface for visualizing and profiling task execution.
  • Parallel Algorithms: Provides built-in support for common patterns like for_each, reduce, and sort using standard C++ syntax.

Related

  • Project
  • Project
  • Project
  • Project
  • Project