From 0e18a4800b0737dc8f1d3720bc79bf000529ddef Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Mon, 22 Nov 2021 19:05:34 +0800 Subject: feat(skiplist): Convert skiplist to cuda version Signed-off-by: KunoiSayami --- util/arena.cuh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/arena.cuh') diff --git a/util/arena.cuh b/util/arena.cuh index afbc575..950f286 100644 --- a/util/arena.cuh +++ b/util/arena.cuh @@ -17,12 +17,12 @@ namespace leveldb { class Arena { public: - Arena(); + __device__ Arena(); Arena(const Arena&) = delete; Arena& operator=(const Arena&) = delete; - ~Arena(); + __device__ ~Arena(); // Return a pointer to a newly allocated memory block of "bytes" bytes. __device__ char* Allocate(size_t bytes); @@ -32,7 +32,7 @@ class Arena { // Returns an estimate of the total memory usage of data allocated // by the arena. - size_t MemoryUsage() const { + __device__ size_t MemoryUsage() const { return memory_usage_.load(cuda::memory_order_relaxed); } -- cgit v1.3.1