Leverage execution policies inside `dbAsIfFlatRegion` object traversal

This commit is contained in:
Niko Savola 2026-06-03 14:58:11 +03:00
parent 6270877110
commit 75fd508582
No known key found for this signature in database
1 changed files with 9 additions and 1 deletions

View File

@ -43,6 +43,14 @@
#include "dbLayoutToNetlist.h"
#include <sstream>
#include <algorithm>
#if defined(__cpp_lib_execution)
#include <execution>
#define PARALLEL_EXEC_POLICY std::execution::par,
#else
#define PARALLEL_EXEC_POLICY
#endif
namespace db
{
@ -440,7 +448,7 @@ void AsIfFlatRegion::merge_polygons_to (db::Shapes &output, bool min_coherence,
addressable_polygons.inc ();
}
std::sort (polygons_by_prop_id.begin (), polygons_by_prop_id.end (), ComparePolygonsWithProperties ());
std::sort (PARALLEL_EXEC_POLICY polygons_by_prop_id.begin (), polygons_by_prop_id.end (), ComparePolygonsWithProperties ());
for (auto p = polygons_by_prop_id.begin (); p != polygons_by_prop_id.end (); ) {