diff options
| author | KunoiSayami <[email protected]> | 2021-11-22 19:05:34 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2021-11-22 19:05:34 +0800 |
| commit | 0e18a4800b0737dc8f1d3720bc79bf000529ddef (patch) | |
| tree | 228a9860c2347a9076a47edc00b6a61e9f4ec663 /util/arena.cuh | |
| parent | d30033359c0b97b28b50f54eeea6e820156f7578 (diff) | |
feat(skiplist): Convert skiplist to cuda version
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'util/arena.cuh')
| -rw-r--r-- | util/arena.cuh | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |
