diff options
Diffstat (limited to 'db/skiplist_test.cu')
| -rw-r--r-- | db/skiplist_test.cu | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/db/skiplist_test.cu b/db/skiplist_test.cu index e83af79..d18f11f 100644 --- a/db/skiplist_test.cu +++ b/db/skiplist_test.cu @@ -287,11 +287,11 @@ __device__ void update_list(SkipList<Key, Comparator> * l, Key key) { l->Insert(key); } -__global__ void insert_skiplist(int random_seed) { +__global__ void insert_skiplist(SkipList<Key, Comparator> * skipList, Random *device_rnd) { //unsigned row = threadIdx.x + blockIdx.x * blockDim.x; - /*for (int i = 0; i < 1000; i++ ) { - update_list(&skipList, device_rnd->Next()); - }*/ + for (int i = 0; i < 1000; i++) { + update_list(skipList, device_rnd->Next()); + } } __global__ void init(Arena ** pArena, SkipList<Key, Comparator> ** pSkipList) { @@ -315,10 +315,12 @@ __host__ void host_insert_test() { dim3 blockSize(1, 1); - dim3 gridSize(1, 1); + dim3 gridSize(32, 32); init<<<gridSize, blockSize>>>(&pArena, &skipList); - insert_skiplist<<<gridSize, blockSize>>>(test::RandomSeed()); + cudaDeviceSynchronize(); + insert_skiplist<<<gridSize, blockSize>>>(skipList, device_rnd); + cudaDeviceSynchronize(); |
