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

Function uts_omp

bench/source/uts/omp.cpp:61–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59};
60
61void uts_omp(benchmark::State &state, int tree) {
62
63 state.counters["green_threads"] = state.range(0);
64
65 std::size_t n = state.range(0);
66
67 setup_tree(tree);
68
69 volatile int depth = 0;
70 Node root;
71
72 result r;
73
74#pragma omp parallel num_threads(n)
75#pragma omp single
76 for (auto _ : state) {
77 uts_initRoot(&root, type);
78
79 r = uts(depth, &root);
80
81 // std::cout << "maxdepth: " << r.maxdepth << " size: " << r.size << " leaves: " << r.leaves << std::endl;
82 }
83
84 if (r != result_tree(tree)) {
85 std::cerr << "omp uts " << tree << " failed" << std::endl;
86 }
87}
88
89} // namespace
90

Callers

nothing calls this directly

Calls 4

setup_treeFunction · 0.85
uts_initRootFunction · 0.85
result_treeFunction · 0.85
utsFunction · 0.70

Tested by

no test coverage detected