We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cf36b1 commit 4ec252eCopy full SHA for 4ec252e
dpctl/tensor/libtensor/include/kernels/sorting/radix_sort.hpp
@@ -75,6 +75,8 @@ std::uint32_t ceil_log2(SizeT n)
75
76
std::uint32_t exp{1};
77
--n;
78
+ // if n > 2^b, n = q * 2^b + r for q > 0 and 0 <= r < 2^b
79
+ // ceil_log2(q * 2^b + r) == ceil_log2(q * 2^b) == q + ceil_log2(n1)
80
if (n >= (SizeT{1} << 32)) {
81
n >>= 32;
82
exp += 32;
0 commit comments