aboutsummaryrefslogtreecommitdiff
path: root/db/skiplist_test.cu
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-04-07 01:32:17 +0800
committerKunoiSayami <[email protected]>2022-04-07 01:32:17 +0800
commit706cae9f460fe698857f47aaa42eb517ea2cb09f (patch)
tree2f3a775e280120d65191ce29760ae4aba06b57cf /db/skiplist_test.cu
parent32ce8b311269df205e192c2b61dc47faaa2c5971 (diff)
feat: Finish implement cuda memtable
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'db/skiplist_test.cu')
-rw-r--r--db/skiplist_test.cu12
1 files changed, 6 insertions, 6 deletions
diff --git a/db/skiplist_test.cu b/db/skiplist_test.cu
index e5a1256..f77fc60 100644
--- a/db/skiplist_test.cu
+++ b/db/skiplist_test.cu
@@ -441,13 +441,13 @@ __global__ void testKeysIsEqualLists(SkipList<Key, Comparator> * skiplist, const
assert(!iter.Valid());
}
-__global__ void initSkipList(Arena ** pArena, SkipList<Key, Comparator> ** pSkipList) {
+__global__ void initSkipList(ArenaCuda ** pArena, SkipList<Key, Comparator> ** pSkipList) {
Comparator cmp;
- *pArena = new Arena();
+ *pArena = new ArenaCuda();
*pSkipList = new SkipList<Key, Comparator>(cmp, *pArena);
}
-__global__ void freeSkipList(Arena *** pArena, SkipList<Key, Comparator> *** pSkipList) {
+__global__ void freeSkipList(ArenaCuda *** pArena, SkipList<Key, Comparator> *** pSkipList) {
cudaFree(**pArena);
cudaFree(**pSkipList);
cudaFree(*pArena);
@@ -456,7 +456,7 @@ __global__ void freeSkipList(Arena *** pArena, SkipList<Key, Comparator> *** pSk
TEST(SkipTest, TestInitSkiplist) {
- Arena ** pArena;
+ ArenaCuda ** pArena;
SkipList<Key, Comparator> ** pSkipList;
cudaMallocManaged((void**)&pArena, sizeof(void*));
@@ -495,7 +495,7 @@ TEST(SkipTest, TestSingleCudaInsert) {
keys[i] = .Next();
}*/
Key * keys = new Key[SKIPLIST_TEST_SIZE], * sorted_keys = new Key[SKIPLIST_TEST_SIZE];
- Arena ** pArena;
+ ArenaCuda ** pArena;
SkipList<Key, Comparator> ** skipList;
std::set<Key> k;
@@ -561,7 +561,7 @@ TEST(SkipTest, TestSingleCudaInsert) {
TEST(SkipTest, TestMultiThreadInsert) {
Key * keys = new Key[SKIPLIST_TEST_SIZE], * sorted_keys = new Key[SKIPLIST_TEST_SIZE];
- Arena ** pArena;
+ ArenaCuda ** pArena;
SkipList<Key, Comparator> ** pSkipList;
std::set<Key> k;
Key * device_keys = nullptr;