aboutsummaryrefslogtreecommitdiff
path: root/db/skiplist.cuh
diff options
context:
space:
mode:
Diffstat (limited to 'db/skiplist.cuh')
-rw-r--r--db/skiplist.cuh12
1 files changed, 8 insertions, 4 deletions
diff --git a/db/skiplist.cuh b/db/skiplist.cuh
index 2520a13..4fcd220 100644
--- a/db/skiplist.cuh
+++ b/db/skiplist.cuh
@@ -150,22 +150,26 @@ struct SkipList<Key, Comparator>::Node {
Key const key;
- explicit __device__ Node(const Key& k): key(k) {}
+ explicit __device__ __host__ Node(const Key& k): key(k) {}
- __device__ void* operator new(size_t bytes) {
+ __device__ __host__ void* operator new(size_t bytes) {
Node * ptr = nullptr;
cudaMalloc((void**)&ptr, bytes);
return ptr;
}
- __device__ void* operator new(size_t bytes, void * const ptr) {
+ __device__ __host__ void* operator new(size_t _bytes, void * const ptr) {
return ptr;
}
- __device__ void operator delete(void *ptr) {
+ __device__ __host__ void operator delete(void *ptr) {
cudaFree(ptr);
}
+ __device__ __host__ void operator delete(void *_ptr, void *_ptr2) {
+ // DO NOTHING HERE
+ }
+
// Accessors/mutators for links. Wrapped in methods so we can
// add the appropriate barriers as necessary.
__device__ Node* Next(int n) {