Missing 32bit case.

This commit is contained in:
Matthew Parkinson
2020-08-26 17:18:03 +01:00
committed by Matthew Parkinson
parent dc36849dd0
commit 3adfe00f51

View File

@@ -82,6 +82,10 @@ namespace snmalloc
{
return static_cast<size_t>(__builtin_clzll(x));
}
else if constexpr (std::is_same_v<unsigned int, std::size_t>)
{
return static_cast<size_t>(__builtin_clz(x));
}
#endif
}
@@ -159,6 +163,10 @@ namespace snmalloc
{
return static_cast<size_t>(__builtin_ctzll(x));
}
else if constexpr (std::is_same_v<unsigned int, std::size_t>)
{
return static_cast<size_t>(__builtin_ctz(x));
}
#endif
}