From de790c5f00751d28744c52ae3f43d986422b11a2 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Tue, 11 Oct 2022 15:43:33 +0800 Subject: feat: Optimize step to const Signed-off-by: KunoiSayami --- expt_0830.cu | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'expt_0830.cu') diff --git a/expt_0830.cu b/expt_0830.cu index 845c44e..e48d543 100644 --- a/expt_0830.cu +++ b/expt_0830.cu @@ -8,7 +8,7 @@ std::vector population_vector, sample_vector; constexpr size_t SAMPLE_LENGTH = 1023; -constexpr size_t TEST_LENGTH = 16'384; +constexpr size_t TEST_LENGTH = 32'768; // constexpr size_t TEST_LENGTH = 4096; constexpr size_t RESERVED_BLOCK = 10'000; @@ -58,14 +58,14 @@ __global__ void kernel(unsigned long step, const double slice_size, slice_size) - 1; // printf("%llu %d\n", cudaPopulationItem[tid], index); - if (cdf_result[index]) { + /*if (cdf_result[index]) { while (cdf_result[++index]) { - /*if (index >= split_size) { - printf("escape: %llu %lu\n", cudaPopulationItem[tid], split_size); - }*/ + if (index >= split_size) { + //printf("escape: %llu %lu\n", cudaPopulationItem[tid], split_size); + } assert(index < (split_size + RESERVED_BLOCK)); } - } + }*/ cdf_result[index] = true; } } @@ -86,11 +86,11 @@ __global__ void kernel2_real_binary(unsigned long step, const double slice_size, cudaPopulationItem[tid]) / slice_size); // printf("%llu %d\n", cudaPopulationItem[tid], index); - if (cdf_result[index]) { + /*if (cdf_result[index]) { while (cdf_result[++index]) { assert(index < split_size); } - } + }*/ cdf_result[index] = true; #ifdef TEST_BOUNDS atomicAdd(&insert_value, 1); -- cgit v1.3.1