1
def
ceil_to_power_of_2
(
x
:
u32
)
=
2
let
mut
r
=
1
3
while
r
<
x
do
4
r
*=
2
5
6
r
7