Skip to content

Commit f869536

Browse files
committed
clean up code
1 parent a538fa3 commit f869536

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

core/compiler/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ mod tests {
434434
lyp_file: &PathBuf::from(SKY130_LYP),
435435
},
436436
);
437-
// println!("cells: {cells:?}");
437+
println!("cells: {cells:?}");
438438

439439
assert!(cells.is_valid());
440440

core/compiler/src/solver.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ impl Solver {
8181
}
8282

8383
pub fn solve_var(&mut self, var: Var, val: f64) {
84-
println!("{val}");
8584
let old = self.solved_vars.insert(var, val);
8685
if old.is_none() {
8786
self.updated_vars.insert(var);
@@ -119,7 +118,6 @@ impl Solver {
119118
if constraint.coeffs.is_empty()
120119
&& !relative_eq!(constraint.constant, 0., epsilon = EPSILON)
121120
{
122-
println!("invalid constraint inconsistency");
123121
self.inconsistent_constraints.insert(id);
124122
self.constraints.swap_remove(&id);
125123
return;
@@ -133,13 +131,11 @@ impl Solver {
133131
let val = -constraint.constant / coeff;
134132
if let Some(old_val) = self.solved_vars.get(&var) {
135133
if relative_ne!(*old_val, val, epsilon = EPSILON) {
136-
println!("backsub inconsistency");
137134
self.inconsistent_constraints.insert(id);
138135
}
139136
} else {
140137
let rounded_val = round(val);
141138
if relative_ne!(val, rounded_val, epsilon = EPSILON) {
142-
println!("invalid rounding");
143139
self.invalid_rounding.insert(var);
144140
}
145141
self.solve_var(var, rounded_val);
@@ -163,7 +159,6 @@ impl Solver {
163159
///
164160
/// Constraints should be simplified before this function is invoked.
165161
pub fn solve(&mut self) {
166-
println!("solve");
167162
// Snapshot unsolved variables before solving.
168163
let unsolved_vars = self.unsolved_vars.clone();
169164
let n_vars = unsolved_vars.len();
@@ -184,7 +179,6 @@ impl Solver {
184179
&j,
185180
&val,
186181
));
187-
println!("{} {}", self.constraints.len(), n_vars);
188182
let b = DVector::from_iterator(
189183
self.constraints.len(),
190184
self.constraints.values().map(|c| -c.constant),
@@ -215,7 +209,6 @@ impl Solver {
215209
if constraint.coeffs.is_empty()
216210
&& approx::relative_ne!(constraint.constant, 0., epsilon = EPSILON)
217211
{
218-
println!("svd inconsistency");
219212
self.inconsistent_constraints.insert(*id);
220213
}
221214
}

0 commit comments

Comments
 (0)