-
-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Int based linear interpol #1482
Conversation
c3ea0ed
to
dd81978
Compare
Codecov Report
@@ Coverage Diff @@
## main #1482 +/- ##
==========================================
- Coverage 93.98% 93.97% -0.02%
==========================================
Files 241 242 +1
Lines 44754 44661 -93
==========================================
- Hits 42063 41968 -95
- Misses 2691 2693 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
c7a8248
to
dd8d72b
Compare
dd8d72b
to
ea4d8a8
Compare
e550a98
to
84e0c75
Compare
1a030b2
to
448d1e4
Compare
Reimplements the blockwise multilinear codec using integer arithmetics. Added comments
448d1e4
to
6d9f8c8
Compare
73b960a
to
732a8f4
Compare
fix off by one to accurately interpolate autoincrement fields
2c7ef49
to
0e7e892
Compare
impl Line { | ||
#[inline(always)] | ||
pub fn eval(&self, x: u64) -> u64 { | ||
let linear_part = (x.wrapping_mul(self.slope) >> 32) as i32 as u64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why cast first to i32?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you want negative slopes to be interpreted as negative...
After the bitshift, you want stuff to be interpreted as negative is the 32th bit is set to 1, not the 64th.
There is probably a nicer a way to express it by expressing the slope as a i64.
No description provided.