diff options
Diffstat (limited to 'sortlib.cuh')
| -rw-r--r-- | sortlib.cuh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sortlib.cuh b/sortlib.cuh index 8d6788e..d9e91a2 100644 --- a/sortlib.cuh +++ b/sortlib.cuh @@ -97,9 +97,9 @@ public: } /// Should be correct version - __device__ __host__ double sample_cdf_custom_version(key_type *start, - // const key_type *end, - key_type x) const { + __device__ __host__ double cdf(key_type *start, + // const key_type *end, + key_type x) const { // printf("custom version:\n"); auto it = this->binary_search(start, x); // printf("search result: %ld\n", it - start); @@ -220,7 +220,7 @@ class FactorySort { public: __device__ __host__ static const key_type * - cudaBinarySearch(key_type *start, const key_type *end, const key_type val) { + binarySearch(key_type *start, const key_type *end, const key_type val) { auto begin = start; key_type *last_known_point = begin; assert(begin < end); @@ -239,12 +239,11 @@ public: return last_known_point; } - __device__ __host__ double static sample_cdf(key_type *begin, - unsigned long length, - key_type x) { + __device__ __host__ double static cdf(key_type *begin, unsigned long length, + key_type x) { // printf("%f\n", x); auto end = begin + length; - auto it = cudaBinarySearch(begin, end, x); + auto it = binarySearch(begin, end, x); if (it == end) { return 1; } |
