[Refactor] Remove unused utils (#38153)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -17,11 +17,6 @@ def next_power_of_2(n: int) -> int:
|
||||
return 1 if n < 1 else 1 << (n - 1).bit_length()
|
||||
|
||||
|
||||
def prev_power_of_2(n: int) -> int:
|
||||
"""The previous power of 2 (inclusive)"""
|
||||
return 0 if n <= 0 else 1 << (n.bit_length() - 1)
|
||||
|
||||
|
||||
def round_up(x: int, y: int) -> int:
|
||||
"""Round up x to the nearest multiple of y."""
|
||||
return ((x + y - 1) // y) * y
|
||||
|
||||
Reference in New Issue
Block a user