aboutsummaryrefslogtreecommitdiff
path: root/util/arena.cuh
diff options
context:
space:
mode:
Diffstat (limited to 'util/arena.cuh')
-rw-r--r--util/arena.cuh18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/arena.cuh b/util/arena.cuh
index e9abd31..a92547f 100644
--- a/util/arena.cuh
+++ b/util/arena.cuh
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#ifndef STORAGE_LEVELDB_UTIL_ARENA_H_
-#define STORAGE_LEVELDB_UTIL_ARENA_H_
+#ifndef STORAGE_LEVELDB_UTIL_ARENA_CUDA_H_
+#define STORAGE_LEVELDB_UTIL_ARENA_CUDA_H_
#include <atomic>
#include <cassert>
@@ -15,14 +15,14 @@
namespace leveldb {
-class Arena {
+class ArenaCuda {
public:
- explicit __device__ __host__ Arena();
+ explicit __device__ __host__ ArenaCuda();
- Arena(const Arena&) = delete;
- Arena& operator=(const Arena&) = delete;
+ ArenaCuda(const ArenaCuda&) = delete;
+ ArenaCuda& operator=(const ArenaCuda&) = delete;
- __host__ __device__ ~Arena();
+ __host__ __device__ ~ArenaCuda();
// Return a pointer to a newly allocated memory block of "bytes" bytes.
__device__ char* Allocate(size_t bytes);
@@ -64,7 +64,7 @@ class Arena {
cuda::atomic<size_t> memory_usage_;
};
-__device__ inline char* Arena::Allocate(size_t bytes) {
+__device__ inline char* ArenaCuda::Allocate(size_t bytes) {
// The semantics of what to return are a bit messy if we allow
// 0-byte allocations, so we disallow them here (we don't need
// them for our internal use).
@@ -80,4 +80,4 @@ __device__ inline char* Arena::Allocate(size_t bytes) {
} // namespace leveldb
-#endif // STORAGE_LEVELDB_UTIL_ARENA_H_
+#endif // STORAGE_LEVELDB_UTIL_ARENA_CUDA_H_