mirror of https://github.com/KLayout/klayout.git
Merge 08ac892e4e into 6d6596aedd
This commit is contained in:
commit
4cab7447b3
|
|
@ -30,6 +30,14 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
#if defined(__cpp_lib_execution)
|
||||
#include <execution>
|
||||
#define PARALLEL_EXEC_POLICY std::execution::par,
|
||||
#else
|
||||
#define PARALLEL_EXEC_POLICY
|
||||
#endif
|
||||
|
||||
// #define DEBUG_DUMP_ESSENTIAL_EDGES
|
||||
|
||||
|
|
@ -269,7 +277,7 @@ ConvexDecomposition::hertel_mehlhorn_decomposition (Triangulation &tris, const C
|
|||
|
||||
if (! new_points.empty ()) {
|
||||
|
||||
std::sort (new_points.begin (), new_points.end (), less_compare_func<db::DPoint> ());
|
||||
std::sort (PARALLEL_EXEC_POLICY new_points.begin (), new_points.end (), less_compare_func<db::DPoint> ());
|
||||
new_points.erase (std::unique (new_points.begin (), new_points.end (), equal_compare_func<db::DPoint> ()), new_points.end ());
|
||||
|
||||
// Insert the new points and make connections
|
||||
|
|
@ -332,7 +340,7 @@ ConvexDecomposition::hertel_mehlhorn_decomposition (Triangulation &tris, const C
|
|||
}
|
||||
}
|
||||
|
||||
std::sort (sorted_edges.begin (), sorted_edges.end (), SortAngleAndEdgesByEdgeLength ());
|
||||
std::sort (PARALLEL_EXEC_POLICY sorted_edges.begin (), sorted_edges.end (), SortAngleAndEdgesByEdgeLength ());
|
||||
|
||||
for (auto i = sorted_edges.end (); i != sorted_edges.begin (); ) {
|
||||
--i;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,14 @@
|
|||
#include "dbLayout.h"
|
||||
|
||||
#include <limits>
|
||||
#include <algorithm>
|
||||
|
||||
#if defined(__cpp_lib_execution)
|
||||
#include <execution>
|
||||
#define PARALLEL_EXEC_POLICY std::execution::par,
|
||||
#else
|
||||
#define PARALLEL_EXEC_POLICY
|
||||
#endif
|
||||
|
||||
namespace db
|
||||
{
|
||||
|
|
@ -111,7 +119,7 @@ layer_op<Sh, StableTag>::erase (Shapes *shapes)
|
|||
std::vector<bool> done;
|
||||
done.resize (m_shapes.size (), false);
|
||||
|
||||
std::sort (m_shapes.begin (), m_shapes.end ());
|
||||
std::sort (PARALLEL_EXEC_POLICY m_shapes.begin (), m_shapes.end ());
|
||||
|
||||
typename std::vector<Sh>::const_iterator s_begin = m_shapes.begin ();
|
||||
typename std::vector<Sh>::const_iterator s_end = m_shapes.end ();
|
||||
|
|
|
|||
Loading…
Reference in New Issue