| 58 | } |
| 59 | |
| 60 | void 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 |
nothing calls this directly
no test coverage detected