docs/release-3-7-0.html
| | Taskflow: A General-purpose Task-parallel Programming System |
Loading...
Searching...
No Matches
Release 3.7.0 (2024/05/07)
Taskflow 3.7.0 is the 8th release in the 3.x line! This release includes several new changes, such as exception support, improved scheduling algorithms, documentation, examples, and unit tests.
Taskflow 3.7.0 can be downloaded from here.
To use Taskflow v3.7.0, you need a compiler that supports C++17:
Taskflow works on Linux, Windows, and Mac OS X.
This release introduces a new exception interface to help identify C++ errors in taskflow programs.
-Wshadow to the compilation checktf::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;
}
class to create an executor
Definition executor.hpp:62
tf::Future< void > run(Taskflow &taskflow)
runs a taskflow once
Task emplace(C &&callable)
creates a static task
Definition flow_builder.hpp:1571
class to create a taskflow object
Definition taskflow.hpp:64
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();
tf::FlowBuilder::for_each_index
Task for_each_index(B first, E last, S step, C callable, P part=P())
constructs an index-based parallel-for task
class to construct a static partitioner for scheduling parallel algorithms
Definition partitioner.hpp:262
for_each.hppRevised Exception Handling
Revised Executor
Revised Partitioning Algorithm
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.