Skip to content

Commit bca4783

Browse files
authored
Merge pull request #10190 from The-OpenROAD-Project-staging/ifp-tidy-naming
ifp: adjust naming to Google-style (excluding method names)
2 parents 384cd5f + e547578 commit bca4783

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/ifp/include/ifp/InitFloorplan.hh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ namespace ifp {
2424

2525
enum class RowParity
2626
{
27-
NONE,
28-
EVEN,
29-
ODD
27+
kNone,
28+
kEven,
29+
kOdd
3030
};
3131

3232
class InitFloorplan
@@ -50,7 +50,7 @@ class InitFloorplan
5050
int core_space_right,
5151
odb::dbSite* base_site,
5252
const std::vector<odb::dbSite*>& additional_sites = {},
53-
RowParity row_parity = RowParity::NONE,
53+
RowParity row_parity = RowParity::kNone,
5454
const std::set<odb::dbSite*>& flipped_sites = {},
5555
int gap = std::numeric_limits<std::int32_t>::min());
5656

@@ -60,7 +60,7 @@ class InitFloorplan
6060
const odb::Rect& core,
6161
odb::dbSite* base_site,
6262
const std::vector<odb::dbSite*>& additional_sites = {},
63-
RowParity row_parity = RowParity::NONE,
63+
RowParity row_parity = RowParity::kNone,
6464
const std::set<odb::dbSite*>& flipped_sites = {},
6565
int gap = std::numeric_limits<std::int32_t>::min());
6666

@@ -91,7 +91,7 @@ class InitFloorplan
9191
odb::dbSite* base_site,
9292
const std::vector<odb::dbSite*>& additional_sites
9393
= {},
94-
RowParity row_parity = RowParity::NONE,
94+
RowParity row_parity = RowParity::kNone,
9595
const std::set<odb::dbSite*>& flipped_sites = {},
9696
int gap = std::numeric_limits<std::int32_t>::min());
9797

@@ -100,15 +100,15 @@ class InitFloorplan
100100
void makeRows(const odb::Rect& core,
101101
odb::dbSite* base_site,
102102
const std::vector<odb::dbSite*>& additional_sites = {},
103-
RowParity row_parity = RowParity::NONE,
103+
RowParity row_parity = RowParity::kNone,
104104
const std::set<odb::dbSite*>& flipped_sites = {},
105105
int gap = std::numeric_limits<std::int32_t>::min());
106106

107107
// Create rows for a polygon core area using true polygon-aware generation
108108
void makePolygonRows(const odb::Polygon& core_polygon,
109109
odb::dbSite* base_site,
110110
const std::vector<odb::dbSite*>& additional_sites = {},
111-
RowParity row_parity = RowParity::NONE,
111+
RowParity row_parity = RowParity::kNone,
112112
const std::set<odb::dbSite*>& flipped_sites = {},
113113
int gap = std::numeric_limits<std::int32_t>::min());
114114

src/ifp/src/InitFloorplan-py.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
const char *str = PyUnicode_AsUTF8AndSize($input, &size);
2727

2828
if (strcasecmp(str, "NONE") == 0) {
29-
$1 = ifp::RowParity::NONE;
29+
$1 = ifp::RowParity::kNone;
3030
} else if (strcasecmp(str, "EVEN") == 0) {
31-
$1 = ifp::RowParity::EVEN;
31+
$1 = ifp::RowParity::kEven;
3232
} else if (strcasecmp(str, "ODD") == 0) {
33-
$1 = ifp::RowParity::ODD;
33+
$1 = ifp::RowParity::kOdd;
3434
} else {
35-
$1 = ifp::RowParity::NONE;
35+
$1 = ifp::RowParity::kNone;
3636
}
3737
}
3838

src/ifp/src/InitFloorplan.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,12 @@ static int divCeil(int dividend, int divisor)
382382
static int applyRowParity(int rows_y, const RowParity row_parity)
383383
{
384384
switch (row_parity) {
385-
case RowParity::NONE:
385+
case RowParity::kNone:
386386
break;
387-
case RowParity::EVEN:
387+
case RowParity::kEven:
388388
rows_y = (rows_y / 2) * 2;
389389
break;
390-
case RowParity::ODD:
390+
case RowParity::kOdd:
391391
if (rows_y > 0 && rows_y % 2 == 0) {
392392
rows_y--;
393393
}
@@ -498,7 +498,7 @@ void InitFloorplan::makeRows(const odb::Rect& core,
498498
}
499499

500500
if (base_site->hasRowPattern()) {
501-
if (row_parity != RowParity::NONE) {
501+
if (row_parity != RowParity::kNone) {
502502
logger_->error(
503503
IFP,
504504
51,

src/ifp/src/InitFloorplan.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ static utl::Logger* getLogger() {
4848
%typemap(in) ifp::RowParity {
4949
char *str = Tcl_GetStringFromObj($input, 0);
5050
if (strcasecmp(str, "NONE") == 0) {
51-
$1 = ifp::RowParity::NONE;
51+
$1 = ifp::RowParity::kNone;
5252
} else if (strcasecmp(str, "EVEN") == 0) {
53-
$1 = ifp::RowParity::EVEN;
53+
$1 = ifp::RowParity::kEven;
5454
} else if (strcasecmp(str, "ODD") == 0) {
55-
$1 = ifp::RowParity::ODD;
55+
$1 = ifp::RowParity::kOdd;
5656
} else {
57-
$1 = ifp::RowParity::NONE;
57+
$1 = ifp::RowParity::kNone;
5858
}
5959
}
6060

0 commit comments

Comments
 (0)