Leverage execution policies in dbShapes and PLC decomposition - #2367
Open
nikosavola wants to merge 2 commits into
Open
nikosavola wants to merge 2 commits into
nikosavola wants to merge 2 commits into
Conversation
nikosavola
marked this pull request as ready for review
September 25, 2026 07:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same idea as #2364, but for
dbShapesand the PLC convex decomposition.dbShapes.cc:layer_op::erase/redosorts the shape vector before the erase walk.dbPLCConvexDecomposition.cc: Hertel-Mehlhorn sorts the newly inserted points and, for each vertex, the edges around that vertex by angle and length.Both sorts now use
std::execution::parwhere the standard library supports execution policies, and stay plainstd::sortwhere it doesn't (macOS/libc++, MSVC without TBB, C++11 builds). The guards are__cpp_lib_executionand__has_include(<execution>).Benchmark
Two cases from the
db_parallel_benchmarksGoogle Benchmark suite on theparallelize-rebasedbranch of my fork, on the same machine and with the same back-to-back serial/parallel procedure as #2365 (Xeon Gold 6248 @ 2.5 GHz, 16 cores, GCC 13.3,-O2, TBB).shapes_erasefills a flatShapescontainer and erases every second polygon, which is mostly sorting.plc_decompositionruns convex decompositions of a small concave polygon (Linux only).shapes_erase, 16384 polygons: