aboutsummaryrefslogtreecommitdiff
path: root/util/arena.cuh
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2021-11-22 19:05:34 +0800
committerKunoiSayami <[email protected]>2021-11-22 19:05:34 +0800
commit0e18a4800b0737dc8f1d3720bc79bf000529ddef (patch)
tree228a9860c2347a9076a47edc00b6a61e9f4ec663 /util/arena.cuh
parentd30033359c0b97b28b50f54eeea6e820156f7578 (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.cuh6
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);
}