Skip to content

Commit f7540ca

Browse files
committed
rmp: regenerate test output after stable sort
Signed-off-by: Bartłomiej Chmiel <[email protected]>
1 parent b5fe8d6 commit f7540ca

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

src/rmp/src/genetic_strategy.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,16 @@ std::vector<GiaOp> GeneticStrategy::RunStrategy(
123123
logger);
124124
}
125125
// Selection
126-
std::ranges::sort(population, std::greater{}, &SolutionSlack::worst_slack_);
126+
std::ranges::stable_sort(
127+
population, std::greater{}, &SolutionSlack::worst_slack_);
127128
std::vector<SolutionSlack> newPopulation;
128129
newPopulation.reserve(pop_size_);
129130
for (int j = 0; j < pop_size_; j++) {
130131
std::vector<size_t> tournament(tourn_size_);
131132
std::generate_n(tournament.begin(), tourn_size_, [&]() {
132133
return absl::Uniform<int>(random_, 0, population.size());
133134
});
134-
std::ranges::sort(tournament);
135+
std::ranges::stable_sort(tournament);
135136
tournament.erase(std::ranges::begin(std::ranges::unique(tournament)),
136137
tournament.end());
137138
auto winner = std::ranges::find_if(tournament, [&](auto const& _) {

src/rmp/test/gcd_genetic.ok

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,22 @@ Corner: slow
144144
0.00 0.00 clock network delay (ideal)
145145
0.00 0.00 ^ dpath/a_lt_b$in1[0]$_DFFE_PP_/CLK (DFFHQNx1_ASAP7_75t_R)
146146
75.75 75.75 ^ dpath/a_lt_b$in1[0]$_DFFE_PP_/QN (DFFHQNx1_ASAP7_75t_R)
147-
22.03 97.78 v cut_231218/Y (INVx1_ASAP7_75t_R)
147+
22.03 97.78 v cut_236752/Y (INVx1_ASAP7_75t_R)
148148
24.08 121.86 ^ _421_/CON (HAxp5_ASAP7_75t_R)
149-
29.34 151.20 v cut_231255/Y (INVx1_ASAP7_75t_R)
149+
29.34 151.20 v cut_236789/Y (INVx1_ASAP7_75t_R)
150150
87.01 238.21 ^ _420_/CON (FAx1_ASAP7_75t_R)
151-
22.83 261.04 v cut_231043/Y (INVx8_ASAP7_75t_R)
152-
20.94 281.97 ^ cut_231044/Y (NOR2x1p5_ASAP7_75t_R)
153-
19.55 301.52 v cut_231045/Y (NOR2xp67_ASAP7_75t_R)
154-
39.99 341.51 v cut_231046/Y (OR2x2_ASAP7_75t_R)
155-
17.15 358.66 ^ cut_231047/Y (NAND2x1p5_ASAP7_75t_R)
156-
22.59 381.25 v cut_231048/Y (NAND2x1_ASAP7_75t_R)
157-
22.81 404.06 ^ cut_231049/Y (NAND2x1p5_ASAP7_75t_R)
158-
31.34 435.40 v cut_231050/Y (NAND2x2_ASAP7_75t_R)
159-
31.43 466.84 ^ cut_231051/Y (NOR2x1p5_ASAP7_75t_R)
160-
28.04 494.88 v cut_231053/Y (NOR2x1_ASAP7_75t_R)
161-
37.38 532.26 v cut_231054/Y (OR2x2_ASAP7_75t_R)
162-
14.73 546.99 ^ cut_231055/Y (NAND2xp5_ASAP7_75t_R)
151+
22.83 261.04 v cut_236577/Y (INVx8_ASAP7_75t_R)
152+
20.94 281.97 ^ cut_236578/Y (NOR2x1p5_ASAP7_75t_R)
153+
19.55 301.52 v cut_236579/Y (NOR2xp67_ASAP7_75t_R)
154+
39.99 341.51 v cut_236580/Y (OR2x2_ASAP7_75t_R)
155+
17.15 358.66 ^ cut_236581/Y (NAND2x1p5_ASAP7_75t_R)
156+
22.59 381.25 v cut_236582/Y (NAND2x1_ASAP7_75t_R)
157+
22.81 404.06 ^ cut_236583/Y (NAND2x1p5_ASAP7_75t_R)
158+
31.34 435.40 v cut_236584/Y (NAND2x2_ASAP7_75t_R)
159+
31.43 466.84 ^ cut_236585/Y (NOR2x1p5_ASAP7_75t_R)
160+
28.04 494.88 v cut_236587/Y (NOR2x1_ASAP7_75t_R)
161+
37.38 532.26 v cut_236588/Y (OR2x2_ASAP7_75t_R)
162+
14.73 546.99 ^ cut_236589/Y (NAND2xp5_ASAP7_75t_R)
163163
0.00 546.99 ^ ctrl/state/out[1]$_DFF_P_/D (DFFHQNx1_ASAP7_75t_R)
164164
546.99 data arrival time
165165

0 commit comments

Comments
 (0)