Skip to content
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

Move a few bit-related operations to a common place #2635

Merged
merged 4 commits into from
Jul 9, 2020

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Jul 9, 2020

Also use names that reflect what they do...

// Floor log2 of n, or 0 for n = 0. 8 -> 3, 7 -> 2.
constexpr int FloorLog2(int n);

// Greatest power of 2 less than or equal to n. 8 -> 8, 7 -> 4.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Sorry, something went wrong.

@eggrobin eggrobin added the LGTM label Jul 9, 2020
@pleroy
Copy link
Member Author

pleroy commented Jul 9, 2020

retest this please

Sorry, something went wrong.

@pleroy pleroy merged commit 441f4a4 into mockingbirdnest:master Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants