summaryrefslogtreecommitdiff
path: root/sortlib.cuh
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-04-19 14:26:52 +0800
committerKunoiSayami <[email protected]>2023-04-19 14:26:52 +0800
commit32d06031ceb10e99a85297ce43b17099741ce3bc (patch)
treee3db10f5d2112fc9f24528bde18f5719ee678bbb /sortlib.cuh
parent2a1d2fee4fcb7fd39454770ef5548ca4cf94dc76 (diff)
feat: Add experimental content
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'sortlib.cuh')
-rw-r--r--sortlib.cuh2
1 files changed, 2 insertions, 0 deletions
diff --git a/sortlib.cuh b/sortlib.cuh
index 0aba73b..db6c949 100644
--- a/sortlib.cuh
+++ b/sortlib.cuh
@@ -112,6 +112,7 @@ public:
// printf("tmp: %llu %lf %lu\n", *it - *it_prev, tmp, prev_real_location);
}
+ // First version
__device__ __host__ key_type *
original_binary_search(key_type *start, const key_type *end, key_type &val) {
auto begin = start;
@@ -138,6 +139,7 @@ public:
return last_known_point;
}
+ // CDF original version (should only work on default data layout)
__device__ __host__ double sample_cdf(key_type *start, key_type *end,
key_type x) {
auto it = this->original_binary_search(start, end, x);