summaryrefslogtreecommitdiff
path: root/sortlib.cuh
diff options
context:
space:
mode:
Diffstat (limited to 'sortlib.cuh')
-rw-r--r--sortlib.cuh8
1 files changed, 4 insertions, 4 deletions
diff --git a/sortlib.cuh b/sortlib.cuh
index 5d32e4b..5bacc11 100644
--- a/sortlib.cuh
+++ b/sortlib.cuh
@@ -19,9 +19,9 @@ public:
__device__ __host__ static size_t fast_log(size_t a) {
#ifdef __CUDA_ARCH__
- return log2((double)a);
+ return (size_t)log2((double)a);
#else
- return std::log2(a);
+ return (size_t)std::log2(a);
#endif
}
@@ -40,11 +40,11 @@ public:
for (size_t i = 0; i < LENGTH; i++) {
auto left = calculate_index(i);
auto right = calculate_rank(left - 1);
- if (i + 1 == LENGTH || i + 1 != right) {
+ /*if (i + 1 == LENGTH || i + 1 != right) {
printf("%lu %lu %lu\n", i, left, right);
printf("%lu %lu %lu\n", LENGTH, fast_log(i + 1),
(LENGTH + 1) >> fast_log(i + 1) >> 1);
- }
+ }*/
assert(i + 1 == right);
}
}