summaryrefslogtreecommitdiff
path: root/expt_0502.cu
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-07-02 21:53:47 +0800
committerKunoiSayami <[email protected]>2023-07-02 21:53:47 +0800
commitc71e687de86691c0149804ef10721ac9c230ab9e (patch)
treec5edef26ed08eeea4c4479016faea2dbcca7430c /expt_0502.cu
parent0b09bc40d295e7b383f2e5c8ddba255f0ac680ca (diff)
refactor: Change basic function name
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'expt_0502.cu')
-rw-r--r--expt_0502.cu21
1 files changed, 10 insertions, 11 deletions
diff --git a/expt_0502.cu b/expt_0502.cu
index 0c89535..ef0414d 100644
--- a/expt_0502.cu
+++ b/expt_0502.cu
@@ -59,16 +59,15 @@ __global__ void kernel(unsigned long step, const double slice_size) {
auto tid = step * (blockIdx.x * blockDim.x + threadIdx.x) + i;
// printf("%d\n", tid);
- auto index = (int)(custom_sort.sample_cdf_custom_version(
- cudaSampleItem, cudaPopulationItem[tid]) /
- slice_size) -
- 1;
-
- auto index2 =
- (int)(FactorySort::sample_cdf(cudaNormalSampleItem, SAMPLE_LENGTH,
- cudaPopulationItem[tid]) /
+ auto index =
+ (int)(custom_sort.cdf(cudaSampleItem, cudaPopulationItem[tid]) /
slice_size) -
1;
+
+ auto index2 = (int)(FactorySort::cdf(cudaNormalSampleItem, SAMPLE_LENGTH,
+ cudaPopulationItem[tid]) /
+ slice_size) -
+ 1;
printf("x => %llu %d %d\n", cudaPopulationItem[tid], index, index2);
// printf("%llu %d\n", cudaPopulationItem[tid], index);
/*if (cdf_result[index]) {
@@ -97,9 +96,9 @@ __global__ void kernel2(unsigned long step, const double _slice_size) {
cudaSampleItem);
auto index2 =
- FactorySort::cudaBinarySearch(cudaNormalSampleItem,
- cudaNormalSampleItem + SAMPLE_LENGTH,
- cudaPopulationItem[tid]) -
+ FactorySort::binarySearch(cudaNormalSampleItem,
+ cudaNormalSampleItem + SAMPLE_LENGTH,
+ cudaPopulationItem[tid]) -
cudaNormalSampleItem;
printf("x => %llu %ld %ld\n", cudaPopulationItem[tid], index, index2);
// printf("%llu %d\n", cudaPopulationItem[tid], index);