Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/db/db/dbAsIfFlatRegion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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 (); ) {

Expand Down
Loading