Taskflow  2.7.0
Release 2.6.0 (2020/08/25)

Taskflow 2.6.0 is the 8th release in the 2.x line! This release includes several new changes such as CPU-GPU tasking, algorithm collection, enhanced web-based profiler, documentation, and unit tests.

We have a new webpage for Taskflow!

Download

Taskflow 2.6.0 can be downloaded from here.

New Features

  • added explicit join behavior of tf::Subflow (see Join a Subflow and Fibonacci Number)
  • added version macro (TF_VERSION, TF_MAJOR_VERSION, TF_MINOR_VERSION, TF_PATCH_VERSION) to retrieve version info programmatically (tf::version)
  • added TF_BUILD_TESTS and TF_BUILD_EXAMPLES (default on) to let users disable the build of tests and examples (see Available CMake Options)
  • renamed tf::Taskflkow::parallel_for to tf::Taskflow::for_each to follow the STL convention
  • redesigned tf::Taskflow::for_each and tf::Taskflow::for_each_index using OpenMP-styled scheduling algorithms; this redesign largely improved the performance of parallel-for using a single dynamic task return, but it breaks the previous API that returned a std::pair of tasks to synchronize on a set of static parallel-for tasks. Yet, we believe adopting this change is not difficult (see A0: Parallel Iterations).
    // index-based parallel-for in the range [0, 100) with the step size equal to one
    tf::Task task1 = taskflow.for_each_index(0, 100, 1,
    [](int id) { std::cout << "parallel for on index" << id << '\n'; }
    );
    // iterator-based parallel-for in the range [first, last)
    tf::Task task2 = taskflow.for_each(first, last,
    [](auto item) { std::cout << "parallel for on object " << item << '\n'; }
    );
  • added multiple unit tests for tf::Taskflow::for_each and tf::Taskflow::for_each_index at different partition algorithms; we have implemented our partition algorithms based on the OpenMP library implementation of LLVM and GCC.
  • added Mandelbrot application in the benchmark to evaluate the performance of parallel-for
  • redesigned tf::Taskflow::reduce and tf::Taskflow::transform_reduce based on the parallel architecture of tf::Taskflow::for_each (see A1: Parallel Reduction).

Bug Fixes

  • fixed the bug of iteratively detaching a subflow from a run loop or a condition loop (see Detach a Subflow)
  • fixed the bug of conflict macro with boost (#184)

Deprecated Items

  • removed two methods, tf::detached and tf::joined, due to the new join/detach behavior

Miscellaneous Items