MCPcopy Create free account
hub / github.com/ConorWilliams/libfork / uts_ztaskflow

Function uts_ztaskflow

bench/source/uts/taskflow.cpp:60–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void uts_ztaskflow(benchmark::State &state, int tree) {
61
62 state.counters["green_threads"] = state.range(0);
63
64 std::size_t n = state.range(0);
65 tf::Executor executor(n);
66 tf::Taskflow taskflow;
67
68 setup_tree(tree);
69
70 volatile int depth = 0;
71 Node root;
72
73 result r;
74
75 taskflow.emplace([&](tf::Subflow &sbf) {
76 r = uts(depth, &root, sbf);
77 return 4;
78 });
79
80 for (auto _ : state) {
81 uts_initRoot(&root, type);
82
83 executor.run(taskflow).wait();
84
85 // std::cout << "maxdepth: " << r.maxdepth << " size: " << r.size << " leaves: " << r.leaves << std::endl;
86 }
87
88 if (r != result_tree(tree)) {
89 std::cerr << "serial uts " << tree << " failed" << std::endl;
90 }
91}
92
93} // namespace
94

Callers

nothing calls this directly

Calls 6

setup_treeFunction · 0.85
uts_initRootFunction · 0.85
result_treeFunction · 0.85
runMethod · 0.80
utsFunction · 0.70
waitMethod · 0.45

Tested by

no test coverage detected