-
Notifications
You must be signed in to change notification settings - Fork 102
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
Calculate the next power-of-two for the user in hash_map_init. #420
Conversation
That is, we allow the user to specify non powers of two, and then we do the calculation for them. Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Also @methylDragon FYI; assuming we take this, you'll be able to drop some of your code from ros2/rosidl#728 |
Signed-off-by: Chris Lalancette <clalancette@gmail.com> Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
I just tried the next_power_of_two again, and now I'm getting I'm not sure why bit twiddling isn't working here :/ |
Signed-off-by: Chris Lalancette <clalancette@gmail.com> Co-authored-by: methylDragon <methylDragon@gmail.com>
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.
One more change... Sorry
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.
I'll do a pre-emptive approval (we should get that suggestion merged though!!)
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.
Lgtm, thanks for this! ❤️
Signed-off-by: Chris Lalancette <clalancette@gmail.com> Co-authored-by: methylDragon <methylDragon@gmail.com>
That is, we allow the user to specify non powers of two, and then we do the calculation for them.
@wjwwood FYI.