Page MenuHomeFreeBSD

roundup_pow_of_two: don't take the log of it
ClosedPublic

Authored by dougm on Sep 28 2024, 12:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 6:07 AM
Unknown Object (File)
Nov 6 2024, 5:43 PM
Unknown Object (File)
Nov 6 2024, 3:39 PM
Unknown Object (File)
Oct 24 2024, 12:40 AM
Unknown Object (File)
Oct 21 2024, 7:29 AM
Unknown Object (File)
Oct 21 2024, 6:29 AM
Unknown Object (File)
Oct 20 2024, 8:28 AM
Unknown Object (File)
Oct 19 2024, 5:52 PM
Subscribers

Details

Summary

Based on the definitions, ilog2(roundup_pow_of_two(x)) == order_base_2(x). Replace the former with the latter in a few places to save a few calculations.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm created this revision.
bz added a subscriber: kib.

Add @kib in the hope that he's maintaining the mlx* bits these days.

This revision is now accepted and ready to land.Sep 28 2024, 11:40 AM
This revision was automatically updated to reflect the committed changes.