-
Notifications
You must be signed in to change notification settings - Fork 526
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
lmp: refactor ixnode #2971
lmp: refactor ixnode #2971
Conversation
The current implementation used a complex method to ensute ixnode within [0, nxnodes), but why not using mod ("%") to get the same behavior. Signed-off-by: Jinzhe Zeng <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## devel #2971 +/- ##
==========================================
+ Coverage 75.23% 75.26% +0.02%
==========================================
Files 245 245
Lines 24678 24669 -9
Branches 1599 1593 -6
==========================================
Hits 18566 18566
+ Misses 5176 5167 -9
Partials 936 936
☔ View full report in Codecov by Sentry. |
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.
different from python, in c++, -1%10 == -1
Got it... |
Signed-off-by: Jinzhe Zeng <[email protected]>
I follow the resolution here: https://stackoverflow.com/a/1907585/9567349 |
The current implementation used a complex method to ensure
ixnode
(int) within[0, nxnodes-1]
, but why not use mod ("%") to get the same behavior?