mirror of https://github.com/KLayout/klayout.git
Merge 7e6119c777 into 6d6596aedd
This commit is contained in:
commit
4cb06aa755
|
|
@ -454,3 +454,7 @@ INCLUDEPATH += $$TL_INC $$GSI_INC
|
|||
DEPENDPATH += $$TL_INC $$GSI_INC
|
||||
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
|
||||
|
||||
packagesExist(tbb) {
|
||||
LIBS += -ltbb
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
#if __cplusplus >= 201703L
|
||||
#if __has_include(<execution>)
|
||||
#include <execution>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_lib_execution)
|
||||
#define PARALLEL_EXEC_POLICY std::execution::par,
|
||||
#else
|
||||
#define PARALLEL_EXEC_POLICY
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
|
|
@ -29,6 +40,7 @@
|
|||
#include "tlProgress.h"
|
||||
#include "gsi.h"
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
|
|
@ -2237,7 +2249,7 @@ EdgeProcessor::redo_or_process (const std::vector<std::pair<db::EdgeSink *, db::
|
|||
} else {
|
||||
|
||||
// step 2: find intersections
|
||||
std::sort (mp_work_edges->begin (), mp_work_edges->end (), edge_ymin_compare<db::Coord> ());
|
||||
std::sort (PARALLEL_EXEC_POLICY mp_work_edges->begin (), mp_work_edges->end (), edge_ymin_compare<db::Coord> ());
|
||||
|
||||
y = edge_ymin ((*mp_work_edges) [0]);
|
||||
future = mp_work_edges->begin ();
|
||||
|
|
@ -2422,7 +2434,7 @@ EdgeProcessor::redo_or_process (const std::vector<std::pair<db::EdgeSink *, db::
|
|||
gs.reset ();
|
||||
gs.reserve (n_props);
|
||||
|
||||
std::sort (mp_work_edges->begin (), mp_work_edges->end (), edge_ymin_compare<db::Coord> ());
|
||||
std::sort (PARALLEL_EXEC_POLICY mp_work_edges->begin (), mp_work_edges->end (), edge_ymin_compare<db::Coord> ());
|
||||
|
||||
y = edge_ymin ((*mp_work_edges) [0]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
#if __cplusplus >= 201703L
|
||||
#if __has_include(<execution>)
|
||||
#include <execution>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_lib_execution)
|
||||
#define PARALLEL_EXEC_POLICY std::execution::par,
|
||||
#else
|
||||
#define PARALLEL_EXEC_POLICY
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
|
|
@ -28,6 +39,7 @@
|
|||
#include "tlLog.h"
|
||||
#include "tlInt128Support.h"
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
|
@ -1838,7 +1850,7 @@ rasterize_impl (const db::polygon<C> &polygon, db::area_map<C> &am)
|
|||
}
|
||||
|
||||
// sort edges
|
||||
std::sort (edges.begin (), edges.end (), db::edge_ymin_compare<C> ());
|
||||
std::sort (PARALLEL_EXEC_POLICY edges.begin (), edges.end (), db::edge_ymin_compare<C> ());
|
||||
|
||||
typename std::vector <edge_type>::iterator c = edges.begin ();
|
||||
|
||||
|
|
@ -2761,7 +2773,7 @@ decompose_convex_to_trapezoids (const db::SimplePolygon &sp, bool horizontal, db
|
|||
}
|
||||
}
|
||||
|
||||
std::sort (edges.begin (), edges.end (), db::edge_ymin_compare<db::Coord> ());
|
||||
std::sort (PARALLEL_EXEC_POLICY edges.begin (), edges.end (), db::edge_ymin_compare<db::Coord> ());
|
||||
|
||||
db::Coord y = db::edge_ymin (edges.front ());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue