summaryrefslogtreecommitdiff
path: root/expt_0830.cu
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-10-11 15:43:33 +0800
committerKunoiSayami <[email protected]>2022-10-11 15:43:33 +0800
commitde790c5f00751d28744c52ae3f43d986422b11a2 (patch)
treeeee62464e902bab62693825aa6a79798990584a1 /expt_0830.cu
parent5828d051e613e2b38c8da493d90ade7f44ec28de (diff)
feat: Optimize step to const
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'expt_0830.cu')
-rw-r--r--expt_0830.cu16
1 files changed, 8 insertions, 8 deletions
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<unsigned long long> 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);