Skip to content

Commit

Permalink
Simplify code requiring some features
Browse files Browse the repository at this point in the history
  • Loading branch information
shnarazk committed Dec 14, 2024
1 parent a992ed8 commit e34127e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/assign/learning_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ impl ActivityIF<VarId> for AssignStack {
fn reward_at_analysis(&mut self, vi: VarId) {
self.var[vi].turn_on(FlagVar::USED);
}
#[cfg(feature = "spin")]
#[inline]
fn reward_at_assign(&mut self, vi: VarId) {
#[cfg(feature = "spin")]
if let Some(b) = self.var[vi].assign {
self.var[vi].spin.update(b, self.tick);
}
}
#[cfg(not(feature = "spin"))]
#[inline]
fn reward_at_assign(&mut self, _vi: VarId) {}
#[inline]
fn reward_at_propagation(&mut self, _vi: VarId) {}
#[inline]
Expand Down
1 change: 1 addition & 0 deletions src/bin/splw.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "graph_view")]
#[allow(unused_imports)]
use {
crossterm::{
Expand Down

0 comments on commit e34127e

Please sign in to comment.