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

common: Pull bpf_log2l() into helper function header #264

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

Byte-Lab
Copy link
Contributor

@Byte-Lab Byte-Lab commented May 3, 2024

scx_lavd implemented 32 and 64 bit versions of a base-2 logarithm function. This is now also used in rusty. To avoid code duplication, let's pull it into a shared header.

Note that there is technically a functional change here as we remove the always inline compiler directive. We instead assume that the compiler will know best whether or not to inline the function.

scx_lavd implemented 32 and 64 bit versions of a base-2 logarithm
function. This is now also used in rusty. To avoid code duplication,
let's pull it into a shared header.

Note that there is technically a functional change here as we remove the
always inline compiler directive. We instead assume that the compiler
will know best whether or not to inline the function.

Signed-off-by: David Vernet <[email protected]>
@Byte-Lab Byte-Lab requested review from htejun and multics69 May 3, 2024 19:50
@Byte-Lab Byte-Lab merged commit acef503 into main May 3, 2024
1 check passed
@Byte-Lab Byte-Lab deleted the log2_helpers branch May 3, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants