Commit 1e885c18 authored by Christoph Conrads's avatar Christoph Conrads

Speed up AWC/SWB index update

parent 503e84a9
......@@ -224,7 +224,10 @@ struct add_with_carry_engine
carry_ = x >> w;
}
index_ = index_ + 1u == r ? 0u : index_ + 1u;
index_ = long_lag == 8 or long_lag == 16 or long_lag == 32
? (index_ + 1u) & long_lag
: index_ + 1u == long_lag ? 0u : index_ + 1u
;
return xs_[i];
}
......@@ -321,7 +324,10 @@ struct subtract_with_borrow_engine
carry_ = c;
}
index_ = index_ + 1u == r ? 0u : index_ + 1u;
index_ = long_lag == 8 or long_lag == 16 or long_lag == 32
? (index_ + 1u) & long_lag
: index_ + 1u == long_lag ? 0u : index_ + 1u
;
return xs_[i];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment