Skip to content

Commit

Permalink
fix: omp parallel search wrapped with guard
Browse files Browse the repository at this point in the history
  • Loading branch information
chessplayer123 committed Jun 16, 2024
1 parent 189a345 commit 5af2826
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/intersection_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ TEST_CASE("Mesh intersection", "[benchmark][ray][mesh]") {
meter.measure([&ray, &mesh] { return ray.intersects(mesh); });
};

#ifdef RMI_INCLUDE_OMP
for (int threads_count = 2; threads_count <= 8; threads_count *= 2) {
generator.reset();
BENCHMARK_ADVANCED(concat("Parallel <", threads_count, "> search ", mesh.size()))(auto meter) {
Expand All @@ -109,6 +110,7 @@ TEST_CASE("Mesh intersection", "[benchmark][ray][mesh]") {
});
};
}
#endif
}


Expand Down

0 comments on commit 5af2826

Please sign in to comment.