taskflow.taskflow
importTaskflow CPU task graphs through the upstream tf C++ module
import tf;
mcpp add taskflow.taskflow@4.1.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
import std;
import tf;
bool taskflow_utility_ok();
int main() {
tf::Executor executor(2);
tf::Taskflow flow;
int left = 0;
int right = 0;
int joined = 0;
auto a = flow.emplace([&] { left = 20; });
auto b = flow.emplace([&] { right = 22; });
auto c = flow.emplace([&] { joined = left + right; });
a.precede(c);
b.precede(c);
executor.run(flow).get();
if (joined != 42) return 1;
std::vector<int> values(1024, 1);
int sum = 0;
tf::Taskflow reduction;
// …
tests/examples/taskflow-module/tests/taskflow.cpp · project tests/examples/taskflow-module
Build
- modules
tf- targets
taskflow (lib)- language
c++23- import std
- no
- include dirs
*
Sources (4)
*/modules/tf.core.cppm*/modules/tf.algorithm.cppm*/modules/tf.utility.cppm*/modules/tf.cppm
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
4.1.0 latest |
LinuxWindowsmacOS | source | 2107f90e315e… |