Sign in
nest-open-source
/
manifest_repos
/
salami
/
refs/heads/main
/
.
/
drivers
/
gpu
/
drm
/
nouveau
/
core
/
include
/
core
/
math.h
blob: f808131c5cd87e6077800b7ab08eb0d779cdec95 [
file
] [
log
] [
blame
]
#ifndef
__NOUVEAU_MATH_H__
#define
__NOUVEAU_MATH_H__
static
inline
int
log2i
(
u64
base
)
{
u64 temp
=
base
>>
1
;
int
log2
;
for
(
log2
=
0
;
temp
;
log2
++,
temp
>>=
1
)
{
}
return
(
base
&
(
base
-
1
))
?
log2
+
1
:
log2
;
}
#endif