summaryrefslogtreecommitdiff
path: root/expt_0804.cu
diff options
context:
space:
mode:
Diffstat (limited to 'expt_0804.cu')
-rw-r--r--expt_0804.cu6
1 files changed, 3 insertions, 3 deletions
diff --git a/expt_0804.cu b/expt_0804.cu
index 3a599ef..73d2c82 100644
--- a/expt_0804.cu
+++ b/expt_0804.cu
@@ -51,7 +51,7 @@ __device__ const key_type *cudaBinarySearch(key_type *start,
if (*last_known_point == val) {
return last_known_point;
}
- son = get_son_from_step(son, (*last_known_point > val));
+ son = son * 2 + -((*last_known_point - val) >> 63);
last_known_point = next_level_start + son;
}
return last_known_point;
@@ -191,10 +191,10 @@ int main(int argc, char const *argv[]) {
initCuda<<<1, 1>>>(cudaSample, cudaPopulation);
cudaDeviceSynchronize();
- dim3 grid_dim = 2, block_dim = 512;
+ dim3 grid_dim = 64, block_dim = 16;
unsigned long step = test_size / (grid_dim.x * block_dim.x);
- printf("step: %lu\n", step);
+ printf("(new) step: %lu\n", step);
assert(!(test_size % (grid_dim.x * block_dim.x)));
for (int scale = 2; scale <= 8; scale++) {