mirror of https://github.com/KLayout/klayout.git
Refactoring compound ops to support properties in general.
This commit is contained in:
parent
75e4282f01
commit
8eb181c05f
|
|
@ -1001,37 +1001,6 @@ AsIfFlatRegion::scaled_and_snapped (db::Coord gx, db::Coord mx, db::Coord dx, db
|
|||
return new_region.release ();
|
||||
}
|
||||
|
||||
template <class TR>
|
||||
static
|
||||
void region_cop_impl (AsIfFlatRegion *region, db::Shapes *output_to, db::CompoundRegionOperationNode &node)
|
||||
{
|
||||
db::local_processor<db::Polygon, db::Polygon, TR> proc;
|
||||
proc.set_base_verbosity (region->base_verbosity ());
|
||||
proc.set_description (region->progress_desc ());
|
||||
proc.set_report_progress (region->report_progress ());
|
||||
|
||||
db::RegionIterator polygons (region->begin_merged ());
|
||||
|
||||
std::vector<generic_shape_iterator<db::Polygon> > others;
|
||||
std::vector<bool> foreign;
|
||||
std::vector<db::Region *> inputs = node.inputs ();
|
||||
for (std::vector<db::Region *>::const_iterator i = inputs.begin (); i != inputs.end (); ++i) {
|
||||
if (*i == subject_regionptr () || *i == foreign_regionptr ()) {
|
||||
others.push_back (region->begin_merged ());
|
||||
foreign.push_back (*i == foreign_regionptr ());
|
||||
} else {
|
||||
others.push_back ((*i)->begin ());
|
||||
foreign.push_back (false);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<db::Shapes *> results;
|
||||
results.push_back (output_to);
|
||||
|
||||
compound_local_operation<db::Polygon, db::Polygon, TR> op (&node);
|
||||
proc.run_flat (polygons, others, foreign, &op, results);
|
||||
}
|
||||
|
||||
template <class TR>
|
||||
static
|
||||
void region_cop_with_properties_impl (AsIfFlatRegion *region, db::Shapes *output_to, db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
|
|
@ -1067,11 +1036,7 @@ EdgePairsDelegate *
|
|||
AsIfFlatRegion::cop_to_edge_pairs (db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
{
|
||||
std::unique_ptr<FlatEdgePairs> output (new FlatEdgePairs ());
|
||||
if (pc_skip (prop_constraint) && ! node.wants_properties ()) {
|
||||
region_cop_impl<db::EdgePair> (this, &output->raw_edge_pairs (), node);
|
||||
} else {
|
||||
region_cop_with_properties_impl<db::EdgePair> (this, &output->raw_edge_pairs (), node, prop_constraint);
|
||||
}
|
||||
region_cop_with_properties_impl<db::EdgePair> (this, &output->raw_edge_pairs (), node, prop_constraint);
|
||||
return output.release ();
|
||||
}
|
||||
|
||||
|
|
@ -1079,11 +1044,7 @@ RegionDelegate *
|
|||
AsIfFlatRegion::cop_to_region (db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
{
|
||||
std::unique_ptr<FlatRegion> output (new FlatRegion ());
|
||||
if (pc_skip (prop_constraint) && ! node.wants_properties ()) {
|
||||
region_cop_impl<db::Polygon> (this, &output->raw_polygons (), node);
|
||||
} else {
|
||||
region_cop_with_properties_impl<db::Polygon> (this, &output->raw_polygons (), node, prop_constraint);
|
||||
}
|
||||
region_cop_with_properties_impl<db::Polygon> (this, &output->raw_polygons (), node, prop_constraint);
|
||||
return output.release ();
|
||||
}
|
||||
|
||||
|
|
@ -1091,11 +1052,7 @@ EdgesDelegate *
|
|||
AsIfFlatRegion::cop_to_edges (db::CompoundRegionOperationNode &node, PropertyConstraint prop_constraint)
|
||||
{
|
||||
std::unique_ptr<FlatEdges> output (new FlatEdges ());
|
||||
if (pc_skip (prop_constraint) && ! node.wants_properties ()) {
|
||||
region_cop_impl<db::Edge> (this, &output->raw_edges (), node);
|
||||
} else {
|
||||
region_cop_with_properties_impl<db::Edge> (this, &output->raw_edges (), node, prop_constraint);
|
||||
}
|
||||
region_cop_with_properties_impl<db::Edge> (this, &output->raw_edges (), node, prop_constraint);
|
||||
return output.release ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,14 +61,14 @@ private:
|
|||
|
||||
// TODO: check, if the clip can be implemented by subsequent "cut" operations using all four borders
|
||||
// Is that more efficient?
|
||||
template <class P, class PC> static void
|
||||
clip_poly (const P &poly, const db::Box &box, std::vector <P> &clipped_poly, bool resolve_holes)
|
||||
template <class P, class Sink> static void
|
||||
clip_poly (const P &poly, const db::Box &box, Sink &psink, bool resolve_holes)
|
||||
{
|
||||
db::Box pbox = poly.box ();
|
||||
|
||||
// Polygon completely inside the clip box -> return the polygon
|
||||
if (pbox.inside (box)) {
|
||||
clipped_poly.push_back (poly);
|
||||
psink.put (poly);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -261,9 +261,7 @@ clip_poly (const P &poly, const db::Box &box, std::vector <P> &clipped_poly, boo
|
|||
ep.insert_sequence (edges.begin (), edges.end ());
|
||||
edges.clear ();
|
||||
|
||||
PC poly_cont (clipped_poly);
|
||||
|
||||
db::PolygonGenerator poly_gen (poly_cont);
|
||||
db::PolygonGenerator poly_gen (psink);
|
||||
poly_gen.min_coherence (false);
|
||||
poly_gen.resolve_holes (resolve_holes);
|
||||
|
||||
|
|
@ -275,13 +273,29 @@ clip_poly (const P &poly, const db::Box &box, std::vector <P> &clipped_poly, boo
|
|||
void
|
||||
clip_poly (const db::Polygon &poly, const db::Box &box, std::vector <db::Polygon> &clipped_poly, bool resolve_holes)
|
||||
{
|
||||
clip_poly<db::Polygon, db::PolygonContainer> (poly, box, clipped_poly, resolve_holes);
|
||||
db::PolygonContainer pc (clipped_poly);
|
||||
clip_poly (poly, box, pc, resolve_holes);
|
||||
}
|
||||
|
||||
void
|
||||
clip_poly (const db::SimplePolygon &poly, const db::Box &box, std::vector <db::SimplePolygon> &clipped_poly, bool resolve_holes)
|
||||
{
|
||||
clip_poly<db::SimplePolygon, db::SimplePolygonContainer> (poly, box, clipped_poly, resolve_holes);
|
||||
db::SimplePolygonContainer pc (clipped_poly);
|
||||
clip_poly (poly, box, pc, resolve_holes);
|
||||
}
|
||||
|
||||
void
|
||||
clip_poly (const db::PolygonWithProperties &poly, const db::Box &box, std::vector <db::PolygonWithProperties> &clipped_poly, bool resolve_holes)
|
||||
{
|
||||
db::PolygonContainerWithProperties pc (clipped_poly, poly.properties_id ());
|
||||
clip_poly (poly, box, pc, resolve_holes);
|
||||
}
|
||||
|
||||
void
|
||||
clip_poly (const db::SimplePolygonWithProperties &poly, const db::Box &box, std::vector <db::SimplePolygonWithProperties> &clipped_poly, bool resolve_holes)
|
||||
{
|
||||
db::SimplePolygonContainerWithProperties pc (clipped_poly, poly.properties_id ());
|
||||
clip_poly (poly, box, pc, resolve_holes);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "dbTypes.h"
|
||||
#include "dbBox.h"
|
||||
#include "dbPolygon.h"
|
||||
#include "dbObjectWithProperties.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -72,6 +73,30 @@ DB_PUBLIC void clip_poly (const db::SimplePolygon &poly, const db::Box &box, std
|
|||
*/
|
||||
DB_PUBLIC void clip_poly (const db::Polygon &poly, const db::Box &box, std::vector <db::Polygon> &clipped_poly, bool resolve_holes = true);
|
||||
|
||||
/**
|
||||
* @brief Clip a given simple polygon with the given box
|
||||
*
|
||||
* In the generic case, multiple polygons may be created.
|
||||
* This version copies the properties of the input polygon to the output container.
|
||||
*
|
||||
* @param poly The input polygon to clip
|
||||
* @param box The box at which to clip
|
||||
* @param clipped_poly Where the clip results are stored. The clip results are appended to this vector
|
||||
*/
|
||||
DB_PUBLIC void clip_poly (const db::SimplePolygonWithProperties &poly, const db::Box &box, std::vector <db::SimplePolygonWithProperties> &clipped_poly, bool resolve_holes = true);
|
||||
|
||||
/**
|
||||
* @brief Clip a given polygon with the given box
|
||||
*
|
||||
* In the generic case, multiple polygons may be created.
|
||||
* This version copies the properties of the input polygon to the output container.
|
||||
*
|
||||
* @param poly The input polygon to clip
|
||||
* @param box The box at which to clip
|
||||
* @param clipped_poly Where the clip results are stored. The clip results are appended to this vector
|
||||
*/
|
||||
DB_PUBLIC void clip_poly (const db::PolygonWithProperties &poly, const db::Box &box, std::vector <db::PolygonWithProperties> &clipped_poly, bool resolve_holes = true);
|
||||
|
||||
/**
|
||||
* @brief Clip a layout
|
||||
*
|
||||
|
|
|
|||
|
|
@ -78,20 +78,6 @@ CompoundRegionOperationNode::has_external_inputs () const
|
|||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
static void translate (db::Layout *layout, const std::vector<std::unordered_set<db::Polygon> > &in, std::vector<std::unordered_set<db::PolygonRef> > &out)
|
||||
{
|
||||
tl_assert (layout != 0);
|
||||
if (out.size () <= in.size ()) {
|
||||
out.resize (in.size ());
|
||||
}
|
||||
for (std::vector<std::unordered_set<db::Polygon> >::const_iterator r = in.begin (); r != in.end (); ++r) {
|
||||
std::unordered_set<db::PolygonRef> &o = out[r - in.begin ()];
|
||||
for (std::unordered_set<db::Polygon>::const_iterator p = r->begin (); p != r->end (); ++p) {
|
||||
o.insert (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void translate (db::Layout *layout, const std::vector<std::unordered_set<db::PolygonWithProperties> > &in, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &out)
|
||||
{
|
||||
tl_assert (layout != 0);
|
||||
|
|
@ -106,19 +92,6 @@ static void translate (db::Layout *layout, const std::vector<std::unordered_set<
|
|||
}
|
||||
}
|
||||
|
||||
static void translate (db::Layout *, const std::vector<std::unordered_set<db::PolygonRef> > &in, std::vector<std::unordered_set<db::Polygon> > &out)
|
||||
{
|
||||
if (out.size () <= in.size ()) {
|
||||
out.resize (in.size ());
|
||||
}
|
||||
for (std::vector<std::unordered_set<db::PolygonRef> >::const_iterator r = in.begin (); r != in.end (); ++r) {
|
||||
std::unordered_set<db::Polygon> &o = out[r - in.begin ()];
|
||||
for (std::unordered_set<db::PolygonRef>::const_iterator p = r->begin (); p != r->end (); ++p) {
|
||||
o.insert (p->obj ().transformed (p->trans ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void translate (db::Layout *, const std::vector<std::unordered_set<db::PolygonRefWithProperties> > &in, std::vector<std::unordered_set<db::PolygonWithProperties> > &out)
|
||||
{
|
||||
if (out.size () <= in.size ()) {
|
||||
|
|
@ -132,24 +105,6 @@ static void translate (db::Layout *, const std::vector<std::unordered_set<db::Po
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionOperationNode::compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::Polygon> > intermediate;
|
||||
intermediate.push_back (std::unordered_set<db::Polygon> ());
|
||||
implement_compute_local (cache, layout, cell, interactions, intermediate, proc);
|
||||
translate (layout, intermediate, results);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionOperationNode::compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::PolygonRef> > intermediate;
|
||||
intermediate.push_back (std::unordered_set<db::PolygonRef> ());
|
||||
implement_compute_local (cache, layout, cell, interactions, intermediate, proc);
|
||||
translate (layout, intermediate, results);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionOperationNode::compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -187,20 +142,6 @@ std::vector<db::Region *> CompoundRegionOperationPrimaryNode::inputs () const
|
|||
return is;
|
||||
}
|
||||
|
||||
void CompoundRegionOperationPrimaryNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::Polygon, db::Polygon>::subject_iterator i = interactions.begin_subjects (); i != interactions.end_subjects (); ++i) {
|
||||
results.front ().insert (i->second);
|
||||
}
|
||||
}
|
||||
|
||||
void CompoundRegionOperationPrimaryNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::PolygonRef, db::PolygonRef>::subject_iterator i = interactions.begin_subjects (); i != interactions.end_subjects (); ++i) {
|
||||
results.front ().insert (i->second);
|
||||
}
|
||||
}
|
||||
|
||||
void CompoundRegionOperationPrimaryNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties>::subject_iterator i = interactions.begin_subjects (); i != interactions.end_subjects (); ++i) {
|
||||
|
|
@ -236,20 +177,6 @@ std::vector<db::Region *> CompoundRegionOperationSecondaryNode::inputs () const
|
|||
return iv;
|
||||
}
|
||||
|
||||
void CompoundRegionOperationSecondaryNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::Polygon, db::Polygon>::intruder_iterator i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) {
|
||||
results.front ().insert (i->second.second);
|
||||
}
|
||||
}
|
||||
|
||||
void CompoundRegionOperationSecondaryNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::PolygonRef, db::PolygonRef>::intruder_iterator i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) {
|
||||
results.front ().insert (i->second.second);
|
||||
}
|
||||
}
|
||||
|
||||
void CompoundRegionOperationSecondaryNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties>::intruder_iterator i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) {
|
||||
|
|
@ -284,20 +211,6 @@ std::vector<db::Region *> CompoundRegionOperationForeignNode::inputs () const
|
|||
return iv;
|
||||
}
|
||||
|
||||
void CompoundRegionOperationForeignNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::Polygon, db::Polygon>::intruder_iterator i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) {
|
||||
results.front ().insert (i->second.second);
|
||||
}
|
||||
}
|
||||
|
||||
void CompoundRegionOperationForeignNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::PolygonRef, db::PolygonRef>::intruder_iterator i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) {
|
||||
results.front ().insert (i->second.second);
|
||||
}
|
||||
}
|
||||
|
||||
void CompoundRegionOperationForeignNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *) const
|
||||
{
|
||||
for (shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties>::intruder_iterator i = interactions.begin_intruders (); i != interactions.end_intruders (); ++i) {
|
||||
|
|
@ -555,7 +468,7 @@ void CompoundRegionLogicalBoolOperationNode::implement_compute_local (CompoundRe
|
|||
|
||||
const CompoundRegionOperationNode *node = child (ci);
|
||||
|
||||
bool any = node->compute_local_bool<T> (cache, layout, cell, child_interactions, proc);
|
||||
bool any = node->compute_local_bool (cache, layout, cell, child_interactions, proc);
|
||||
|
||||
if (m_op == And) {
|
||||
if (! any) {
|
||||
|
|
@ -660,50 +573,50 @@ void run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp, db::La
|
|||
}
|
||||
|
||||
static void
|
||||
init_region (db::Region &r, const std::unordered_set<db::PolygonRef> &p)
|
||||
init_region (db::Region &r, const std::unordered_set<db::PolygonRefWithProperties> &p)
|
||||
{
|
||||
for (std::unordered_set<db::PolygonRef>::const_iterator i = p.begin (); i != p.end (); ++i) {
|
||||
for (std::unordered_set<db::PolygonRefWithProperties>::const_iterator i = p.begin (); i != p.end (); ++i) {
|
||||
r.insert (i->obj ().transformed (i->trans ()));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
init_region (db::Region &r, const std::unordered_set<db::Polygon> &p)
|
||||
init_region (db::Region &r, const std::unordered_set<db::PolygonWithProperties> &p)
|
||||
{
|
||||
for (std::unordered_set<db::Polygon>::const_iterator i = p.begin (); i != p.end (); ++i) {
|
||||
for (std::unordered_set<db::PolygonWithProperties>::const_iterator i = p.begin (); i != p.end (); ++i) {
|
||||
r.insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
init_edges (db::Edges &ee, const std::unordered_set<db::Edge> &e)
|
||||
init_edges (db::Edges &ee, const std::unordered_set<db::EdgeWithProperties> &e)
|
||||
{
|
||||
for (std::unordered_set<db::Edge>::const_iterator i = e.begin (); i != e.end (); ++i) {
|
||||
for (std::unordered_set<db::EdgeWithProperties>::const_iterator i = e.begin (); i != e.end (); ++i) {
|
||||
ee.insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
write_result (db::Layout *layout, std::unordered_set<db::PolygonRef> &results, const db::Region &r)
|
||||
write_result (db::Layout *layout, std::unordered_set<db::PolygonRefWithProperties> &results, const db::Region &r)
|
||||
{
|
||||
for (db::Region::const_iterator p = r.begin (); ! p.at_end (); ++p) {
|
||||
results.insert (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
results.insert (db::PolygonRefWithProperties (db::PolygonRef (*p, layout->shape_repository ()), p.prop_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
write_result (db::Layout *, std::unordered_set<db::Polygon> &results, const db::Region &r)
|
||||
write_result (db::Layout *, std::unordered_set<db::PolygonWithProperties> &results, const db::Region &r)
|
||||
{
|
||||
for (db::Region::const_iterator p = r.begin (); ! p.at_end (); ++p) {
|
||||
results.insert (*p);
|
||||
results.insert (db::PolygonWithProperties (*p, p.prop_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
write_result (db::Layout *, std::unordered_set<db::Edge> &results, const db::Edges &e)
|
||||
write_result (db::Layout *, std::unordered_set<db::EdgeWithProperties> &results, const db::Edges &e)
|
||||
{
|
||||
for (db::Edges::const_iterator i = e.begin (); ! i.at_end (); ++i) {
|
||||
results.insert (*i);
|
||||
results.insert (db::EdgeWithProperties (*i, i.prop_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -728,20 +641,20 @@ run_poly_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db:
|
|||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::PolygonRef> &a, const std::unordered_set<db::PolygonRef> &b, std::unordered_set<db::PolygonRef> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::PolygonRefWithProperties> &a, const std::unordered_set<db::PolygonRefWithProperties> &b, std::unordered_set<db::PolygonRefWithProperties> &res)
|
||||
{
|
||||
run_poly_bool (op, layout, a, b, res);
|
||||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::Polygon> &a, const std::unordered_set<db::Polygon> &b, std::unordered_set<db::Polygon> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::PolygonWithProperties> &a, const std::unordered_set<db::PolygonWithProperties> &b, std::unordered_set<db::PolygonWithProperties> &res)
|
||||
{
|
||||
run_poly_bool (op, layout, a, b, res);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void
|
||||
run_poly_vs_edge_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<T> &a, const std::unordered_set<db::Edge> &b, std::unordered_set<db::Edge> &res)
|
||||
run_poly_vs_edge_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<T> &a, const std::unordered_set<db::EdgeWithProperties> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
if (op != CompoundRegionGeometricalBoolOperationNode::And) {
|
||||
return;
|
||||
|
|
@ -762,20 +675,20 @@ run_poly_vs_edge_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp
|
|||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::Polygon> &a, const std::unordered_set<db::Edge> &b, std::unordered_set<db::Edge> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::PolygonWithProperties> &a, const std::unordered_set<db::EdgeWithProperties> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
run_poly_vs_edge_bool (op, layout, a, b, res);
|
||||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::PolygonRef> &a, const std::unordered_set<db::Edge> &b, std::unordered_set<db::Edge> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::PolygonRefWithProperties> &a, const std::unordered_set<db::EdgeWithProperties> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
run_poly_vs_edge_bool (op, layout, a, b, res);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void
|
||||
run_edge_vs_poly_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::Edge> &a, const std::unordered_set<T> &b, std::unordered_set<db::Edge> &res)
|
||||
run_edge_vs_poly_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::EdgeWithProperties> &a, const std::unordered_set<T> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
if (op != CompoundRegionGeometricalBoolOperationNode::And && op != CompoundRegionGeometricalBoolOperationNode::Not) {
|
||||
return;
|
||||
|
|
@ -796,19 +709,19 @@ run_edge_vs_poly_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp
|
|||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::Edge> &a, const std::unordered_set<db::PolygonRef> &b, std::unordered_set<db::Edge> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::EdgeWithProperties> &a, const std::unordered_set<db::PolygonRefWithProperties> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
run_edge_vs_poly_bool (op, layout, a, b, res);
|
||||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::Edge> &a, const std::unordered_set<db::Polygon> &b, std::unordered_set<db::Edge> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::EdgeWithProperties> &a, const std::unordered_set<db::PolygonWithProperties> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
run_edge_vs_poly_bool (op, layout, a, b, res);
|
||||
}
|
||||
|
||||
static void
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::Edge> &a, const std::unordered_set<db::Edge> &b, std::unordered_set<db::Edge> &res)
|
||||
run_bool (CompoundRegionGeometricalBoolOperationNode::GeometricalOp op, db::Layout *layout, const std::unordered_set<db::EdgeWithProperties> &a, const std::unordered_set<db::EdgeWithProperties> &b, std::unordered_set<db::EdgeWithProperties> &res)
|
||||
{
|
||||
db::Edges ea, eb;
|
||||
init_edges (ea, a);
|
||||
|
|
@ -898,34 +811,34 @@ CompoundRegionGeometricalBoolOperationNode::implement_compute_local (CompoundReg
|
|||
if (res_a == Region && res_b == Region) {
|
||||
implement_bool<T, T, T, TR> (cache, layout, cell, interactions, results, proc);
|
||||
} else if (res_a == Region && res_b == Edges) {
|
||||
implement_bool<T, T, db::Edge, TR> (cache, layout, cell, interactions, results, proc);
|
||||
implement_bool<T, T, db::EdgeWithProperties, TR> (cache, layout, cell, interactions, results, proc);
|
||||
} else if (res_a == Edges && res_b == Region) {
|
||||
implement_bool<T, db::Edge, T, TR> (cache, layout, cell, interactions, results, proc);
|
||||
implement_bool<T, db::EdgeWithProperties, T, TR> (cache, layout, cell, interactions, results, proc);
|
||||
} else if (res_a == Edges && res_b == Edges) {
|
||||
implement_bool<T, db::Edge, db::Edge, TR> (cache, layout, cell, interactions, results, proc);
|
||||
implement_bool<T, db::EdgeWithProperties, db::EdgeWithProperties, TR> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionGeometricalBoolOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
|
@ -948,28 +861,28 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
static void insert (db::Layout *, const db::Shape &shape, std::unordered_set<db::Edge> &result)
|
||||
static void insert (db::Layout *, const db::Shape &shape, std::unordered_set<db::EdgeWithProperties> &result)
|
||||
{
|
||||
result.insert (shape.edge ());
|
||||
result.insert (db::EdgeWithProperties (shape.edge (), db::properties_id_type (0)));
|
||||
}
|
||||
|
||||
static void insert (db::Layout *, const db::Shape &shape, std::unordered_set<db::EdgePair> &result)
|
||||
static void insert (db::Layout *, const db::Shape &shape, std::unordered_set<db::EdgePairWithProperties> &result)
|
||||
{
|
||||
result.insert (shape.edge_pair ());
|
||||
result.insert (db::EdgePairWithProperties (shape.edge_pair (), db::properties_id_type (0)));
|
||||
}
|
||||
|
||||
static void insert (db::Layout *, const db::Shape &shape, std::unordered_set<db::Polygon> &result)
|
||||
static void insert (db::Layout *, const db::Shape &shape, std::unordered_set<db::PolygonWithProperties> &result)
|
||||
{
|
||||
db::Polygon p;
|
||||
db::PolygonWithProperties p;
|
||||
shape.polygon (p);
|
||||
result.insert (p);
|
||||
}
|
||||
|
||||
static void insert (db::Layout *layout, const db::Shape &shape, std::unordered_set<db::PolygonRef> &result)
|
||||
static void insert (db::Layout *layout, const db::Shape &shape, std::unordered_set<db::PolygonRefWithProperties> &result)
|
||||
{
|
||||
db::Polygon p;
|
||||
shape.polygon (p);
|
||||
result.insert (db::PolygonRef (p, layout->shape_repository ()));
|
||||
result.insert (db::PolygonRefWithProperties (db::PolygonRef (p, layout->shape_repository ()), db::properties_id_type (0)));
|
||||
}
|
||||
|
||||
const std::vector<db::Shapes *> &results ()
|
||||
|
|
@ -1046,14 +959,14 @@ void compound_region_generic_operation_node<TS, TI, TR>::implement_compute_local
|
|||
}
|
||||
|
||||
// explicit instantiations
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::PolygonRef> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Polygon> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::EdgePair> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Edge, db::Polygon>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Polygon> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Edge, db::Polygon>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::PolygonRef> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Edge, db::Edge>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::Polygon, db::Edge, db::Edge>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::PolygonWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgePairWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::PolygonWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::PolygonWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::PolygonWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::EdgeWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template DB_PUBLIC void compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::EdgeWithProperties>::implement_compute_local (db::CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1134,23 +1047,23 @@ void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local (db::
|
|||
|
||||
}
|
||||
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::Polygon, db::Polygon> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Polygon> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonRef, db::PolygonRef> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::PolygonRef> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::Polygon, db::Edge> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonRef, db::Edge> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::Polygon, db::EdgePair> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::EdgePair> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonRef, db::EdgePair> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::EdgePair> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonWithProperties, db::PolygonWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::PolygonWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonRefWithProperties, db::PolygonRefWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonWithProperties, db::EdgeWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonRefWithProperties, db::EdgeWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonWithProperties, db::EdgePairWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgePairWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionLogicalCaseSelectOperationNode::implement_compute_local<db::PolygonRefWithProperties, db::EdgePairWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::EdgePairWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
CompoundRegionInteractOperationNode::CompoundRegionInteractOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b, int mode, bool touching, bool inverse, size_t min_count, size_t max_count)
|
||||
: compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon> (&m_op, a, b), m_op (mode, touching, inverse ? Negative : Positive, min_count, max_count, b->is_merged ())
|
||||
: compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties> (&m_op, a, b), m_op (mode, touching, inverse ? Negative : Positive, min_count, max_count, b->is_merged ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
CompoundRegionInteractOperationNode::CompoundRegionInteractOperationNode (db::Region *a, db::Region *b, int mode, bool touching, bool inverse, size_t min_count, size_t max_count)
|
||||
: compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon> (&m_op, a, b), m_op (mode, touching, inverse ? Negative : Positive, min_count, max_count, b->is_merged ())
|
||||
: compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties> (&m_op, a, b), m_op (mode, touching, inverse ? Negative : Positive, min_count, max_count, b->is_merged ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -1158,13 +1071,13 @@ CompoundRegionInteractOperationNode::CompoundRegionInteractOperationNode (db::Re
|
|||
std::string
|
||||
CompoundRegionInteractOperationNode::generated_description () const
|
||||
{
|
||||
return std::string ("interact") + compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>::generated_description ();
|
||||
return std::string ("interact") + compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>::generated_description ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
CompoundRegionInteractWithEdgeOperationNode::CompoundRegionInteractWithEdgeOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b, bool inverse, size_t min_count, size_t max_count)
|
||||
: compound_region_generic_operation_node<db::Polygon, db::Edge, db::Polygon> (&m_op, a, b), m_op (inverse ? Negative : Positive, min_count, max_count, b->is_merged ())
|
||||
: compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::PolygonWithProperties> (&m_op, a, b), m_op (inverse ? Negative : Positive, min_count, max_count, b->is_merged ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -1172,19 +1085,19 @@ CompoundRegionInteractWithEdgeOperationNode::CompoundRegionInteractWithEdgeOpera
|
|||
std::string
|
||||
CompoundRegionInteractWithEdgeOperationNode::generated_description () const
|
||||
{
|
||||
return std::string ("interact") + compound_region_generic_operation_node<db::Polygon, db::Edge, db::Polygon>::generated_description ();
|
||||
return std::string ("interact") + compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::PolygonWithProperties>::generated_description ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
CompoundRegionPullOperationNode::CompoundRegionPullOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b, int mode, bool touching)
|
||||
: compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon> (&m_op, a, b), m_op (mode, touching)
|
||||
: compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties> (&m_op, a, b), m_op (mode, touching)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
CompoundRegionPullOperationNode::CompoundRegionPullOperationNode (db::Region *a, db::Region *b, int mode, bool touching)
|
||||
: compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon> (&m_op, a, b), m_op (mode, touching)
|
||||
: compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties> (&m_op, a, b), m_op (mode, touching)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -1192,13 +1105,13 @@ CompoundRegionPullOperationNode::CompoundRegionPullOperationNode (db::Region *a,
|
|||
std::string
|
||||
CompoundRegionPullOperationNode::generated_description () const
|
||||
{
|
||||
return std::string ("pull") + compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>::generated_description ();
|
||||
return std::string ("pull") + compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>::generated_description ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
CompoundRegionPullWithEdgeOperationNode::CompoundRegionPullWithEdgeOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b)
|
||||
: compound_region_generic_operation_node<db::Polygon, db::Edge, db::Edge> (&m_op, a, b), m_op ()
|
||||
: compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::EdgeWithProperties> (&m_op, a, b), m_op ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -1206,7 +1119,7 @@ CompoundRegionPullWithEdgeOperationNode::CompoundRegionPullWithEdgeOperationNode
|
|||
std::string
|
||||
CompoundRegionPullWithEdgeOperationNode::generated_description () const
|
||||
{
|
||||
return std::string ("pull") + compound_region_generic_operation_node<db::Polygon, db::Edge, db::Edge>::generated_description ();
|
||||
return std::string ("pull") + compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::EdgeWithProperties>::generated_description ();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1253,12 +1166,12 @@ void CompoundRegionJoinOperationNode::implement_compute_local (CompoundRegionOpe
|
|||
}
|
||||
}
|
||||
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::Polygon, db::Polygon> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Polygon> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonRef, db::PolygonRef> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::PolygonRef> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::Polygon, db::Edge> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonRef, db::Edge> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::Edge> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::Polygon, db::EdgePair> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::Polygon, db::Polygon> &, std::vector<std::unordered_set<db::EdgePair> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonRef, db::EdgePair> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRef, db::PolygonRef> &, std::vector<std::unordered_set<db::EdgePair> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonWithProperties, db::PolygonWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::PolygonWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonRefWithProperties, db::PolygonRefWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonWithProperties, db::EdgeWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonRefWithProperties, db::EdgeWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::EdgeWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonWithProperties, db::EdgePairWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &, std::vector<std::unordered_set<db::EdgePairWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
template void CompoundRegionJoinOperationNode::implement_compute_local<db::PolygonRefWithProperties, db::EdgePairWithProperties> (CompoundRegionOperationCache *, db::Layout *, db::Cell *, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &, std::vector<std::unordered_set<db::EdgePairWithProperties> > &, const db::LocalProcessorBase *) const;
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1276,18 +1189,6 @@ CompoundRegionFilterOperationNode::~CompoundRegionFilterOperationNode ()
|
|||
mp_filter = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -1316,18 +1217,6 @@ CompoundRegionEdgeFilterOperationNode::~CompoundRegionEdgeFilterOperationNode ()
|
|||
mp_filter = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -1356,18 +1245,6 @@ CompoundRegionEdgePairFilterOperationNode::~CompoundRegionEdgePairFilterOperatio
|
|||
mp_filter = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairFilterOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -1403,35 +1280,35 @@ CompoundRegionProcessingOperationNode::~CompoundRegionProcessingOperationNode ()
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *, const db::Polygon &p, std::vector<db::Polygon> &res) const
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *, const db::PolygonWithProperties &p, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (p, res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *layout, const db::PolygonRef &p, std::vector<db::PolygonRef> &res) const
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *layout, const db::PolygonRefWithProperties &p, std::vector<db::PolygonRefWithProperties> &res) const
|
||||
{
|
||||
std::vector<db::Polygon> poly;
|
||||
mp_proc->process (p.obj ().transformed (p.trans ()), poly);
|
||||
for (std::vector<db::Polygon>::const_iterator p = poly.begin (); p != poly.end (); ++p) {
|
||||
res.push_back (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
std::vector<db::PolygonWithProperties> poly;
|
||||
mp_proc->process (db::PolygonWithProperties (p.obj ().transformed (p.trans ()), p.properties_id ()), poly);
|
||||
for (std::vector<db::PolygonWithProperties>::const_iterator i = poly.begin (); i != poly.end (); ++i) {
|
||||
res.push_back (db::PolygonRefWithProperties (db::PolygonRef (*i, layout->shape_repository ()), i->properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *, const db::Polygon &p, const db::ICplxTrans &tr, std::vector<db::Polygon> &res) const
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *, const db::PolygonWithProperties &p, const db::ICplxTrans &tr, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
size_t n = res.size ();
|
||||
mp_proc->process (tr * p, res);
|
||||
|
|
@ -1445,15 +1322,15 @@ CompoundRegionProcessingOperationNode::processed (db::Layout *, const db::Polygo
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *layout, const db::PolygonRef &p, const db::ICplxTrans &tr, std::vector<db::PolygonRef> &res) const
|
||||
CompoundRegionProcessingOperationNode::processed (db::Layout *layout, const db::PolygonRefWithProperties &p, const db::ICplxTrans &tr, std::vector<db::PolygonRefWithProperties> &res) const
|
||||
{
|
||||
std::vector<db::Polygon> poly;
|
||||
mp_proc->process (p.obj ().transformed (p.trans ()).transformed (tr), poly);
|
||||
std::vector<db::PolygonWithProperties> poly;
|
||||
mp_proc->process (db::PolygonWithProperties (p.obj ().transformed (p.trans ()).transformed (tr), p.properties_id ()), poly);
|
||||
|
||||
if (! poly.empty ()) {
|
||||
db::ICplxTrans tri = tr.inverted ();
|
||||
for (std::vector<db::Polygon>::const_iterator p = poly.begin (); p != poly.end (); ++p) {
|
||||
res.push_back (db::PolygonRef (tri * *p, layout->shape_repository ()));
|
||||
for (std::vector<db::PolygonWithProperties>::const_iterator i = poly.begin (); i != poly.end (); ++i) {
|
||||
res.push_back (db::PolygonRefWithProperties (db::PolygonRef (tri * *i, layout->shape_repository ()), i->properties_id ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1475,31 +1352,31 @@ CompoundRegionToEdgeProcessingOperationNode::~CompoundRegionToEdgeProcessingOper
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::Polygon &p, std::vector<db::Edge> &res) const
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::PolygonWithProperties &p, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (p, res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::PolygonRef &p, std::vector<db::Edge> &res) const
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::PolygonRefWithProperties &p, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (p.obj ().transformed (p.trans ()), res);
|
||||
mp_proc->process (db::PolygonWithProperties (p.obj ().transformed (p.trans ()), p.properties_id ()), res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::Polygon &p, const db::ICplxTrans &tr, std::vector<db::Edge> &res) const
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::PolygonWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
size_t n = res.size ();
|
||||
mp_proc->process (tr * p, res);
|
||||
|
|
@ -1513,10 +1390,10 @@ CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::PolygonRef &p, const db::ICplxTrans &tr, std::vector<db::Edge> &res) const
|
||||
CompoundRegionToEdgeProcessingOperationNode::processed (db::Layout *, const db::PolygonRefWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
size_t n = res.size ();
|
||||
mp_proc->process (p.obj ().transformed (p.trans ()).transformed (tr), res);
|
||||
mp_proc->process (db::PolygonWithProperties (p.obj ().transformed (p.trans ()).transformed (tr), p.properties_id ()), res);
|
||||
|
||||
if (res.size () > n) {
|
||||
db::ICplxTrans tri = tr.inverted ();
|
||||
|
|
@ -1543,18 +1420,18 @@ CompoundRegionEdgeProcessingOperationNode::~CompoundRegionEdgeProcessingOperatio
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void CompoundRegionEdgeProcessingOperationNode::processed (db::Layout *, const db::Edge &p, std::vector<db::Edge> &res) const
|
||||
void CompoundRegionEdgeProcessingOperationNode::processed (db::Layout *, const db::EdgeWithProperties &p, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (p, res);
|
||||
}
|
||||
|
|
@ -1576,31 +1453,31 @@ CompoundRegionEdgeToPolygonProcessingOperationNode::~CompoundRegionEdgeToPolygon
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::processed (db::Layout *, const db::Edge &e, std::vector<db::Polygon> &res) const
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::processed (db::Layout *, const db::EdgeWithProperties &e, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (e, res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::processed (db::Layout *layout, const db::Edge &e, std::vector<db::PolygonRef> &res) const
|
||||
CompoundRegionEdgeToPolygonProcessingOperationNode::processed (db::Layout *layout, const db::EdgeWithProperties &e, std::vector<db::PolygonRefWithProperties> &res) const
|
||||
{
|
||||
std::vector<db::Polygon> polygons;
|
||||
std::vector<db::PolygonWithProperties> polygons;
|
||||
mp_proc->process (e, polygons);
|
||||
|
||||
for (std::vector<db::Polygon>::const_iterator p = polygons.begin (); p != polygons.end (); ++p) {
|
||||
res.push_back (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
for (std::vector<db::PolygonWithProperties>::const_iterator p = polygons.begin (); p != polygons.end (); ++p) {
|
||||
res.push_back (db::PolygonRefWithProperties (db::PolygonRef (*p, layout->shape_repository ()), p->properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1621,31 +1498,31 @@ CompoundRegionToEdgePairProcessingOperationNode::~CompoundRegionToEdgePairProces
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgePairProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionToEdgePairProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgePairProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionToEdgePairProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::Polygon &p, std::vector<db::EdgePair> &res) const
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::PolygonWithProperties &p, std::vector<db::EdgePairWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (p, res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::PolygonRef &p, std::vector<db::EdgePair> &res) const
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::PolygonRefWithProperties &p, std::vector<db::EdgePairWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (p.obj ().transformed (p.trans ()), res);
|
||||
mp_proc->process (db::PolygonWithProperties (p.obj ().transformed (p.trans ()), p.properties_id ()), res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::Polygon &p, const db::ICplxTrans &tr, std::vector<db::EdgePair> &res) const
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::PolygonWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgePairWithProperties> &res) const
|
||||
{
|
||||
size_t n = res.size ();
|
||||
mp_proc->process (tr * p, res);
|
||||
|
|
@ -1659,10 +1536,10 @@ CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::PolygonRef &p, const db::ICplxTrans &tr, std::vector<db::EdgePair> &res) const
|
||||
CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const db::PolygonRefWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgePairWithProperties> &res) const
|
||||
{
|
||||
size_t n = res.size ();
|
||||
mp_proc->process (p.obj ().transformed (p.trans ()).transformed (tr), res);
|
||||
mp_proc->process (db::PolygonWithProperties (p.obj ().transformed (p.trans ()).transformed (tr), p.properties_id ()), res);
|
||||
|
||||
if (res.size () > n) {
|
||||
db::ICplxTrans tri = tr.inverted ();
|
||||
|
|
@ -1689,31 +1566,31 @@ CompoundRegionEdgePairToPolygonProcessingOperationNode::~CompoundRegionEdgePairT
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::processed (db::Layout *, const db::EdgePair &e, std::vector<db::Polygon> &res) const
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::processed (db::Layout *, const db::EdgePairWithProperties &e, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
mp_proc->process (e, res);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::processed (db::Layout *layout, const db::EdgePair &e, std::vector<db::PolygonRef> &res) const
|
||||
CompoundRegionEdgePairToPolygonProcessingOperationNode::processed (db::Layout *layout, const db::EdgePairWithProperties &e, std::vector<db::PolygonRefWithProperties> &res) const
|
||||
{
|
||||
std::vector<db::Polygon> polygons;
|
||||
std::vector<db::PolygonWithProperties> polygons;
|
||||
mp_proc->process (e, polygons);
|
||||
|
||||
for (std::vector<db::Polygon>::const_iterator p = polygons.begin (); p != polygons.end (); ++p) {
|
||||
res.push_back (db::PolygonRef (*p, layout->shape_repository ()));
|
||||
for (std::vector<db::PolygonWithProperties>::const_iterator p = polygons.begin (); p != polygons.end (); ++p) {
|
||||
res.push_back (db::PolygonRefWithProperties (db::PolygonRef (*p, layout->shape_repository ()), p->properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1734,13 +1611,13 @@ CompoundRegionEdgePairToEdgeProcessingOperationNode::~CompoundRegionEdgePairToEd
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgePairToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
CompoundRegionEdgePairToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionEdgePairToEdgeProcessingOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
|
@ -1789,7 +1666,7 @@ CompoundRegionCheckOperationNode::computed_dist () const
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
// consider magnification variants
|
||||
db::EdgeRelationFilter check = m_check;
|
||||
|
|
@ -1797,13 +1674,13 @@ CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache
|
|||
|
||||
// TODO: needs a concept to deal with merged/non-merged inputs
|
||||
bool is_merged = true;
|
||||
db::check_local_operation<db::Polygon, db::Polygon> op (check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
|
||||
db::check_local_operation<db::PolygonWithProperties, db::PolygonWithProperties> op (check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
|
||||
|
||||
tl_assert (results.size () == 1);
|
||||
if (results.front ().empty ()) {
|
||||
op.do_compute_local (layout, cell, interactions, results, proc);
|
||||
} else {
|
||||
std::vector<std::unordered_set<db::EdgePair> > r;
|
||||
std::vector<std::unordered_set<db::EdgePairWithProperties> > r;
|
||||
r.resize (1);
|
||||
op.do_compute_local (layout, cell, interactions, r, proc);
|
||||
results.front ().insert (r.front ().begin (), r.front ().end ());
|
||||
|
|
@ -1811,7 +1688,7 @@ CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache
|
|||
}
|
||||
|
||||
void
|
||||
CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
// consider magnification variants
|
||||
db::EdgeRelationFilter check = m_check;
|
||||
|
|
@ -1819,13 +1696,13 @@ CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache
|
|||
|
||||
// TODO: needs a concept to deal with merged/non-merged inputs
|
||||
bool is_merged = true;
|
||||
db::check_local_operation<db::PolygonRef, db::PolygonRef> op (check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
|
||||
db::check_local_operation<db::PolygonRefWithProperties, db::PolygonRefWithProperties> op (check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options);
|
||||
|
||||
tl_assert (results.size () == 1);
|
||||
if (results.front ().empty ()) {
|
||||
op.do_compute_local (layout, cell, interactions, results, proc);
|
||||
} else {
|
||||
std::vector<std::unordered_set<db::EdgePair> > r;
|
||||
std::vector<std::unordered_set<db::EdgePairWithProperties> > r;
|
||||
r.resize (1);
|
||||
op.do_compute_local (layout, cell, interactions, r, proc);
|
||||
results.front ().insert (r.front ().begin (), r.front ().end ());
|
||||
|
|
|
|||
|
|
@ -69,11 +69,6 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::PolygonRef> > > m_cache_polyref;
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::Polygon> > > m_cache_poly;
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::Edge> > > m_cache_edge;
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::EdgePair> > > m_cache_edge_pair;
|
||||
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::PolygonRefWithProperties> > > m_cache_polyref_wp;
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::PolygonWithProperties> > > m_cache_poly_wp;
|
||||
std::map<const CompoundRegionOperationNode *, std::vector<std::unordered_set<db::EdgeWithProperties> > > m_cache_edge_wp;
|
||||
|
|
@ -91,11 +86,6 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void get_cache (std::vector<std::unordered_set<db::PolygonRef> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_polyref, cache_ptr, valid, node); }
|
||||
void get_cache (std::vector<std::unordered_set<db::Polygon> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_poly, cache_ptr, valid, node); }
|
||||
void get_cache (std::vector<std::unordered_set<db::Edge> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_edge, cache_ptr, valid, node); }
|
||||
void get_cache (std::vector<std::unordered_set<db::EdgePair> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_edge_pair, cache_ptr, valid, node); }
|
||||
|
||||
void get_cache (std::vector<std::unordered_set<db::PolygonRefWithProperties> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_polyref_wp, cache_ptr, valid, node); }
|
||||
void get_cache (std::vector<std::unordered_set<db::PolygonWithProperties> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_poly_wp, cache_ptr, valid, node); }
|
||||
void get_cache (std::vector<std::unordered_set<db::EdgeWithProperties> > *&cache_ptr, bool &valid, const CompoundRegionOperationNode *node) { get_cache_generic (m_cache_edge_wp, cache_ptr, valid, node); }
|
||||
|
|
@ -201,45 +191,6 @@ public:
|
|||
*/
|
||||
virtual bool wants_variants () const { return false; }
|
||||
|
||||
/**
|
||||
* @brief Indicates that the node expects calls through do_compute_local in the properties flavor
|
||||
*/
|
||||
virtual bool wants_properties () const { return false; }
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
|
|
@ -274,35 +225,6 @@ public:
|
|||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool compute_local_bool (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
if (result_type () == Region) {
|
||||
|
||||
std::vector<std::unordered_set<T> > res;
|
||||
res.push_back (std::unordered_set<T> ());
|
||||
compute_local (cache, layout, cell, interactions, res, proc);
|
||||
return ! res.front ().empty ();
|
||||
|
||||
} else if (result_type () == Edges) {
|
||||
|
||||
std::vector<std::unordered_set<db::Edge> > res;
|
||||
res.push_back (std::unordered_set<db::Edge> ());
|
||||
compute_local (cache, layout, cell, interactions, res, proc);
|
||||
return ! res.front ().empty ();
|
||||
|
||||
} else if (result_type () == EdgePairs) {
|
||||
|
||||
std::vector<std::unordered_set<db::EdgePair> > res;
|
||||
res.push_back (std::unordered_set<db::EdgePair> ());
|
||||
compute_local (cache, layout, cell, interactions, res, proc);
|
||||
return ! res.front ().empty ();
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool compute_local_bool (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::object_with_properties<T>, db::object_with_properties<T> > &interactions, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -333,14 +255,6 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
// the different computation slots
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
// the different computation slots with properties
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -397,28 +311,28 @@ template <class T>
|
|||
struct compound_operation_type_traits;
|
||||
|
||||
template <>
|
||||
struct compound_operation_type_traits<db::PolygonRef>
|
||||
struct compound_operation_type_traits<db::PolygonRefWithProperties>
|
||||
{
|
||||
typedef db::Region container_type;
|
||||
static CompoundRegionOperationNode::ResultType type () { return CompoundRegionOperationNode::Region; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compound_operation_type_traits<db::Polygon>
|
||||
struct compound_operation_type_traits<db::PolygonWithProperties>
|
||||
{
|
||||
typedef db::Region container_type;
|
||||
static CompoundRegionOperationNode::ResultType type () { return CompoundRegionOperationNode::Region; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compound_operation_type_traits<db::Edge>
|
||||
struct compound_operation_type_traits<db::EdgeWithProperties>
|
||||
{
|
||||
typedef db::Edges container_type;
|
||||
static CompoundRegionOperationNode::ResultType type () { return CompoundRegionOperationNode::Edges; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compound_operation_type_traits<db::EdgePair>
|
||||
struct compound_operation_type_traits<db::EdgePairWithProperties>
|
||||
{
|
||||
typedef db::EdgePairs container_type;
|
||||
static CompoundRegionOperationNode::ResultType type () { return CompoundRegionOperationNode::EdgePairs; }
|
||||
|
|
@ -456,16 +370,10 @@ public:
|
|||
virtual db::Coord computed_dist () const { return 0; }
|
||||
virtual ResultType result_type () const { return Region; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -483,16 +391,10 @@ public:
|
|||
virtual db::Coord computed_dist () const { return 0; }
|
||||
virtual ResultType result_type () const { return Region; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -510,16 +412,10 @@ public:
|
|||
virtual db::Coord computed_dist () const { return 0; }
|
||||
virtual ResultType result_type () const { return Region; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -649,26 +545,19 @@ public:
|
|||
virtual ResultType result_type () const;
|
||||
|
||||
// the different computation slots
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
|
|
@ -697,36 +586,6 @@ public:
|
|||
}
|
||||
|
||||
// the different computation slots
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
|
|
@ -791,20 +650,13 @@ public:
|
|||
virtual db::Coord computed_dist () const;
|
||||
|
||||
// the different computation slots
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
|
|
@ -898,7 +750,7 @@ private:
|
|||
};
|
||||
|
||||
class DB_PUBLIC CompoundRegionInteractOperationNode
|
||||
: public compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>
|
||||
: public compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>
|
||||
{
|
||||
public:
|
||||
CompoundRegionInteractOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b, int mode, bool touching, bool inverse, size_t min_count = 0, size_t max_count = std::numeric_limits<size_t>::max ());
|
||||
|
|
@ -906,71 +758,57 @@ public:
|
|||
|
||||
std::string generated_description () const;
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
typedef db::interacting_local_operation<db::Polygon, db::Polygon, db::Polygon> op_type;
|
||||
typedef db::interacting_local_operation<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties> op_type;
|
||||
op_type m_op;
|
||||
};
|
||||
|
||||
class DB_PUBLIC CompoundRegionInteractWithEdgeOperationNode
|
||||
: public compound_region_generic_operation_node<db::Polygon, db::Edge, db::Polygon>
|
||||
: public compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::PolygonWithProperties>
|
||||
{
|
||||
public:
|
||||
CompoundRegionInteractWithEdgeOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b, bool inverse, size_t min_count = 0, size_t max_count = std::numeric_limits<size_t>::max ());
|
||||
|
||||
std::string generated_description () const;
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
db::interacting_with_edge_local_operation<db::Polygon, db::Edge, db::Polygon> m_op;
|
||||
db::interacting_with_edge_local_operation<db::PolygonWithProperties, db::EdgeWithProperties, db::PolygonWithProperties> m_op;
|
||||
};
|
||||
|
||||
class DB_PUBLIC CompoundRegionPullOperationNode
|
||||
: public compound_region_generic_operation_node<db::Polygon, db::Polygon, db::Polygon>
|
||||
: public compound_region_generic_operation_node<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties>
|
||||
{
|
||||
public:
|
||||
CompoundRegionPullOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b, int mode, bool touching);
|
||||
|
|
@ -978,66 +816,52 @@ public:
|
|||
|
||||
std::string generated_description () const;
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
db::pull_local_operation<db::Polygon, db::Polygon, db::Polygon> m_op;
|
||||
db::pull_local_operation<db::PolygonWithProperties, db::PolygonWithProperties, db::PolygonWithProperties> m_op;
|
||||
};
|
||||
|
||||
class DB_PUBLIC CompoundRegionPullWithEdgeOperationNode
|
||||
: public compound_region_generic_operation_node<db::Polygon, db::Edge, db::Edge>
|
||||
: public compound_region_generic_operation_node<db::PolygonWithProperties, db::EdgeWithProperties, db::EdgeWithProperties>
|
||||
{
|
||||
public:
|
||||
CompoundRegionPullWithEdgeOperationNode (CompoundRegionOperationNode *a, CompoundRegionOperationNode *b);
|
||||
|
||||
std::string generated_description () const;
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
db::pull_with_edge_local_operation<db::Polygon, db::Edge, db::Edge> m_op;
|
||||
db::pull_with_edge_local_operation<db::PolygonWithProperties, db::EdgeWithProperties, db::EdgeWithProperties> m_op;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1059,36 +883,6 @@ public:
|
|||
virtual ResultType result_type () const;
|
||||
|
||||
// the different computation slots
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
|
|
@ -1146,36 +940,6 @@ public:
|
|||
virtual ResultType result_type () const;
|
||||
|
||||
// the different computation slots
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
|
|
@ -1224,17 +988,10 @@ public:
|
|||
// specifies the result type
|
||||
virtual ResultType result_type () const { return Region; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -1248,6 +1005,7 @@ private:
|
|||
bool m_owns_filter;
|
||||
bool m_sum_of_set;
|
||||
|
||||
/* @@@
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<T> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -1268,6 +1026,7 @@ private:
|
|||
}
|
||||
}
|
||||
}
|
||||
@@@ */
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::object_with_properties<T>, db::object_with_properties<T> > &interactions, std::vector<std::unordered_set<db::object_with_properties<T> > > &results, const db::LocalProcessorBase *proc) const
|
||||
|
|
@ -1303,17 +1062,10 @@ public:
|
|||
// specifies the result type
|
||||
virtual ResultType result_type () const { return Edges; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -1327,6 +1079,7 @@ private:
|
|||
bool m_owns_filter;
|
||||
bool m_sum_of;
|
||||
|
||||
/* @@@
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
|
|
@ -1347,6 +1100,7 @@ private:
|
|||
}
|
||||
}
|
||||
}
|
||||
@@@ */
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::object_with_properties<T>, db::object_with_properties<T> > &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
|
|
@ -1382,17 +1136,10 @@ public:
|
|||
// specifies the result type
|
||||
virtual ResultType result_type () const { return EdgePairs; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
|
@ -1438,19 +1185,12 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
|
|
@ -1459,10 +1199,10 @@ private:
|
|||
bool m_owns_proc;
|
||||
db::Coord m_dist_adder;
|
||||
|
||||
void processed (db::Layout *, const db::Polygon &p, std::vector<db::Polygon> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonRef &p, std::vector<db::PolygonRef> &res) const;
|
||||
void processed (db::Layout *, const db::Polygon &p, const db::ICplxTrans &tr, std::vector<db::Polygon> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonRef &p, const db::ICplxTrans &tr, std::vector<db::PolygonRef> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonWithProperties &p, std::vector<db::PolygonWithProperties> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonRefWithProperties &p, std::vector<db::PolygonRefWithProperties> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonWithProperties &p, const db::ICplxTrans &tr, std::vector<db::PolygonWithProperties> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonRefWithProperties &p, const db::ICplxTrans &tr, std::vector<db::PolygonRefWithProperties> &res) const;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<T> > &results, const db::LocalProcessorBase *proc) const
|
||||
|
|
@ -1534,26 +1274,19 @@ public:
|
|||
return std::string ("merged") + CompoundRegionMultiInputOperationNode::generated_description ();
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
implement_compute_local (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
|
|
@ -1587,7 +1320,7 @@ private:
|
|||
|
||||
// and run the merge step
|
||||
db::MergeOp op (m_min_wc);
|
||||
db::polygon_ref_generator<T> pc (layout, results.front ());
|
||||
db::polygon_ref_generator_with_properties<T> pc (layout, results.front (), db::properties_id_type (0));
|
||||
db::PolygonGenerator pg (pc, false /*don't resolve holes*/, m_min_coherence);
|
||||
ep.process (pg, op);
|
||||
}
|
||||
|
|
@ -1606,19 +1339,12 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
|
|
@ -1626,19 +1352,19 @@ private:
|
|||
EdgeToPolygonProcessorBase *mp_proc;
|
||||
bool m_owns_proc;
|
||||
|
||||
void processed (db::Layout *, const db::Edge &p, std::vector<db::Polygon> &res) const;
|
||||
void processed (db::Layout *layout, const db::Edge &p, std::vector<db::PolygonRef> &res) const;
|
||||
void processed (db::Layout *, const db::EdgeWithProperties &p, std::vector<db::PolygonWithProperties> &res) const;
|
||||
void processed (db::Layout *layout, const db::EdgeWithProperties &p, std::vector<db::PolygonRefWithProperties> &res) const;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<T> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::Edge> > one;
|
||||
one.push_back (std::unordered_set<db::Edge> ());
|
||||
std::vector<std::unordered_set<db::EdgeWithProperties> > one;
|
||||
one.push_back (std::unordered_set<db::EdgeWithProperties> ());
|
||||
|
||||
child (0)->compute_local (cache, layout, cell, interactions, one, proc);
|
||||
|
||||
std::vector<T> res;
|
||||
for (typename std::unordered_set<db::Edge>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
for (typename std::unordered_set<db::EdgeWithProperties>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
|
||||
res.clear ();
|
||||
|
||||
|
|
@ -1681,38 +1407,31 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
EdgeProcessorBase *mp_proc;
|
||||
bool m_owns_proc;
|
||||
|
||||
void processed (db::Layout *, const db::Edge &p, std::vector<db::Edge> &res) const;
|
||||
void processed (db::Layout *, const db::EdgeWithProperties &p, std::vector<db::EdgeWithProperties> &res) const;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::Edge> > one;
|
||||
one.push_back (std::unordered_set<db::Edge> ());
|
||||
std::vector<std::unordered_set<db::EdgeWithProperties> > one;
|
||||
one.push_back (std::unordered_set<db::EdgeWithProperties> ());
|
||||
|
||||
child (0)->compute_local (cache, layout, cell, interactions, one, proc);
|
||||
|
||||
std::vector<db::Edge> res;
|
||||
for (typename std::unordered_set<db::Edge>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
std::vector<db::EdgeWithProperties> res;
|
||||
for (typename std::unordered_set<db::EdgeWithProperties>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
|
||||
res.clear ();
|
||||
|
||||
|
|
@ -1755,19 +1474,12 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
|
|
@ -1775,19 +1487,19 @@ private:
|
|||
EdgePairToPolygonProcessorBase *mp_proc;
|
||||
bool m_owns_proc;
|
||||
|
||||
void processed (db::Layout *, const db::EdgePair &p, std::vector<db::Polygon> &res) const;
|
||||
void processed (db::Layout *layout, const db::EdgePair &p, std::vector<db::PolygonRef> &res) const;
|
||||
void processed (db::Layout *, const db::EdgePairWithProperties &p, std::vector<db::PolygonWithProperties> &res) const;
|
||||
void processed (db::Layout *layout, const db::EdgePairWithProperties &p, std::vector<db::PolygonRefWithProperties> &res) const;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<T> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::EdgePair> > one;
|
||||
one.push_back (std::unordered_set<db::EdgePair> ());
|
||||
std::vector<std::unordered_set<db::EdgePairWithProperties> > one;
|
||||
one.push_back (std::unordered_set<db::EdgePairWithProperties> ());
|
||||
|
||||
child (0)->compute_local (cache, layout, cell, interactions, one, proc);
|
||||
|
||||
std::vector<T> res;
|
||||
for (typename std::unordered_set<db::EdgePair>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
for (typename std::unordered_set<db::EdgePairWithProperties>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
|
||||
res.clear ();
|
||||
|
||||
|
|
@ -1830,20 +1542,13 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
|
|
@ -1851,15 +1556,15 @@ private:
|
|||
bool m_owns_proc;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
void implement_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::EdgePair> > one;
|
||||
one.push_back (std::unordered_set<db::EdgePair> ());
|
||||
std::vector<std::unordered_set<db::EdgePairWithProperties> > one;
|
||||
one.push_back (std::unordered_set<db::EdgePairWithProperties> ());
|
||||
|
||||
child (0)->compute_local (cache, layout, cell, interactions, one, proc);
|
||||
|
||||
std::vector<db::Edge> res;
|
||||
for (typename std::unordered_set<db::EdgePair>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
std::vector<db::EdgeWithProperties> res;
|
||||
for (typename std::unordered_set<db::EdgePairWithProperties>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
|
||||
res.clear ();
|
||||
|
||||
|
|
@ -1902,40 +1607,33 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
PolygonToEdgeProcessorBase *mp_proc;
|
||||
bool m_owns_proc;
|
||||
|
||||
void processed (db::Layout *, const db::Polygon &p, std::vector<db::Edge> &res) const;
|
||||
void processed (db::Layout *layout, const db::PolygonRef &p, std::vector<db::Edge> &res) const;
|
||||
void processed (db::Layout *, const db::Polygon &p, const db::ICplxTrans &tr, std::vector<db::Edge> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonRef &p, const db::ICplxTrans &tr, std::vector<db::Edge> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonWithProperties &p, std::vector<db::EdgeWithProperties> &res) const;
|
||||
void processed (db::Layout *layout, const db::PolygonRefWithProperties &p, std::vector<db::EdgeWithProperties> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgeWithProperties> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonRefWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgeWithProperties> &res) const;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<T> > one;
|
||||
one.push_back (std::unordered_set<T> ());
|
||||
|
||||
child (0)->compute_local (cache, layout, cell, interactions, one, proc);
|
||||
|
||||
std::vector<db::Edge> res;
|
||||
std::vector<db::EdgeWithProperties> res;
|
||||
for (typename std::unordered_set<T>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
|
||||
res.clear ();
|
||||
|
|
@ -1982,40 +1680,33 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return mp_proc->vars (); }
|
||||
virtual bool wants_variants () const { return mp_proc->wants_variants (); }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
PolygonToEdgePairProcessorBase *mp_proc;
|
||||
bool m_owns_proc;
|
||||
|
||||
void processed (db::Layout *, const db::Polygon &p, std::vector<db::EdgePair> &res) const;
|
||||
void processed (db::Layout *layout, const db::PolygonRef &p, std::vector<db::EdgePair> &res) const;
|
||||
void processed (db::Layout *, const db::Polygon &p, const db::ICplxTrans &tr, std::vector<db::EdgePair> &res) const;
|
||||
void processed (db::Layout *layout, const db::PolygonRef &p, const db::ICplxTrans &tr, std::vector<db::EdgePair> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonWithProperties &p, std::vector<db::EdgePairWithProperties> &res) const;
|
||||
void processed (db::Layout *layout, const db::PolygonRefWithProperties &p, std::vector<db::EdgePairWithProperties> &res) const;
|
||||
void processed (db::Layout *, const db::PolygonWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgePairWithProperties> &res) const;
|
||||
void processed (db::Layout *layout, const db::PolygonRefWithProperties &p, const db::ICplxTrans &tr, std::vector<db::EdgePairWithProperties> &res) const;
|
||||
|
||||
template <class T>
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
void implement_compute_local (db::CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<T, T> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<T> > one;
|
||||
one.push_back (std::unordered_set<T> ());
|
||||
|
||||
child (0)->compute_local (cache, layout, cell, interactions, one, proc);
|
||||
|
||||
std::vector<db::EdgePair> res;
|
||||
std::vector<db::EdgePairWithProperties> res;
|
||||
for (typename std::unordered_set<T>::const_iterator p = one.front ().begin (); p != one.front ().end (); ++p) {
|
||||
|
||||
res.clear ();
|
||||
|
|
@ -2073,21 +1764,14 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool wants_variants () const { return true; }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const LocalProcessorBase *proc) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const LocalProcessorBase *proc) const;
|
||||
|
||||
// non-implemented
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
|
||||
private:
|
||||
db::EdgeRelationFilter m_check;
|
||||
|
|
@ -2174,18 +1858,22 @@ public:
|
|||
protected:
|
||||
virtual void do_compute_local (db::Layout *layout, db::Cell *cell, const shape_interactions<db::object_with_properties<TS>, db::object_with_properties<TI> > &interactions, std::vector<std::unordered_set<db::object_with_properties<TR> > > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
if (mp_node->wants_properties ()) {
|
||||
if (pc_skip (m_prop_constraint)) {
|
||||
|
||||
// In this branch, property handling is delegated to the compound operation
|
||||
|
||||
// uses the slots with properties attached
|
||||
CompoundRegionOperationCache cache;
|
||||
mp_node->compute_local (&cache, layout, cell, interactions, results, proc);
|
||||
|
||||
} else {
|
||||
|
||||
// In this branch, the property handling is determined by "m_prop_constraint" and bypasses the compound operation's
|
||||
// property handling.
|
||||
|
||||
auto interactions_by_prop_id = separate_interactions_to_interactions_by_properties (interactions, m_prop_constraint);
|
||||
for (auto s2p = interactions_by_prop_id.begin (); s2p != interactions_by_prop_id.end (); ++s2p) {
|
||||
|
||||
std::vector<std::unordered_set<TR> > results_wo_props;
|
||||
std::vector<std::unordered_set<db::object_with_properties<TR> > > results_wo_props;
|
||||
results_wo_props.resize (results.size ());
|
||||
|
||||
CompoundRegionOperationCache cache;
|
||||
|
|
|
|||
|
|
@ -1962,54 +1962,6 @@ DeepRegion::sized_inside (const Region &inside, bool outside, coord_type dx, coo
|
|||
return res.release ();
|
||||
}
|
||||
|
||||
template <class TR, class Output>
|
||||
static
|
||||
Output *region_cop_impl (DeepRegion *region, db::CompoundRegionOperationNode &node)
|
||||
{
|
||||
// Fall back to flat mode if one of the inputs is flat
|
||||
std::vector<db::Region *> inputs = node.inputs ();
|
||||
for (std::vector<db::Region *>::const_iterator i = inputs.begin (); i != inputs.end (); ++i) {
|
||||
if (! is_subject_regionptr (*i) && ! dynamic_cast<const db::DeepRegion *> ((*i)->delegate ())) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const db::DeepLayer &polygons (region->merged_deep_layer ());
|
||||
std::unique_ptr<Output> res (new Output (polygons.derived ()));
|
||||
|
||||
db::local_processor<db::PolygonRef, db::PolygonRef, TR> proc (&res->deep_layer ().layout (), &res->deep_layer ().initial_cell (), region->deep_layer ().breakout_cells ());
|
||||
|
||||
proc.set_description (region->progress_desc ());
|
||||
proc.set_report_progress (region->report_progress ());
|
||||
proc.set_base_verbosity (region->base_verbosity ());
|
||||
proc.set_threads (region->deep_layer ().store ()->threads ());
|
||||
|
||||
std::vector<unsigned int> other_layers;
|
||||
for (std::vector<db::Region *>::const_iterator i = inputs.begin (); i != inputs.end (); ++i) {
|
||||
|
||||
if (is_subject_regionptr (*i)) {
|
||||
if (*i == subject_regionptr ()) {
|
||||
other_layers.push_back (subject_idlayer ());
|
||||
} else {
|
||||
other_layers.push_back (foreign_idlayer ());
|
||||
}
|
||||
} else {
|
||||
const db::DeepRegion *other_deep = dynamic_cast<const db::DeepRegion *> ((*i)->delegate ());
|
||||
tl_assert (other_deep != 0);
|
||||
if (&other_deep->deep_layer ().layout () != ®ion->deep_layer ().layout () || &other_deep->deep_layer ().initial_cell () != ®ion->deep_layer ().initial_cell ()) {
|
||||
throw tl::Exception (tl::to_string (tr ("Complex DeepRegion operations need to use the same layout and top cell for all inputs")));
|
||||
}
|
||||
other_layers.push_back (other_deep->deep_layer ().layer ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
compound_local_operation<db::PolygonRef, db::PolygonRef, TR> op (&node);
|
||||
proc.run (&op, polygons.layer (), other_layers, res->deep_layer ().layer (), true /*make_variants*/);
|
||||
|
||||
return res.release ();
|
||||
}
|
||||
|
||||
template <class TR, class Output>
|
||||
static
|
||||
Output *region_cop_with_properties_impl (DeepRegion *region, db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
|
|
@ -2062,12 +2014,7 @@ Output *region_cop_with_properties_impl (DeepRegion *region, db::CompoundRegionO
|
|||
EdgePairsDelegate *
|
||||
DeepRegion::cop_to_edge_pairs (db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
{
|
||||
DeepEdgePairs *output = 0;
|
||||
if (pc_skip (prop_constraint) && ! node.wants_properties ()) {
|
||||
output = region_cop_impl<db::EdgePair, DeepEdgePairs> (this, node);
|
||||
} else {
|
||||
output = region_cop_with_properties_impl<db::EdgePair, DeepEdgePairs> (this, node, prop_constraint);
|
||||
}
|
||||
DeepEdgePairs *output = region_cop_with_properties_impl<db::EdgePair, DeepEdgePairs> (this, node, prop_constraint);
|
||||
if (! output) {
|
||||
return AsIfFlatRegion::cop_to_edge_pairs (node, prop_constraint);
|
||||
} else {
|
||||
|
|
@ -2078,12 +2025,7 @@ DeepRegion::cop_to_edge_pairs (db::CompoundRegionOperationNode &node, db::Proper
|
|||
RegionDelegate *
|
||||
DeepRegion::cop_to_region (db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
{
|
||||
DeepRegion *output = 0;
|
||||
if (pc_skip (prop_constraint) && ! node.wants_properties ()) {
|
||||
output = region_cop_impl<db::PolygonRef, db::DeepRegion> (this, node);
|
||||
} else {
|
||||
output = region_cop_with_properties_impl<db::PolygonRef, DeepRegion> (this, node, prop_constraint);
|
||||
}
|
||||
DeepRegion *output = region_cop_with_properties_impl<db::PolygonRef, DeepRegion> (this, node, prop_constraint);
|
||||
if (! output) {
|
||||
return AsIfFlatRegion::cop_to_region (node, prop_constraint);
|
||||
} else {
|
||||
|
|
@ -2094,12 +2036,7 @@ DeepRegion::cop_to_region (db::CompoundRegionOperationNode &node, db::PropertyCo
|
|||
EdgesDelegate *
|
||||
DeepRegion::cop_to_edges (db::CompoundRegionOperationNode &node, db::PropertyConstraint prop_constraint)
|
||||
{
|
||||
DeepEdges *output = 0;
|
||||
if (pc_skip (prop_constraint) && ! node.wants_properties ()) {
|
||||
output = region_cop_impl<db::Edge, DeepEdges> (this, node);
|
||||
} else {
|
||||
output = region_cop_with_properties_impl<db::Edge, DeepEdges> (this, node, prop_constraint);
|
||||
}
|
||||
DeepEdges *output = region_cop_with_properties_impl<db::Edge, DeepEdges> (this, node, prop_constraint);
|
||||
if (! output) {
|
||||
return AsIfFlatRegion::cop_to_edges (node, prop_constraint);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ EdgeNeighborhoodVisitor::EdgeNeighborhoodVisitor ()
|
|||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::connect_output (Layout * /*layout*/, std::unordered_set<db::Polygon> *polygons) const
|
||||
EdgeNeighborhoodVisitor::connect_output (Layout * /*layout*/, std::unordered_set<db::PolygonWithProperties> *polygons) const
|
||||
{
|
||||
disconnect_outputs ();
|
||||
mp_polygons = polygons;
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::connect_output (db::Layout *layout, std::unordered_set<db::PolygonRef> *polygons) const
|
||||
EdgeNeighborhoodVisitor::connect_output (db::Layout *layout, std::unordered_set<db::PolygonRefWithProperties> *polygons) const
|
||||
{
|
||||
disconnect_outputs ();
|
||||
mp_layout = layout;
|
||||
|
|
@ -62,14 +62,14 @@ EdgeNeighborhoodVisitor::connect_output (db::Layout *layout, std::unordered_set<
|
|||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::connect_output (db::Layout * /*layout*/, std::unordered_set<db::Edge> *edges) const
|
||||
EdgeNeighborhoodVisitor::connect_output (db::Layout * /*layout*/, std::unordered_set<db::EdgeWithProperties> *edges) const
|
||||
{
|
||||
disconnect_outputs ();
|
||||
mp_edges = edges;
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::connect_output (Layout * /*layout*/, std::unordered_set<db::EdgePair> *edge_pairs) const
|
||||
EdgeNeighborhoodVisitor::connect_output (Layout * /*layout*/, std::unordered_set<db::EdgePairWithProperties> *edge_pairs) const
|
||||
{
|
||||
disconnect_outputs ();
|
||||
mp_edge_pairs = edge_pairs;
|
||||
|
|
@ -86,20 +86,20 @@ EdgeNeighborhoodVisitor::disconnect_outputs () const
|
|||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::output_polygon (const db::Polygon &poly)
|
||||
EdgeNeighborhoodVisitor::output_polygon (const db::PolygonWithProperties &poly)
|
||||
{
|
||||
if (mp_polygons) {
|
||||
mp_polygons->insert (poly);
|
||||
} else if (mp_polygon_refs) {
|
||||
tl_assert (mp_layout != 0);
|
||||
mp_polygon_refs->insert (db::PolygonRef (poly, mp_layout->shape_repository ()));
|
||||
mp_polygon_refs->insert (db::PolygonRefWithProperties (db::PolygonRef (poly, mp_layout->shape_repository ()), poly.properties_id ()));
|
||||
} else {
|
||||
throw tl::Exception (tl::to_string (tr ("EdgeNeighborhoodVisitor is not configured for edge output (use 'result_type=Edges')")));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::output_edge (const db::Edge &edge)
|
||||
EdgeNeighborhoodVisitor::output_edge (const db::EdgeWithProperties &edge)
|
||||
{
|
||||
if (mp_edges == 0) {
|
||||
throw tl::Exception (tl::to_string (tr ("EdgeNeighborhoodVisitor is not configured for edge output (use 'result_type=Edges')")));
|
||||
|
|
@ -108,7 +108,7 @@ EdgeNeighborhoodVisitor::output_edge (const db::Edge &edge)
|
|||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodVisitor::output_edge_pair (const db::EdgePair &edge_pair)
|
||||
EdgeNeighborhoodVisitor::output_edge_pair (const db::EdgePairWithProperties &edge_pair)
|
||||
{
|
||||
if (mp_edge_pairs == 0) {
|
||||
throw tl::Exception (tl::to_string (tr ("EdgeNeighborhoodVisitor is not configured for edge pair output (use 'result_type=EdgePairs')")));
|
||||
|
|
@ -152,7 +152,7 @@ EdgeNeighborhoodCompoundOperationNode::generated_description () const
|
|||
namespace {
|
||||
|
||||
class EdgeCollectorReceiver
|
||||
: public db::box_scanner_receiver2<db::Edge, unsigned int, db::Polygon, unsigned int>
|
||||
: public db::box_scanner_receiver2<db::EdgeWithProperties, unsigned int, db::PolygonWithProperties, unsigned int>
|
||||
{
|
||||
public:
|
||||
EdgeCollectorReceiver (db::EdgeNeighborhoodVisitor *visitor, const db::Layout *layout, const db::Cell *cell,
|
||||
|
|
@ -163,13 +163,13 @@ public:
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
void add (const db::Edge *o1, const unsigned int &p1, const db::Polygon *o2, const unsigned int &p2)
|
||||
void add (const db::EdgeWithProperties *o1, const unsigned int &p1, const db::PolygonWithProperties *o2, const unsigned int &p2)
|
||||
{
|
||||
m_edge_neighbors[p1][p2].push_back (o2);
|
||||
enter_edge (o1, p1);
|
||||
}
|
||||
|
||||
void finish1 (const db::Edge *o1, const unsigned int &p1)
|
||||
void finish1 (const db::EdgeWithProperties *o1, const unsigned int &p1)
|
||||
{
|
||||
m_edge_neighbors[p1];
|
||||
enter_edge (o1, p1);
|
||||
|
|
@ -183,22 +183,22 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
std::map<unsigned int, std::map<unsigned int, std::vector<const db::Polygon *> > > m_edge_neighbors;
|
||||
std::vector<db::Edge> m_edges;
|
||||
std::map<unsigned int, std::map<unsigned int, std::vector<const db::PolygonWithProperties *> > > m_edge_neighbors;
|
||||
std::vector<db::EdgeWithProperties> m_edges;
|
||||
db::EdgeNeighborhoodVisitor *mp_visitor;
|
||||
const db::Layout *mp_layout;
|
||||
const db::Cell *mp_cell;
|
||||
db::Coord m_bext, m_eext, m_din, m_dout;
|
||||
|
||||
void enter_edge (const db::Edge *o1, const unsigned int &p1)
|
||||
void enter_edge (const db::EdgeWithProperties *o1, const unsigned int &p1)
|
||||
{
|
||||
while (size_t (p1) >= m_edges.size ()) {
|
||||
m_edges.push_back (db::Edge ());
|
||||
m_edges.push_back (db::EdgeWithProperties ());
|
||||
}
|
||||
m_edges[p1] = *o1;
|
||||
}
|
||||
|
||||
void commit_edge (const db::Edge &edge, const std::map<unsigned int, std::vector<const db::Polygon *> > &neighbors) const
|
||||
void commit_edge (const db::EdgeWithProperties &edge, const std::map<unsigned int, std::vector<const db::PolygonWithProperties *> > &neighbors) const
|
||||
{
|
||||
if (edge.is_degenerate ()) {
|
||||
return;
|
||||
|
|
@ -217,11 +217,14 @@ private:
|
|||
db::SimplePolygon per_edge_clip_box (db::Box (xmin, -m_din - 1, xmax, m_dout + 1));
|
||||
|
||||
// compute the merged neighbors
|
||||
std::map<unsigned int, std::vector<db::Polygon> > merged_neighbors;
|
||||
std::map<unsigned int, std::vector<db::PolygonWithProperties> > merged_neighbors;
|
||||
|
||||
db::EdgeProcessor ep;
|
||||
for (auto n = neighbors.begin (); n != neighbors.end (); ++n) {
|
||||
|
||||
// @@@ TODO: separate by properties ID and feed individually ...
|
||||
db::properties_id_type prop_id = 0;
|
||||
|
||||
ep.clear ();
|
||||
|
||||
size_t id = 0;
|
||||
|
|
@ -235,7 +238,7 @@ private:
|
|||
ep.insert (per_edge_clip_box, size_t (1));
|
||||
|
||||
db::BooleanOp and_op (db::BooleanOp::And);
|
||||
db::PolygonContainer pc (merged_neighbors [n->first]);
|
||||
db::PolygonContainerWithProperties pc (merged_neighbors [n->first], prop_id);
|
||||
db::PolygonGenerator pg (pc, false);
|
||||
ep.process (pg, and_op);
|
||||
|
||||
|
|
@ -300,46 +303,46 @@ private:
|
|||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_collect_neighbors (db::box_scanner2<db::Edge, unsigned int, db::Polygon, unsigned int> &scanner, const db::Layout *layout, const db::Cell *cell) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_collect_neighbors (db::box_scanner2<db::EdgeWithProperties, unsigned int, db::PolygonWithProperties, unsigned int> &scanner, const db::Layout *layout, const db::Cell *cell) const
|
||||
{
|
||||
EdgeCollectorReceiver rec (const_cast<db::EdgeNeighborhoodVisitor *> (mp_visitor.get ()), layout, cell, m_bext, m_eext, m_din, m_dout);
|
||||
scanner.process (rec, computed_dist (), db::box_convert<db::Edge> (), db::box_convert<db::Polygon> ());
|
||||
scanner.process (rec, computed_dist (), db::box_convert<db::EdgeWithProperties> (), db::box_convert<db::PolygonWithProperties> ());
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
compute_local_impl<db::PolygonRef, db::Edge> (cache, layout, cell, interactions, results, proc);
|
||||
compute_local_impl<db::PolygonRefWithProperties, db::EdgeWithProperties> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Edge> > &results, const db::LocalProcessorBase *proc) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgeWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
compute_local_impl<db::Polygon, db::Edge> (cache, layout, cell, interactions, results, proc);
|
||||
compute_local_impl<db::PolygonWithProperties, db::EdgeWithProperties> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, const db::LocalProcessorBase *proc) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
compute_local_impl<db::Polygon, db::Polygon> (cache, layout, cell, interactions, results, proc);
|
||||
compute_local_impl<db::PolygonWithProperties, db::PolygonWithProperties> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
compute_local_impl<db::Polygon, db::EdgePair> (cache, layout, cell, interactions, results, proc);
|
||||
compute_local_impl<db::PolygonWithProperties, db::EdgePairWithProperties> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, const db::LocalProcessorBase *proc) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::PolygonRefWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
compute_local_impl<db::PolygonRef, db::PolygonRef> (cache, layout, cell, interactions, results, proc);
|
||||
compute_local_impl<db::PolygonRefWithProperties, db::PolygonRefWithProperties> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
void
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase *proc) const
|
||||
EdgeNeighborhoodCompoundOperationNode::do_compute_local (CompoundRegionOperationCache *cache, db::Layout *layout, db::Cell *cell, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
compute_local_impl<db::PolygonRef, db::EdgePair> (cache, layout, cell, interactions, results, proc);
|
||||
compute_local_impl<db::PolygonRefWithProperties, db::EdgePairWithProperties> (cache, layout, cell, interactions, results, proc);
|
||||
}
|
||||
|
||||
template <class T, class TR>
|
||||
|
|
@ -356,10 +359,10 @@ EdgeNeighborhoodCompoundOperationNode::compute_local_impl (CompoundRegionOperati
|
|||
|
||||
mp_visitor->connect_output (layout, &results.front ());
|
||||
|
||||
db::box_scanner2<db::Edge, unsigned int, db::Polygon, unsigned int> scanner;
|
||||
db::box_scanner2<db::EdgeWithProperties, unsigned int, db::PolygonWithProperties, unsigned int> scanner;
|
||||
|
||||
std::list<db::Edge> edges;
|
||||
std::list<db::Polygon> polygons;
|
||||
std::list<db::EdgeWithProperties> edges;
|
||||
std::list<db::PolygonWithProperties> polygons;
|
||||
|
||||
for (unsigned int i = 0; i < children (); ++i) {
|
||||
|
||||
|
|
@ -370,7 +373,7 @@ EdgeNeighborhoodCompoundOperationNode::compute_local_impl (CompoundRegionOperati
|
|||
child (i)->compute_local (cache, layout, cell, interactions_for_child (interactions, i, computed_interactions), others, proc);
|
||||
|
||||
for (auto p = others.front ().begin (); p != others.front ().end (); ++p) {
|
||||
polygons.push_back (p->instantiate ());
|
||||
polygons.push_back (db::PolygonWithProperties (p->instantiate (), p->properties_id ()));
|
||||
scanner.insert2 (&polygons.back (), i);
|
||||
}
|
||||
|
||||
|
|
@ -379,11 +382,11 @@ EdgeNeighborhoodCompoundOperationNode::compute_local_impl (CompoundRegionOperati
|
|||
const T &pr = interactions.begin_subjects ()->second;
|
||||
unsigned int ie = 0;
|
||||
for (auto e = pr.begin_edge (); ! e.at_end (); ++e, ++ie) {
|
||||
edges.push_back (*e);
|
||||
edges.push_back (db::EdgeWithProperties (*e, pr.properties_id ()));
|
||||
scanner.insert1 (&edges.back (), ie);
|
||||
}
|
||||
|
||||
const_cast<db::EdgeNeighborhoodVisitor *> (mp_visitor.get ())->begin_polygon (layout, cell, pr.instantiate ());
|
||||
const_cast<db::EdgeNeighborhoodVisitor *> (mp_visitor.get ())->begin_polygon (layout, cell, db::PolygonWithProperties (pr.instantiate (), pr.properties_id ()));
|
||||
do_collect_neighbors (scanner, layout, cell);
|
||||
const_cast<db::EdgeNeighborhoodVisitor *> (mp_visitor.get ())->end_polygon ();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class DB_PUBLIC EdgeNeighborhoodVisitor
|
|||
public:
|
||||
typedef std::pair<double, double> position_interval_type;
|
||||
typedef unsigned int input_key_type;
|
||||
typedef std::vector<db::Polygon> neighbor_shapes_type;
|
||||
typedef std::vector<db::PolygonWithProperties> neighbor_shapes_type;
|
||||
typedef std::map<input_key_type, neighbor_shapes_type> neighbors_per_interval_type;
|
||||
typedef std::vector<std::pair<position_interval_type, neighbors_per_interval_type> > neighbors_type;
|
||||
|
||||
|
|
@ -59,22 +59,22 @@ public:
|
|||
/**
|
||||
* @brief Configure the polygon output
|
||||
*/
|
||||
void connect_output (db::Layout * /*layout*/, std::unordered_set<db::Polygon> *polygons) const;
|
||||
void connect_output (db::Layout * /*layout*/, std::unordered_set<db::PolygonWithProperties> *polygons) const;
|
||||
|
||||
/**
|
||||
* @brief Configure the polygon ref output
|
||||
*/
|
||||
void connect_output (db::Layout *layout, std::unordered_set<db::PolygonRef> *polygons) const;
|
||||
void connect_output (db::Layout *layout, std::unordered_set<db::PolygonRefWithProperties> *polygons) const;
|
||||
|
||||
/**
|
||||
* @brief Configure the edge output
|
||||
*/
|
||||
void connect_output (db::Layout * /*layout*/, std::unordered_set<db::Edge> *edges) const;
|
||||
void connect_output (db::Layout * /*layout*/, std::unordered_set<db::EdgeWithProperties> *edges) const;
|
||||
|
||||
/**
|
||||
* @brief Configure the edge pair output
|
||||
*/
|
||||
void connect_output (db::Layout * /*layout*/, std::unordered_set<db::EdgePair> *edge_pairs) const;
|
||||
void connect_output (db::Layout * /*layout*/, std::unordered_set<db::EdgePairWithProperties> *edge_pairs) const;
|
||||
|
||||
/**
|
||||
* @brief Disconnects output
|
||||
|
|
@ -86,7 +86,7 @@ public:
|
|||
* Following this event, the edges with their neighborhood are reported.
|
||||
* After the edges are reported, "end_polygon" is called.
|
||||
*/
|
||||
virtual void begin_polygon (const db::Layout * /*layout*/, const db::Cell * /*cell*/, const db::Polygon & /*polygon*/) { }
|
||||
virtual void begin_polygon (const db::Layout * /*layout*/, const db::Cell * /*cell*/, const db::PolygonWithProperties & /*polygon*/) { }
|
||||
|
||||
/**
|
||||
* @brief Event handler called after the polygon was processed
|
||||
|
|
@ -96,7 +96,7 @@ public:
|
|||
/**
|
||||
* @brief Event handler for each edge plus it's neighborhood
|
||||
*/
|
||||
virtual void on_edge (const db::Layout * /*layout*/, const db::Cell * /*cell*/, const db::Edge & /*edge*/, const neighbors_type & /*neighbors*/) { }
|
||||
virtual void on_edge (const db::Layout * /*layout*/, const db::Cell * /*cell*/, const db::EdgeWithProperties & /*edge*/, const neighbors_type & /*neighbors*/) { }
|
||||
|
||||
/**
|
||||
* @brief Gets a transformation to transform from edge-local space to original space
|
||||
|
|
@ -128,26 +128,26 @@ public:
|
|||
* @brief Delivers a polygon
|
||||
* This function is only permitted if the result type is Region.
|
||||
*/
|
||||
void output_polygon (const db::Polygon &poly);
|
||||
void output_polygon (const PolygonWithProperties &poly);
|
||||
|
||||
/**
|
||||
* @brief Delivers an edge
|
||||
* This function is only permitted if the result type is Edges.
|
||||
*/
|
||||
void output_edge (const db::Edge &edge);
|
||||
void output_edge (const db::EdgeWithProperties &edge);
|
||||
|
||||
/**
|
||||
* @brief Delivers an edge pair object
|
||||
* This function is only permitted if the result type is EdgePairs.
|
||||
*/
|
||||
void output_edge_pair (const db::EdgePair &edge_pair);
|
||||
void output_edge_pair (const db::EdgePairWithProperties &edge_pair);
|
||||
|
||||
private:
|
||||
db::CompoundRegionOperationNode::ResultType m_result_type;
|
||||
mutable std::unordered_set<db::Polygon> *mp_polygons;
|
||||
mutable std::unordered_set<db::PolygonRef> *mp_polygon_refs;
|
||||
mutable std::unordered_set<db::Edge> *mp_edges;
|
||||
mutable std::unordered_set<db::EdgePair> *mp_edge_pairs;
|
||||
mutable std::unordered_set<db::PolygonWithProperties> *mp_polygons;
|
||||
mutable std::unordered_set<db::PolygonRefWithProperties> *mp_polygon_refs;
|
||||
mutable std::unordered_set<db::EdgeWithProperties> *mp_edges;
|
||||
mutable std::unordered_set<db::EdgePairWithProperties> *mp_edge_pairs;
|
||||
mutable db::Layout *mp_layout;
|
||||
};
|
||||
|
||||
|
|
@ -174,25 +174,18 @@ protected:
|
|||
virtual db::Coord computed_dist () const;
|
||||
virtual std::string generated_description () const;
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::Edge> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::Polygon> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::Polygon, db::Polygon> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRef> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRef, db::PolygonRef> & /*interactions*/, std::vector<std::unordered_set<db::EdgePair> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const { }
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonWithProperties, db::PolygonWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::PolygonRefWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgeWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<db::PolygonRefWithProperties, db::PolygonRefWithProperties> & /*interactions*/, std::vector<std::unordered_set<db::EdgePairWithProperties> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
|
||||
private:
|
||||
db::Coord m_bext, m_eext, m_din, m_dout;
|
||||
tl::weak_ptr<EdgeNeighborhoodVisitor> mp_visitor;
|
||||
|
||||
void do_collect_neighbors (db::box_scanner2<db::Edge, unsigned int, db::Polygon, unsigned int> &scanner, const db::Layout *layout, const db::Cell *cell) const;
|
||||
void do_collect_neighbors (db::box_scanner2<db::EdgeWithProperties, unsigned int, db::PolygonWithProperties, unsigned int> &scanner, const db::Layout *layout, const db::Cell *cell) const;
|
||||
|
||||
template <class T, class TR>
|
||||
void compute_local_impl (CompoundRegionOperationCache * /*cache*/, db::Layout * /*layout*/, db::Cell * /*cell*/, const shape_interactions<T, T> & /*interactions*/, std::vector<std::unordered_set<TR> > & /*results*/, const db::LocalProcessorBase * /*proc*/) const;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void process(const EdgePairWithProperties &ep, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
db::Polygon poly = ep.normalized ().to_polygon (m_e);
|
||||
if (poly.vertices () >= 3) {
|
||||
res.push_back (db::PolygonWithProperties (poly, ep.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
db::Coord m_e;
|
||||
};
|
||||
|
|
@ -77,6 +85,12 @@ public:
|
|||
res.push_back (ep.first ());
|
||||
res.push_back (ep.second ());
|
||||
}
|
||||
|
||||
void process(const EdgePairWithProperties &ep, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::EdgeWithProperties (ep.first (), ep.properties_id ()));
|
||||
res.push_back (db::EdgeWithProperties (ep.second (), ep.properties_id ()));
|
||||
}
|
||||
};
|
||||
|
||||
class DB_PUBLIC
|
||||
|
|
@ -94,6 +108,14 @@ public:
|
|||
res.push_back (ep.second ());
|
||||
}
|
||||
}
|
||||
|
||||
void process(const EdgePairWithProperties &ep, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::EdgeWithProperties (ep.first (), ep.properties_id ()));
|
||||
if (ep.is_symmetric ()) {
|
||||
res.push_back (db::EdgeWithProperties (ep.second (), ep.properties_id ()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class DB_PUBLIC
|
||||
|
|
@ -110,6 +132,13 @@ public:
|
|||
res.push_back (ep.second ());
|
||||
}
|
||||
}
|
||||
|
||||
void process(const EdgePairWithProperties &ep, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
if (! ep.is_symmetric ()) {
|
||||
res.push_back (db::EdgeWithProperties (ep.second (), ep.properties_id ()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class DB_PUBLIC
|
||||
|
|
@ -124,6 +153,11 @@ public:
|
|||
{
|
||||
res.push_back (ep.lesser ());
|
||||
}
|
||||
|
||||
void process(const EdgePairWithProperties &ep, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::EdgeWithProperties (ep.lesser (), ep.properties_id ()));
|
||||
}
|
||||
};
|
||||
|
||||
class DB_PUBLIC
|
||||
|
|
@ -138,6 +172,11 @@ public:
|
|||
{
|
||||
res.push_back (ep.greater ());
|
||||
}
|
||||
|
||||
void process(const EdgePairWithProperties &ep, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::EdgeWithProperties (ep.greater (), ep.properties_id ()));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -212,6 +212,34 @@ EdgeSegmentSelector::process (const db::Edge &edge, std::vector<db::Edge> &res)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
EdgeSegmentSelector::process (const db::EdgeWithProperties &edge, std::vector<db::EdgeWithProperties> &res) const
|
||||
{
|
||||
double l = std::max (edge.double_length () * m_fraction, double (m_length));
|
||||
|
||||
db::DVector ds;
|
||||
if (! edge.is_degenerate ()) {
|
||||
ds = db::DVector (edge.d ()) * (l / edge.double_length ());
|
||||
}
|
||||
|
||||
if (m_mode < 0) {
|
||||
|
||||
res.push_back (db::EdgeWithProperties (db::Edge (edge.p1 (), db::Point (db::DPoint (edge.p1 ()) + ds)), edge.properties_id ()));
|
||||
|
||||
} else if (m_mode > 0) {
|
||||
|
||||
res.push_back (db::EdgeWithProperties (db::Edge (db::Point (db::DPoint (edge.p2 ()) - ds), edge.p2 ()), edge.properties_id ()));
|
||||
|
||||
} else {
|
||||
|
||||
db::DVector dl = ds * 0.5;
|
||||
db::DPoint center = db::DPoint (edge.p1 ()) + db::DVector (edge.p2 () - edge.p1 ()) * 0.5;
|
||||
|
||||
res.push_back (db::EdgeWithProperties (db::Edge (db::Point (center - dl), db::Point (center + dl)), edge.properties_id ()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// EdgeAngleChecker implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -626,6 +626,11 @@ public:
|
|||
res.push_back (extended_edge (edge, m_ext_b, m_ext_e, m_ext_o, m_ext_i));
|
||||
}
|
||||
|
||||
virtual void process (const EdgeWithProperties &edge, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::PolygonWithProperties (extended_edge (edge, m_ext_b, m_ext_e, m_ext_o, m_ext_i), edge.properties_id ()));
|
||||
}
|
||||
|
||||
private:
|
||||
db::Coord m_ext_b, m_ext_e, m_ext_o, m_ext_i;
|
||||
};
|
||||
|
|
@ -641,6 +646,7 @@ public:
|
|||
~EdgeSegmentSelector ();
|
||||
|
||||
virtual void process (const db::Edge &edge, std::vector<db::Edge> &res) const;
|
||||
virtual void process (const db::EdgeWithProperties &edge, std::vector<db::EdgeWithProperties> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
|
|||
|
|
@ -361,14 +361,14 @@ separate_interactions_by_properties (const shape_interactions<db::object_with_pr
|
|||
template <class TS, class TI>
|
||||
DB_PUBLIC_TEMPLATE
|
||||
std::map<db::properties_id_type, db::shape_interactions<TS, TI> >
|
||||
separate_interactions_to_interactions_by_properties (const shape_interactions<db::object_with_properties<TS>, db::object_with_properties<TI> > &interactions, db::PropertyConstraint property_constraint)
|
||||
separate_interactions_to_interactions_by_properties (const shape_interactions<TS, TI> &interactions, db::PropertyConstraint property_constraint)
|
||||
{
|
||||
std::map<db::properties_id_type, db::shape_interactions<TS, TI> > by_prop_id;
|
||||
std::map<db::properties_id_type, std::set<unsigned int> > intruder_ids_by_prop_id;
|
||||
|
||||
for (auto i = interactions.begin (); i != interactions.end (); ++i) {
|
||||
|
||||
const db::object_with_properties<TS> &subject = interactions.subject_shape (i->first);
|
||||
const TS &subject = interactions.subject_shape (i->first);
|
||||
db::properties_id_type prop_id = subject.properties_id ();
|
||||
|
||||
db::shape_interactions<TS, TI> &s2p = by_prop_id [prop_id];
|
||||
|
|
@ -377,7 +377,7 @@ separate_interactions_to_interactions_by_properties (const shape_interactions<db
|
|||
|
||||
for (auto ii = i->second.begin (); ii != i->second.end (); ++ii) {
|
||||
|
||||
const std::pair<unsigned int, db::object_with_properties<TI> > &intruder = interactions.intruder_shape (*ii);
|
||||
const std::pair<unsigned int, TI> &intruder = interactions.intruder_shape (*ii);
|
||||
|
||||
if (pc_match (property_constraint, prop_id, intruder.second.properties_id ())) {
|
||||
s2p.add_interaction (i->first, *ii);
|
||||
|
|
|
|||
|
|
@ -246,6 +246,16 @@ operator<< (std::ostream &os, const object_with_properties<T> &p)
|
|||
return (os << p.to_string ());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Transformation of an object with properties
|
||||
*/
|
||||
template <class Tr, class T>
|
||||
inline db::object_with_properties<T>
|
||||
operator* (const Tr &t, const db::object_with_properties<T> &s)
|
||||
{
|
||||
return db::object_with_properties<T> (s.transformed (t), s.properties_id ());
|
||||
}
|
||||
|
||||
} // namespace db
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "dbEdge.h"
|
||||
#include "dbEdgeProcessor.h"
|
||||
#include "dbPolygon.h"
|
||||
#include "dbObjectWithProperties.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -395,6 +396,74 @@ private:
|
|||
bool m_clear;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A simple polygon receiver collecting the simple polygons in a vector with common properties
|
||||
*
|
||||
* This class implements the SimplePolygonSink interface.
|
||||
* Like EdgeContainer, this receiver collects the objects either in an external
|
||||
* or an internal vector of polygons.
|
||||
*/
|
||||
class DB_PUBLIC SimplePolygonContainerWithProperties
|
||||
: public SimplePolygonSink
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor specifying an external vector for storing the polygons
|
||||
*/
|
||||
SimplePolygonContainerWithProperties (std::vector<db::SimplePolygonWithProperties> &polygons, db::properties_id_type prop_id, bool clear = false)
|
||||
: SimplePolygonSink (), mp_polygons (&polygons), m_prop_id (prop_id), m_clear (clear)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief Constructor which tells the container to use the internal vector for storing the polygons
|
||||
*/
|
||||
SimplePolygonContainerWithProperties ()
|
||||
: SimplePolygonSink (), mp_polygons (&m_polygons), m_prop_id (0), m_clear (false)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief Start the sequence
|
||||
*/
|
||||
virtual void start ()
|
||||
{
|
||||
if (m_clear) {
|
||||
mp_polygons->clear ();
|
||||
// The single-shot scheme is a easy way to overcome problems with multiple start/flush brackets (i.e. on size filter)
|
||||
m_clear = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The polygons collected so far (const version)
|
||||
*/
|
||||
const std::vector<db::SimplePolygonWithProperties> &polygons () const
|
||||
{
|
||||
return *mp_polygons;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The polygons collected so far (non-const version)
|
||||
*/
|
||||
std::vector<db::SimplePolygonWithProperties> &polygons ()
|
||||
{
|
||||
return *mp_polygons;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Implementation of the PolygonSink interface
|
||||
*/
|
||||
virtual void put (const db::SimplePolygon &polygon)
|
||||
{
|
||||
mp_polygons->push_back (db::SimplePolygonWithProperties (polygon, m_prop_id));
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<db::SimplePolygonWithProperties> m_polygons;
|
||||
std::vector<db::SimplePolygonWithProperties> *mp_polygons;
|
||||
db::properties_id_type m_prop_id;
|
||||
bool m_clear;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Declaration of the polygon sink interface
|
||||
*/
|
||||
|
|
@ -503,6 +572,74 @@ private:
|
|||
bool m_clear;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A polygon receiver collecting the polygons in a vector with a common properties ID
|
||||
*
|
||||
* This class implements the PolygonSink interface.
|
||||
* Like EdgeContainer, this receiver collects the objects either in an external
|
||||
* or an internal vector of polygons.
|
||||
*/
|
||||
class DB_PUBLIC PolygonContainerWithProperties
|
||||
: public PolygonSink
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor specifying an external vector for storing the polygons
|
||||
*/
|
||||
PolygonContainerWithProperties (std::vector<db::PolygonWithProperties> &polygons, db::properties_id_type prop_id, bool clear = false)
|
||||
: PolygonSink (), mp_polygons (&polygons), m_prop_id (prop_id), m_clear (clear)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief Constructor which tells the container to use the internal vector for storing the polygons
|
||||
*/
|
||||
PolygonContainerWithProperties ()
|
||||
: PolygonSink (), mp_polygons (&m_polygons), m_prop_id (0), m_clear (false)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief The polygons collected so far (const version)
|
||||
*/
|
||||
const std::vector<db::PolygonWithProperties> &polygons () const
|
||||
{
|
||||
return *mp_polygons;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The polygons collected so far (non-const version)
|
||||
*/
|
||||
std::vector<db::PolygonWithProperties> &polygons ()
|
||||
{
|
||||
return *mp_polygons;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Start the sequence
|
||||
*/
|
||||
virtual void start ()
|
||||
{
|
||||
if (m_clear) {
|
||||
mp_polygons->clear ();
|
||||
// The single-shot scheme is a easy way to overcome problems with multiple start/flush brackets (i.e. on size filter)
|
||||
m_clear = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Implementation of the PolygonSink interface
|
||||
*/
|
||||
virtual void put (const db::Polygon &polygon)
|
||||
{
|
||||
mp_polygons->push_back (db::PolygonWithProperties (polygon, m_prop_id));
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<db::PolygonWithProperties> m_polygons;
|
||||
std::vector<db::PolygonWithProperties> *mp_polygons;
|
||||
db::properties_id_type m_prop_id;
|
||||
bool m_clear;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A polygon filter that sizes the polygons
|
||||
*
|
||||
|
|
|
|||
|
|
@ -718,6 +718,20 @@ check_local_operation<TS, TI>::do_compute_local (db::Layout *layout, db::Cell *s
|
|||
results.front ().insert (result.begin (), result.end ());
|
||||
}
|
||||
|
||||
template <class TS, class TI>
|
||||
void
|
||||
check_local_operation<TS, TI>::do_compute_local (db::Layout *layout, db::Cell *subject_cell, const shape_interactions<TS, TI> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase *proc) const
|
||||
{
|
||||
std::vector<std::unordered_set<db::EdgePair> > tmp_results;
|
||||
tmp_results.push_back (std::unordered_set<db::EdgePair> ());
|
||||
|
||||
do_compute_local (layout, subject_cell, interactions, tmp_results, proc);
|
||||
|
||||
// NOTE: there is no specific property support currently, so we just set to "no properties"
|
||||
for (auto i = tmp_results.front ().begin (); i != tmp_results.front ().end (); ++i) {
|
||||
results.front ().insert (db::EdgePairWithProperties (*i, db::properties_id_type (0)));
|
||||
}
|
||||
}
|
||||
|
||||
template <class TS, class TI>
|
||||
db::Coord
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ public:
|
|||
virtual std::string description () const;
|
||||
|
||||
virtual void do_compute_local (db::Layout *layout, db::Cell *subject_cell, const shape_interactions<TS, TI> &interactions, std::vector<std::unordered_set<db::EdgePair> > &results, const db::LocalProcessorBase * /*proc*/) const;
|
||||
virtual void do_compute_local (db::Layout *layout, db::Cell *subject_cell, const shape_interactions<TS, TI> &interactions, std::vector<std::unordered_set<db::EdgePairWithProperties> > &results, const db::LocalProcessorBase * /*proc*/) const;
|
||||
|
||||
virtual const db::TransformationReducer *vars () const { return &m_vars; }
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,35 @@ void CornerDetectorCore::detect_corners (const db::Polygon &poly, const CornerPo
|
|||
}
|
||||
}
|
||||
|
||||
void CornerDetectorCore::detect_corners (const db::PolygonWithProperties &poly, const CornerPointDelivery &delivery) const
|
||||
{
|
||||
size_t n = poly.holes () + 1;
|
||||
for (size_t i = 0; i < n; ++i) {
|
||||
|
||||
const db::Polygon::contour_type &ctr = poly.contour (int (i));
|
||||
size_t nn = ctr.size ();
|
||||
if (nn > 2) {
|
||||
|
||||
db::Point pp = ctr [nn - 2];
|
||||
db::Point pt = ctr [nn - 1];
|
||||
for (size_t j = 0; j < nn; ++j) {
|
||||
|
||||
db::Point pn = ctr [j];
|
||||
|
||||
if (m_checker (pt - pp, pn - pt)) {
|
||||
delivery.make_point (pt, db::Edge (pp, pt), db::Edge (pt, pn), poly.properties_id ());
|
||||
}
|
||||
|
||||
pp = pt;
|
||||
pt = pn;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Extents implementation
|
||||
|
||||
|
|
@ -76,6 +105,14 @@ void Extents::process (const db::Polygon &poly, std::vector<db::Polygon> &result
|
|||
}
|
||||
}
|
||||
|
||||
void Extents::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
db::Box b = poly.box ();
|
||||
if (! b.empty ()) {
|
||||
result.push_back (db::PolygonWithProperties (db::Polygon (b), poly.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// RelativeExtents implementation
|
||||
|
||||
|
|
@ -92,6 +129,19 @@ void RelativeExtents::process (const db::Polygon &poly, std::vector<db::Polygon>
|
|||
}
|
||||
}
|
||||
|
||||
void RelativeExtents::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
db::Box b = poly.box ();
|
||||
db::Point p1 (b.left () + db::coord_traits<db::Coord>::rounded (m_fx1 * b.width ()),
|
||||
b.bottom () + db::coord_traits<db::Coord>::rounded (m_fy1 * b.height ()));
|
||||
db::Point p2 (b.left () + db::coord_traits<db::Coord>::rounded (m_fx2 * b.width ()),
|
||||
b.bottom () + db::coord_traits<db::Coord>::rounded (m_fy2 * b.height ()));
|
||||
db::Box box = db::Box (p1, p2).enlarged (db::Vector (m_dx, m_dy));
|
||||
if (! box.empty ()) {
|
||||
result.push_back (db::PolygonWithProperties (db::Polygon (box), poly.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
const TransformationReducer *RelativeExtents::vars () const
|
||||
{
|
||||
if (m_dx == 0 && m_dy == 0 && fabs (m_fx1) < db::epsilon && fabs (m_fy1) < db::epsilon && fabs (1.0 - m_fx2) < db::epsilon && fabs (1.0 - m_fy2) < db::epsilon) {
|
||||
|
|
@ -116,6 +166,16 @@ void RelativeExtentsAsEdges::process (const db::Polygon &poly, std::vector<db::E
|
|||
result.push_back (db::Edge (p1, p2));
|
||||
}
|
||||
|
||||
void RelativeExtentsAsEdges::process (const db::PolygonWithProperties &poly, std::vector<db::EdgeWithProperties> &result) const
|
||||
{
|
||||
db::Box b = poly.box ();
|
||||
db::Point p1 (b.left () + db::coord_traits<db::Coord>::rounded (m_fx1 * b.width ()),
|
||||
b.bottom () + db::coord_traits<db::Coord>::rounded (m_fy1 * b.height ()));
|
||||
db::Point p2 (b.left () + db::coord_traits<db::Coord>::rounded (m_fx2 * b.width ()),
|
||||
b.bottom () + db::coord_traits<db::Coord>::rounded (m_fy2 * b.height ()));
|
||||
result.push_back (db::EdgeWithProperties (db::Edge (p1, p2), poly.properties_id ()));
|
||||
}
|
||||
|
||||
const TransformationReducer *RelativeExtentsAsEdges::vars () const
|
||||
{
|
||||
if (fabs (m_fx1) < db::epsilon && fabs (m_fy1) < db::epsilon && fabs (1.0 - m_fx2) < db::epsilon && fabs (1.0 - m_fy2) < db::epsilon) {
|
||||
|
|
@ -237,6 +297,28 @@ void PolygonToEdgeProcessor::process (const db::Polygon &poly, std::vector<db::E
|
|||
}
|
||||
}
|
||||
|
||||
void PolygonToEdgeProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::EdgeWithProperties> &result) const
|
||||
{
|
||||
if (m_mode == All) {
|
||||
|
||||
for (db::Polygon::polygon_edge_iterator e = poly.begin_edge (); ! e.at_end (); ++e) {
|
||||
result.push_back (db::EdgeWithProperties (*e, poly.properties_id ()));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
std::vector<db::Edge> edges;
|
||||
for (unsigned int i = 0; i < poly.holes () + 1; ++i) {
|
||||
contour_to_edges (poly.contour (i), m_mode, edges);
|
||||
}
|
||||
|
||||
for (auto e = edges.begin (); e != edges.end (); ++e) {
|
||||
result.push_back (db::EdgeWithProperties (*e, poly.properties_id ()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// ConvexDecomposition implementation
|
||||
|
||||
|
|
@ -249,6 +331,15 @@ void ConvexDecomposition::process (const db::Polygon &poly, std::vector<db::Poly
|
|||
}
|
||||
}
|
||||
|
||||
void ConvexDecomposition::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
db::SimplePolygonContainer sp;
|
||||
db::decompose_convex (poly, m_mode, sp);
|
||||
for (std::vector <db::SimplePolygon>::const_iterator i = sp.polygons ().begin (); i != sp.polygons ().end (); ++i) {
|
||||
result.push_back (db::PolygonWithProperties (db::simple_polygon_to_polygon (*i), poly.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// TrapezoidDecomposition implementation
|
||||
|
||||
|
|
@ -261,6 +352,15 @@ void TrapezoidDecomposition::process (const db::Polygon &poly, std::vector<db::P
|
|||
}
|
||||
}
|
||||
|
||||
void TrapezoidDecomposition::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
db::SimplePolygonContainer sp;
|
||||
db::decompose_trapezoids (poly, m_mode, sp);
|
||||
for (std::vector <db::SimplePolygon>::const_iterator i = sp.polygons ().begin (); i != sp.polygons ().end (); ++i) {
|
||||
result.push_back (db::PolygonWithProperties (db::simple_polygon_to_polygon (*i), poly.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// PolygonBreaker implementation
|
||||
|
||||
|
|
@ -279,6 +379,21 @@ void PolygonBreaker::process (const db::Polygon &poly, std::vector<db::Polygon>
|
|||
}
|
||||
}
|
||||
|
||||
void PolygonBreaker::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
if (db::suggest_split_polygon (poly, m_max_vertex_count, m_max_area_ratio)) {
|
||||
|
||||
std::vector<db::Polygon> split_polygons;
|
||||
db::split_polygon<db::Polygon> (poly, split_polygons);
|
||||
for (std::vector<db::Polygon>::const_iterator p = split_polygons.begin (); p != split_polygons.end (); ++p) {
|
||||
process (db::PolygonWithProperties (*p, poly.properties_id ()), result);
|
||||
}
|
||||
|
||||
} else {
|
||||
result.push_back (poly);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// PolygonSizer implementation
|
||||
|
||||
|
|
@ -305,6 +420,14 @@ void PolygonSizer::process (const db::Polygon &poly, std::vector<db::Polygon> &r
|
|||
siz.put (poly);
|
||||
}
|
||||
|
||||
void PolygonSizer::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
db::PolygonContainerWithProperties pr (result, poly.properties_id ());
|
||||
db::PolygonGenerator pg2 (pr, false /*don't resolve holes*/, true /*min. coherence*/);
|
||||
db::SizingPolygonFilter siz (pg2, m_dx, m_dy, m_mode);
|
||||
siz.put (poly);
|
||||
}
|
||||
|
||||
bool PolygonSizer::result_is_merged () const
|
||||
{
|
||||
return (m_dx < 0 && m_dy < 0);
|
||||
|
|
@ -345,6 +468,27 @@ TriangulationProcessor::process (const db::Polygon &poly, std::vector<db::Polygo
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
TriangulationProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
// NOTE: we center the polygon for better numerical stability
|
||||
db::CplxTrans trans = db::CplxTrans (triangulation_dbu) * db::ICplxTrans (db::Trans (db::Point () - poly.box ().center ()));
|
||||
|
||||
db::Triangles tri;
|
||||
tri.triangulate (poly, m_param, trans);
|
||||
|
||||
db::Point pts [3];
|
||||
auto trans_inv = trans.inverted ();
|
||||
|
||||
for (auto t = tri.begin (); t != tri.end (); ++t) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
pts [i] = trans_inv * *t->vertex (i);
|
||||
}
|
||||
result.push_back (db::PolygonWithProperties (db::Polygon (), poly.properties_id ()));
|
||||
result.back ().assign_hull (pts + 0, pts + 3);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// DRCHullProcessor implementation
|
||||
|
||||
|
|
@ -449,8 +593,22 @@ static void create_edge_segment (std::vector<db::Point> &points, db::metrics_typ
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
DRCHullProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
db::PolygonContainerWithProperties psink (result, poly.properties_id ());
|
||||
do_process (poly, psink);
|
||||
}
|
||||
|
||||
void
|
||||
DRCHullProcessor::process (const db::Polygon &poly, std::vector<db::Polygon> &result) const
|
||||
{
|
||||
db::PolygonContainer psink (result);
|
||||
do_process (poly, psink);
|
||||
}
|
||||
|
||||
void
|
||||
DRCHullProcessor::do_process (const db::Polygon &poly, db::PolygonSink &psink) const
|
||||
{
|
||||
db::EdgeProcessor ep;
|
||||
std::vector<db::Point> points;
|
||||
|
|
@ -494,7 +652,6 @@ DRCHullProcessor::process (const db::Polygon &poly, std::vector<db::Polygon> &re
|
|||
}
|
||||
|
||||
db::SimpleMerge op;
|
||||
db::PolygonContainer psink (result);
|
||||
db::PolygonGenerator pg (psink, false);
|
||||
ep.process (pg, op);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class DB_PUBLIC CornerPointDelivery
|
|||
{
|
||||
public:
|
||||
virtual void make_point (const db::Point &pt, const db::Edge &e1, const db::Edge &e2) const = 0;
|
||||
virtual void make_point (const db::Point &pt, const db::Edge &e1, const db::Edge &e2, db::properties_id_type prop_id) const = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -54,17 +55,31 @@ class DB_PUBLIC CornerRectDelivery
|
|||
{
|
||||
public:
|
||||
CornerRectDelivery (db::Coord dim, std::vector<db::Polygon> &result)
|
||||
: m_d (dim, dim), mp_result (&result)
|
||||
: m_d (dim, dim), mp_result (&result), mp_result_wp (0)
|
||||
{ }
|
||||
|
||||
CornerRectDelivery (db::Coord dim, std::vector<db::PolygonWithProperties> &result_wp)
|
||||
: m_d (dim, dim), mp_result (0), mp_result_wp (&result_wp)
|
||||
{ }
|
||||
|
||||
virtual void make_point (const db::Point &pt, const db::Edge &, const db::Edge &) const
|
||||
{
|
||||
mp_result->push_back (db::Polygon (db::Box (pt - m_d, pt + m_d)));
|
||||
if (mp_result) {
|
||||
mp_result->push_back (db::Polygon (db::Box (pt - m_d, pt + m_d)));
|
||||
}
|
||||
}
|
||||
|
||||
virtual void make_point (const db::Point &pt, const db::Edge &, const db::Edge &, db::properties_id_type prop_id) const
|
||||
{
|
||||
if (mp_result_wp) {
|
||||
mp_result_wp->push_back (db::PolygonWithProperties (db::Polygon (db::Box (pt - m_d, pt + m_d)), prop_id));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
db::Vector m_d;
|
||||
std::vector<db::Polygon> *mp_result;
|
||||
std::vector<db::PolygonWithProperties> *mp_result_wp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -75,17 +90,31 @@ class DB_PUBLIC CornerDotDelivery
|
|||
{
|
||||
public:
|
||||
CornerDotDelivery (std::vector<db::Edge> &result)
|
||||
: mp_result (&result)
|
||||
: mp_result (&result), mp_result_wp (0)
|
||||
{ }
|
||||
|
||||
CornerDotDelivery (std::vector<db::EdgeWithProperties> &result)
|
||||
: mp_result (0), mp_result_wp (&result)
|
||||
{ }
|
||||
|
||||
virtual void make_point (const db::Point &pt, const db::Edge &, const db::Edge &) const
|
||||
{
|
||||
mp_result->push_back (db::Edge (pt, pt));
|
||||
if (mp_result) {
|
||||
mp_result->push_back (db::Edge (pt, pt));
|
||||
}
|
||||
}
|
||||
|
||||
virtual void make_point (const db::Point &pt, const db::Edge &, const db::Edge &, db::properties_id_type prop_id) const
|
||||
{
|
||||
if (mp_result_wp) {
|
||||
mp_result_wp->push_back (db::EdgeWithProperties (db::Edge (pt, pt), prop_id));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
db::Vector m_d;
|
||||
std::vector<db::Edge> *mp_result;
|
||||
std::vector<db::EdgeWithProperties> *mp_result_wp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -96,16 +125,30 @@ class DB_PUBLIC CornerEdgePairDelivery
|
|||
{
|
||||
public:
|
||||
CornerEdgePairDelivery (std::vector<db::EdgePair> &result)
|
||||
: mp_result (&result)
|
||||
: mp_result (&result), mp_result_wp (0)
|
||||
{ }
|
||||
|
||||
CornerEdgePairDelivery (std::vector<db::EdgePairWithProperties> &result)
|
||||
: mp_result (0), mp_result_wp (&result)
|
||||
{ }
|
||||
|
||||
virtual void make_point (const db::Point &, const db::Edge &e1, const db::Edge &e2) const
|
||||
{
|
||||
mp_result->push_back (db::EdgePair (e1, e2));
|
||||
if (mp_result) {
|
||||
mp_result->push_back (db::EdgePair (e1, e2));
|
||||
}
|
||||
}
|
||||
|
||||
virtual void make_point (const db::Point &, const db::Edge &e1, const db::Edge &e2, db::properties_id_type prop_id) const
|
||||
{
|
||||
if (mp_result_wp) {
|
||||
mp_result_wp->push_back (db::EdgePairWithProperties (db::EdgePair (e1, e2), prop_id));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<db::EdgePair> *mp_result;
|
||||
std::vector<db::EdgePairWithProperties> *mp_result_wp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -118,6 +161,7 @@ public:
|
|||
virtual ~CornerDetectorCore () { }
|
||||
|
||||
void detect_corners (const db::Polygon &poly, const CornerPointDelivery &delivery) const;
|
||||
void detect_corners (const db::PolygonWithProperties &poly, const CornerPointDelivery &delivery) const;
|
||||
|
||||
private:
|
||||
db::EdgeAngleChecker m_checker;
|
||||
|
|
@ -141,6 +185,11 @@ public:
|
|||
detect_corners (poly, CornerRectDelivery (m_dim, result));
|
||||
}
|
||||
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
detect_corners (poly, CornerRectDelivery (m_dim, result));
|
||||
}
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; } // overlaps may happen
|
||||
virtual bool result_must_not_be_merged () const { return false; }
|
||||
|
|
@ -170,6 +219,11 @@ public:
|
|||
detect_corners (poly, CornerDotDelivery (result));
|
||||
}
|
||||
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::EdgeWithProperties> &result) const
|
||||
{
|
||||
detect_corners (poly, CornerDotDelivery (result));
|
||||
}
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
virtual bool result_must_not_be_merged () const { return true; } // to preserve dots
|
||||
|
|
@ -195,6 +249,11 @@ public:
|
|||
detect_corners (poly, CornerEdgePairDelivery (result));
|
||||
}
|
||||
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::EdgePairWithProperties> &result) const
|
||||
{
|
||||
detect_corners (poly, CornerEdgePairDelivery (result));
|
||||
}
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
virtual bool result_must_not_be_merged () const { return true; } // to preserve dots
|
||||
|
|
@ -218,6 +277,7 @@ public:
|
|||
}
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -242,6 +302,7 @@ public:
|
|||
}
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const;
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -274,6 +335,7 @@ public:
|
|||
}
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Edge> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::EdgeWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const;
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -300,6 +362,7 @@ public:
|
|||
PolygonToEdgeProcessor (EdgeMode mode = All);
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Edge> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::EdgeWithProperties> &result) const;
|
||||
|
||||
private:
|
||||
EdgeMode m_mode;
|
||||
|
|
@ -319,6 +382,7 @@ public:
|
|||
}
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -345,6 +409,7 @@ public:
|
|||
}
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -374,6 +439,7 @@ public:
|
|||
}
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -399,6 +465,7 @@ public:
|
|||
virtual const TransformationReducer *vars () const { return m_vars; }
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual bool result_is_merged () const;
|
||||
virtual bool result_must_not_be_merged () const { return false; }
|
||||
|
|
@ -421,6 +488,7 @@ public:
|
|||
TriangulationProcessor (double max_area = 0.0, double min_b = 1.0);
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -453,6 +521,11 @@ public:
|
|||
result.push_back (db::minkowski_sum (poly, m_q, false));
|
||||
}
|
||||
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const
|
||||
{
|
||||
result.push_back (db::PolygonWithProperties (db::minkowski_sum (poly, m_q, false), poly.properties_id ()));
|
||||
}
|
||||
|
||||
// TODO: could be less if the object is symmetric
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -475,11 +548,14 @@ public:
|
|||
DRCHullProcessor (db::Coord d, db::metrics_type metrics, size_t n_circle = 64);
|
||||
|
||||
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
|
||||
void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &result) const;
|
||||
|
||||
private:
|
||||
db::Coord m_d;
|
||||
db::metrics_type m_metrics;
|
||||
size_t m_n_circle;
|
||||
|
||||
void do_process (const db::Polygon &poly, db::PolygonSink &sink) const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -371,6 +371,25 @@ SinglePolygonCheck::process (const db::Polygon &polygon, std::vector<db::EdgePai
|
|||
res.insert (res.end (), result.begin (), result.end ());
|
||||
}
|
||||
|
||||
void
|
||||
SinglePolygonCheck::process (const db::PolygonWithProperties &polygon, std::vector<db::EdgePairWithProperties> &res) const
|
||||
{
|
||||
std::unordered_set<db::EdgePair> result;
|
||||
|
||||
EdgeRelationFilter check (m_relation, m_d, m_options);
|
||||
|
||||
edge2edge_check_negative_or_positive <std::unordered_set<db::EdgePair> > edge_check (check, result, m_options.negative, false /*=same polygons*/, false /*=same layers*/, m_options.shielded, true /*=symmetric*/);
|
||||
poly2poly_check<db::Polygon> poly_check (edge_check);
|
||||
|
||||
do {
|
||||
poly_check.single (polygon, 0);
|
||||
} while (edge_check.prepare_next_pass ());
|
||||
|
||||
for (auto ep = result.begin (); ep != result.end (); ++ep) {
|
||||
res.push_back (db::EdgePairWithProperties (*ep, polygon.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// Strange polygon processor
|
||||
|
||||
|
|
@ -406,6 +425,19 @@ StrangePolygonCheckProcessor::process (const db::Polygon &poly, std::vector<db::
|
|||
ep.process (pg, op);
|
||||
}
|
||||
|
||||
void
|
||||
StrangePolygonCheckProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
EdgeProcessor ep;
|
||||
ep.insert (poly);
|
||||
|
||||
StrangePolygonInsideFunc inside;
|
||||
db::GenericMerge<StrangePolygonInsideFunc> op (inside);
|
||||
db::PolygonContainerWithProperties pc (res, poly.properties_id (), false);
|
||||
db::PolygonGenerator pg (pc, false, false);
|
||||
ep.process (pg, op);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// Smoothing processor
|
||||
|
||||
|
|
@ -419,6 +451,12 @@ SmoothingProcessor::process (const db::Polygon &poly, std::vector<db::Polygon> &
|
|||
res.push_back (db::smooth (poly, m_d, m_keep_hv));
|
||||
}
|
||||
|
||||
void
|
||||
SmoothingProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::PolygonWithProperties (db::smooth (poly, m_d, m_keep_hv), poly.properties_id ()));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// Rounded corners processor
|
||||
|
||||
|
|
@ -435,6 +473,12 @@ RoundedCornersProcessor::process (const db::Polygon &poly, std::vector<db::Polyg
|
|||
res.push_back (db::compute_rounded (poly, m_rinner, m_router, m_n));
|
||||
}
|
||||
|
||||
void
|
||||
RoundedCornersProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::PolygonWithProperties (db::compute_rounded (poly, m_rinner, m_router, m_n), poly.properties_id ()));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// Holes decomposition processor
|
||||
|
||||
|
|
@ -455,6 +499,16 @@ HolesExtractionProcessor::process (const db::Polygon &poly, std::vector<db::Poly
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
HolesExtractionProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
for (size_t i = 0; i < poly.holes (); ++i) {
|
||||
res.push_back (db::PolygonWithProperties ());
|
||||
res.back ().properties_id (poly.properties_id ());
|
||||
res.back ().assign_hull (poly.begin_hole ((unsigned int) i), poly.end_hole ((unsigned int) i));
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// Hull decomposition processor
|
||||
|
||||
|
|
@ -473,4 +527,12 @@ HullExtractionProcessor::process (const db::Polygon &poly, std::vector<db::Polyg
|
|||
res.back ().assign_hull (poly.begin_hull (), poly.end_hull ());
|
||||
}
|
||||
|
||||
void
|
||||
HullExtractionProcessor::process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
res.push_back (db::PolygonWithProperties ());
|
||||
res.back ().properties_id (poly.properties_id ());
|
||||
res.back ().assign_hull (poly.begin_hull (), poly.end_hull ());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -489,6 +489,7 @@ public:
|
|||
~StrangePolygonCheckProcessor ();
|
||||
|
||||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
virtual void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -508,6 +509,7 @@ public:
|
|||
~SmoothingProcessor ();
|
||||
|
||||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
virtual void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return false; }
|
||||
|
|
@ -532,6 +534,7 @@ public:
|
|||
~RoundedCornersProcessor ();
|
||||
|
||||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
virtual void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool result_is_merged () const { return true; } // we believe so ...
|
||||
|
|
@ -556,6 +559,7 @@ public:
|
|||
~HolesExtractionProcessor ();
|
||||
|
||||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
virtual void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; } // isn't merged for nested holes :(
|
||||
|
|
@ -575,6 +579,7 @@ public:
|
|||
~HullExtractionProcessor ();
|
||||
|
||||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
virtual void process (const db::PolygonWithProperties &poly, std::vector<db::PolygonWithProperties> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return false; } // isn't merged for nested hulls :(
|
||||
|
|
@ -593,6 +598,7 @@ public:
|
|||
SinglePolygonCheck (db::edge_relation_type rel, db::Coord d, const RegionCheckOptions &options);
|
||||
|
||||
virtual void process (const db::Polygon &polygon, std::vector<db::EdgePair> &res) const;
|
||||
virtual void process (const db::PolygonWithProperties &polygon, std::vector<db::EdgePairWithProperties> &res) const;
|
||||
virtual const TransformationReducer *vars () const { return &m_vars; }
|
||||
virtual bool wants_variants () const { return true; }
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,13 @@ public:
|
|||
*/
|
||||
virtual void process (const Shape &shape, std::vector<Result> &res) const = 0;
|
||||
|
||||
/**
|
||||
* @brief Performs the actual processing with properties
|
||||
* This method will take the input edge from "edge" and puts the results into "res".
|
||||
* "res" can be empty - in this case, the edge will be skipped.
|
||||
*/
|
||||
virtual void process (const db::object_with_properties<Shape> &shape, std::vector<db::object_with_properties<Result> > &res) const = 0;
|
||||
|
||||
/**
|
||||
* @brief Returns the transformation reducer for building cell variants
|
||||
* This method may return 0. In this case, not cell variants are built.
|
||||
|
|
@ -289,6 +296,15 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void process (const db::object_with_properties<Shape> &s, std::vector<db::PolygonWithProperties> &res) const
|
||||
{
|
||||
db::box_convert<db::object_with_properties<Shape> > bc;
|
||||
db::Box box = bc (s).enlarged (db::Vector (m_dx, m_dy));
|
||||
if (! box.empty ()) {
|
||||
res.push_back (db::PolygonWithProperties (db::Polygon (box), s.properties_id ()));
|
||||
}
|
||||
}
|
||||
|
||||
virtual const db::TransformationReducer *vars () const
|
||||
{
|
||||
if (m_dx == 0 && m_dy == 0) {
|
||||
|
|
|
|||
|
|
@ -324,11 +324,21 @@ public:
|
|||
res = do_process (shape);
|
||||
}
|
||||
|
||||
virtual void process (const db::object_with_properties<shape_type> &shape, std::vector<db::object_with_properties<result_type> > &res) const
|
||||
{
|
||||
res = do_process (shape);
|
||||
}
|
||||
|
||||
std::vector<result_type> issue_do_process (const shape_type &) const
|
||||
{
|
||||
return std::vector<result_type> ();
|
||||
}
|
||||
|
||||
std::vector<db::object_with_properties<result_type> > issue_do_process_wp (const db::object_with_properties<shape_type> &) const
|
||||
{
|
||||
return std::vector<db::object_with_properties<result_type> > ();
|
||||
}
|
||||
|
||||
std::vector<result_type> do_process (const shape_type &shape) const
|
||||
{
|
||||
if (f_process.can_issue ()) {
|
||||
|
|
@ -338,7 +348,24 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<db::object_with_properties<result_type> > do_process (const db::object_with_properties<shape_type> &shape) const
|
||||
{
|
||||
if (f_process_wp.can_issue ()) {
|
||||
return f_process.issue<shape_processor_impl, std::vector<db::object_with_properties<result_type> >, const db::object_with_properties<shape_type> &> (&shape_processor_impl::issue_do_process_wp, shape);
|
||||
} else if (f_process.can_issue ()) {
|
||||
auto tmp_result = f_process.issue<shape_processor_impl, std::vector<result_type>, const shape_type &> (&shape_processor_impl::issue_do_process, shape);
|
||||
std::vector<db::object_with_properties<result_type> > result;
|
||||
for (auto i = tmp_result.begin (); i != tmp_result.end (); ++i) {
|
||||
result.push_back (db::object_with_properties<result_type> (*i, shape.properties_id ()));
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
return issue_do_process_wp (shape);
|
||||
}
|
||||
}
|
||||
|
||||
gsi::Callback f_process;
|
||||
gsi::Callback f_process_wp;
|
||||
|
||||
static gsi::Methods method_decls (bool with_merged_options)
|
||||
{
|
||||
|
|
@ -349,6 +376,13 @@ public:
|
|||
"If needs to process the input shape and deliver a list of output shapes.\n"
|
||||
"The output list may be empty to entirely discard the input shape. It may also contain more than a single shape.\n"
|
||||
"In that case, the number of total shapes may grow during application of the processor.\n"
|
||||
) +
|
||||
callback ("process_with_properties", &shape_processor_impl::issue_do_process_wp, &shape_processor_impl::f_process_wp, gsi::arg ("shape"),
|
||||
"@brief Processes a shape with properties\n"
|
||||
"In scenarios with shapes with properties, this method is called to process the shapes. If the method is not implemented, "
|
||||
"the property-less 'process' method is called and the properties are copied from the input to the output.\n"
|
||||
"\n"
|
||||
"This flavor has been introduced in version 0.30."
|
||||
);
|
||||
|
||||
if (with_merged_options) {
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ class EdgeNeighborhoodVisitorImpl
|
|||
public:
|
||||
EdgeNeighborhoodVisitorImpl () { }
|
||||
|
||||
void issue_on_edge (const db::Layout *, const db::Cell *, const db::Edge &, const tl::Variant &)
|
||||
void issue_on_edge (const db::Layout *, const db::Cell *, const db::EdgeWithProperties &, const tl::Variant &)
|
||||
{
|
||||
// just for signature
|
||||
}
|
||||
|
||||
void on_edge (const db::Layout *layout, const db::Cell *cell, const db::Edge &edge, const db::EdgeNeighborhoodVisitor::neighbors_type &neighbors)
|
||||
void on_edge (const db::Layout *layout, const db::Cell *cell, const db::EdgeWithProperties &edge, const db::EdgeNeighborhoodVisitor::neighbors_type &neighbors)
|
||||
{
|
||||
if (f_on_edge.can_issue ()) {
|
||||
|
||||
|
|
@ -52,24 +52,24 @@ public:
|
|||
|
||||
// NOTE: as scripts are potentially thread unsafe, we lock here
|
||||
tl::MutexLocker locker (&m_lock);
|
||||
return f_on_edge.issue<EdgeNeighborhoodVisitorImpl, const db::Layout *, const db::Cell *, const db::Edge &, const tl::Variant &> (&EdgeNeighborhoodVisitorImpl::issue_on_edge, layout, cell, edge, neighborhood);
|
||||
return f_on_edge.issue<EdgeNeighborhoodVisitorImpl, const db::Layout *, const db::Cell *, const db::EdgeWithProperties &, const tl::Variant &> (&EdgeNeighborhoodVisitorImpl::issue_on_edge, layout, cell, edge, neighborhood);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
gsi::Callback f_on_edge;
|
||||
|
||||
void issue_begin_polygon (const db::Layout *, const db::Cell *, const db::Polygon &)
|
||||
void issue_begin_polygon (const db::Layout *, const db::Cell *, const db::PolygonWithProperties &)
|
||||
{
|
||||
// just for signature
|
||||
}
|
||||
|
||||
void begin_polygon (const db::Layout *layout, const db::Cell *cell, const db::Polygon &poly)
|
||||
void begin_polygon (const db::Layout *layout, const db::Cell *cell, const db::PolygonWithProperties &poly)
|
||||
{
|
||||
if (f_begin_polygon.can_issue ()) {
|
||||
// NOTE: as scripts are potentially thread unsafe, we lock here
|
||||
tl::MutexLocker locker (&m_lock);
|
||||
return f_begin_polygon.issue<EdgeNeighborhoodVisitorImpl, const db::Layout *, const db::Cell *, const db::Polygon &> (&EdgeNeighborhoodVisitorImpl::begin_polygon, layout, cell, poly);
|
||||
return f_begin_polygon.issue<EdgeNeighborhoodVisitorImpl, const db::Layout *, const db::Cell *, const db::PolygonWithProperties &> (&EdgeNeighborhoodVisitorImpl::begin_polygon, layout, cell, poly);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
set_result_type (db::CompoundRegionOperationNode::ResultType::Region);
|
||||
}
|
||||
|
||||
void begin_polygon (const db::Layout *, const db::Cell *, const db::Polygon &polygon)
|
||||
void begin_polygon (const db::Layout *, const db::Cell *, const db::PolygonWithProperties &polygon)
|
||||
{
|
||||
output_polygon (polygon);
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ public:
|
|||
m_input = input;
|
||||
}
|
||||
|
||||
void on_edge (const db::Layout * /*layout*/, const db::Cell * /*cell*/, const db::Edge &edge, const neighbors_type &neighbors)
|
||||
void on_edge (const db::Layout * /*layout*/, const db::Cell * /*cell*/, const db::EdgeWithProperties &edge, const neighbors_type &neighbors)
|
||||
{
|
||||
db::IMatrix3d trans = to_original_trans (edge);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue