diff --git a/src/drt/src/db/infra/frPoint.h b/src/drt/src/db/infra/frPoint.h index 0939ef67d5..5b8ed13ee1 100644 --- a/src/drt/src/db/infra/frPoint.h +++ b/src/drt/src/db/infra/frPoint.h @@ -68,7 +68,7 @@ class Point3D : public Point friend std::size_t hash_value(Point3D const& p) { std::size_t seed = 0; - boost::hash_combine(seed, hash_value(((Point)p))); + boost::hash_combine(seed, hash_value(((Point) p))); boost::hash_combine(seed, p.getZ()); return seed; } diff --git a/src/drt/src/gc/FlexGC_impl.h b/src/drt/src/gc/FlexGC_impl.h index 86b0f27edc..042ed5503d 100644 --- a/src/drt/src/gc/FlexGC_impl.h +++ b/src/drt/src/gc/FlexGC_impl.h @@ -28,13 +28,13 @@ #pragma once +#include #include #include "db/gcObj/gcNet.h" #include "dr/FlexDR.h" #include "frDesign.h" #include "gc/FlexGC.h" -#include namespace odb { class dbTechLayerCutSpacingTableDefRule; @@ -192,31 +192,36 @@ class FlexGCWorker::Impl void initNet_pins_polygonEdges(gcNet* net); void initNet_pins_polygonEdges_getFixedPolygonEdges( gcNet* net, - std::vector>>& fixedPolygonEdges); + std::vector>>& + fixedPolygonEdges); void initNet_pins_polygonEdges_helper_outer( gcNet* net, gcPin* pin, gcPolygon* poly, frLayerNum i, - const std::vector>>& fixedPolygonEdges); + const std::vector>>& + fixedPolygonEdges); void initNet_pins_polygonEdges_helper_inner( gcNet* net, gcPin* pin, const gtl::polygon_90_data& hole_poly, frLayerNum i, - const std::vector>>& fixedPolygonEdges); + const std::vector>>& + fixedPolygonEdges); void initNet_pins_polygonCorners(gcNet* net); void initNet_pins_polygonCorners_helper(gcNet* net, gcPin* pin); void initNet_pins_maxRectangles(gcNet* net); void initNet_pins_maxRectangles_getFixedMaxRectangles( gcNet* net, - std::vector>>& fixedMaxRectangles); + std::vector>>& + fixedMaxRectangles); void initNet_pins_maxRectangles_helper( gcNet* net, gcPin* pin, const gtl::rectangle_data& rect, frLayerNum i, - const std::vector>>& fixedMaxRectangles); + const std::vector>>& + fixedMaxRectangles); void initRegionQuery(); diff --git a/src/drt/src/gc/FlexGC_init.cpp b/src/drt/src/gc/FlexGC_init.cpp index bd12a686d4..904277fb3c 100644 --- a/src/drt/src/gc/FlexGC_init.cpp +++ b/src/drt/src/gc/FlexGC_init.cpp @@ -486,7 +486,8 @@ void FlexGCWorker::Impl::initNet_pins_polygon(gcNet* net) void FlexGCWorker::Impl::initNet_pins_polygonEdges_getFixedPolygonEdges( gcNet* net, - std::vector>>& fixedPolygonEdges) + std::vector>>& + fixedPolygonEdges) { int numLayers = getTech()->getLayers().size(); std::vector> polys; @@ -552,7 +553,8 @@ void FlexGCWorker::Impl::initNet_pins_polygonEdges_helper_outer( gcPin* pin, gcPolygon* poly, frLayerNum i, - const std::vector>>& fixedPolygonEdges) + const std::vector>>& + fixedPolygonEdges) { Point bp, ep, firstPt; gtl::point_data bp1, ep1, firstPt1; @@ -626,7 +628,8 @@ void FlexGCWorker::Impl::initNet_pins_polygonEdges_helper_inner( gcPin* pin, const gtl::polygon_90_data& hole_poly, frLayerNum i, - const std::vector>>& fixedPolygonEdges) + const std::vector>>& + fixedPolygonEdges) { Point bp, ep, firstPt; gtl::point_data bp1, ep1, firstPt1; @@ -698,7 +701,8 @@ void FlexGCWorker::Impl::initNet_pins_polygonEdges_helper_inner( void FlexGCWorker::Impl::initNet_pins_polygonEdges(gcNet* net) { int numLayers = getTech()->getLayers().size(); - std::vector>> fixedPolygonEdges(numLayers); + std::vector>> + fixedPolygonEdges(numLayers); // get all fixed polygon edges initNet_pins_polygonEdges_getFixedPolygonEdges(net, fixedPolygonEdges); @@ -852,7 +856,8 @@ void FlexGCWorker::Impl::initNet_pins_polygonCorners(gcNet* net) void FlexGCWorker::Impl::initNet_pins_maxRectangles_getFixedMaxRectangles( gcNet* net, - std::vector>>& fixedMaxRectangles) + std::vector>>& + fixedMaxRectangles) { int numLayers = getTech()->getLayers().size(); std::vector> rects; @@ -878,7 +883,8 @@ void FlexGCWorker::Impl::initNet_pins_maxRectangles_helper( gcPin* pin, const gtl::rectangle_data& rect, frLayerNum i, - const std::vector>>& fixedMaxRectangles) + const std::vector>>& + fixedMaxRectangles) { auto rectangle = std::make_unique(); rectangle->setRect(rect); @@ -916,7 +922,8 @@ void FlexGCWorker::Impl::initNet_pins_maxRectangles_helper( void FlexGCWorker::Impl::initNet_pins_maxRectangles(gcNet* net) { int numLayers = getTech()->getLayers().size(); - std::vector>> fixedMaxRectangles(numLayers); + std::vector>> + fixedMaxRectangles(numLayers); // get all fixed max rectangles initNet_pins_maxRectangles_getFixedMaxRectangles(net, fixedMaxRectangles); diff --git a/src/drt/src/io/GuideProcessor.h b/src/drt/src/io/GuideProcessor.h index f2d263263e..53caa76d2d 100644 --- a/src/drt/src/io/GuideProcessor.h +++ b/src/drt/src/io/GuideProcessor.h @@ -54,7 +54,7 @@ class GuideProcessor : design_(designIn), logger_(loggerIn), db_(dbIn), - router_cfg_(router_cfg){}; + router_cfg_(router_cfg) {}; /** * @brief Reads guides from odb and fill the tmp_guides_ list of unprocessed * guides @@ -176,11 +176,12 @@ class GuideProcessor * guides only. * */ - void genGuides_split(std::vector& rects, - const TrackIntervalsByLayer& intvs, - const boost::unordered_flat_map& gcell_pin_map, - frBlockObjectMap>& pin_gcell_map, - bool via_access_only) const; + void genGuides_split( + std::vector& rects, + const TrackIntervalsByLayer& intvs, + const boost::unordered_flat_map& gcell_pin_map, + frBlockObjectMap>& pin_gcell_map, + bool via_access_only) const; /** * Initializes a map of gcell location to set of pins * @@ -191,9 +192,9 @@ class GuideProcessor * considered by this function. * @param gcell_pin_map A map to be populated by the result of this function. */ - void initGCellPinMap( - const frNet* net, - boost::unordered_flat_map& gcell_pin_map) const; + void initGCellPinMap(const frNet* net, + boost::unordered_flat_map& + gcell_pin_map) const; /** * Populates gcell_pin_map with the values associated with the passed term * based on pin shapes. @@ -205,8 +206,9 @@ class GuideProcessor * @param gcell_pin_map The map to be populated with the results. * @param term The current pin we are processing. */ - void mapPinShapesToGCells(boost::unordered_flat_map& gcell_pin_map, - frBlockObject* term) const; + void mapPinShapesToGCells( + boost::unordered_flat_map& gcell_pin_map, + frBlockObject* term) const; /** * Populates gcell_pin_map with the values associated with the passed pin * based on access points. diff --git a/src/odb/include/odb/geom.h b/src/odb/include/odb/geom.h index c8555b5cbd..1d98032950 100644 --- a/src/odb/include/odb/geom.h +++ b/src/odb/include/odb/geom.h @@ -33,6 +33,7 @@ #pragma once #include +#include #include #include #include @@ -40,7 +41,6 @@ #include "isotropy.h" #include "odb.h" #include "utl/Logger.h" -#include namespace odb { @@ -94,10 +94,11 @@ class Point inline std::size_t hash_value(Point const& p) { size_t hash = 0; - if constexpr (sizeof(size_t) == 8 && sizeof(size_t) == 2*sizeof(int)) { - // Use fast identity hash if possible. We don't care about avalanching since it will be mixed later by flat_map anyway - return ((size_t)p.getX() << 32) | p.getY(); - } else { + if constexpr (sizeof(size_t) == 8 && sizeof(size_t) == 2 * sizeof(int)) { + // Use fast identity hash if possible. We don't care about avalanching since + // it will be mixed later by flat_map anyway + return ((size_t) p.getX() << 32) | p.getY(); + } else { boost::hash_combine(hash, p.x()); boost::hash_combine(hash, p.y()); }