diff options
| author | KunoiSayami <[email protected]> | 2022-04-07 01:32:17 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2022-04-07 01:32:17 +0800 |
| commit | 706cae9f460fe698857f47aaa42eb517ea2cb09f (patch) | |
| tree | 2f3a775e280120d65191ce29760ae4aba06b57cf /db/skiplist.cuh | |
| parent | 32ce8b311269df205e192c2b61dc47faaa2c5971 (diff) | |
feat: Finish implement cuda memtable
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'db/skiplist.cuh')
| -rw-r--r-- | db/skiplist.cuh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/skiplist.cuh b/db/skiplist.cuh index 125a790..2d4d92b 100644 --- a/db/skiplist.cuh +++ b/db/skiplist.cuh @@ -74,7 +74,7 @@ class CudaSpinLock { } }; -class Arena; +class ArenaCuda; template <typename Key, class Comparator> class SkipList { @@ -86,7 +86,7 @@ class SkipList { // and will allocate memory using "*arena". Objects allocated in the arena // must remain allocated for the lifetime of the skiplist object. //explicit SkipList(Comparator cmp, Arena* arena); - __device__ explicit SkipList(Comparator cmp, Arena* arena); + __device__ explicit SkipList(Comparator cmp, ArenaCuda* arena); SkipList(const SkipList&) = delete; SkipList& operator=(const SkipList&) = delete; @@ -168,7 +168,7 @@ class SkipList { // Immutable after construction Comparator const compare_; - Arena* const arena_; // Arena used for allocations of nodes + ArenaCuda* const arena_; // Arena used for allocations of nodes Node* const head_; @@ -407,7 +407,7 @@ __device__ typename SkipList<Key, Comparator>::Node* SkipList<Key, Comparator>:: } template <typename Key, class Comparator> -__device__ SkipList<Key, Comparator>::SkipList(Comparator cmp, Arena* arena) +__device__ SkipList<Key, Comparator>::SkipList(Comparator cmp, ArenaCuda* arena) : compare_(cmp), arena_(arena), head_(NewNode(0 /* any key will do */, kMaxHeight)), |
