Release Notes » Release 3.7.0 (Master)

Taskflow 3.7.0 is the newest developing line to new features and improvements we continue to support. It is also where this documentation is generated. Many things are considered experimental and may change or break from time to time. While it may be difficult to be keep all things consistent when introducing new features, we continue to try our best to ensure backward compatibility.

Download

To download the newest version of Taskflow, please clone the master branch from Taskflow's GitHub.

System Requirements

To use Taskflow v3.7.0, you need a compiler that supports C++17:

  • GNU C++ Compiler at least v8.4 with -std=c++17
  • Clang C++ Compiler at least v6.0 with -std=c++17
  • Microsoft Visual Studio at least v19.27 with /std:c++17
  • AppleClang Xcode Version at least v12.0 with -std=c++17
  • Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17
  • Intel C++ Compiler at least v19.0.1 with -std=c++17
  • Intel DPC++ Clang Compiler at least v13.0.0 with -std=c++17 and SYCL20

Taskflow works on Linux, Windows, and Mac OS X.

Release Summary

This release introduces a new exception interface to help identify C++ errors in taskflow programs. Additionally, this release enhances the scheduling performance through integration of C++20 atomic-wait into scheduler, executor, and notifier.

New Features

Taskflow Core

  • Improved scheduling performance of dependent asynchronous tasks
  • Improved scheduling performance of module task by removing busy looping
  • Improved tf::Executor::wait_for_all using C++20 atomic wait
  • Improved tf::Notifier using C++20 atomic wait
  • Improved worker-thread ID mapping performance using C++20 atomic wait
  • Added -Wshadow to the compilation check
  • Added tf::AsyncTask::is_done to query the completion status of an async task
  • Added tf::Taskflow::remove_dependency to remove dependencies from the graph
  • Added support for exception in tf::Taskflow and tf::Executor
tf::Executor executor;
tf::Taskflow taskflow;
taskflow.emplace([](){ throw std::runtime_error("exception"); });
try {
  executor.run(taskflow).get();
}
catch(const std::runtime_error& e) {
  std::cerr << e.what() << std::endl;
}
  • Modified the CI to exclude exception test under sanitizers
  • Modified the tf::PartitionerBase to allow defining custom closure wrappers
std::atomic<int> count = 0;
tf::Taskflow taskflow;
taskflow.for_each_index(0, 100, 1, 
  [](){                 
    printf("%d\n", i); 
  },
  tf::StaticPartitioner(0, [](auto&& closure){
    // do something before invoking the partitioned task
    // ...
    
    // invoke the partitioned task
    closure();

    // do something else after invoking the partitioned task
    // ...
  }
);
executor.run(taskflow).wait();

Utilities

Bug Fixes

Breaking Changes

  • Renamed tf::Runtime::join to tf::Runtime::corun_all
  • Removed tf::WorkerInterface due to the support of exception

Documentation

Miscellaneous Items

We have published Taskflow in the following venues:

Please do not hesitate to contact Dr. Tsung-Wei Huang if you intend to collaborate with us on using Taskflow in your scientific computing projects.