From 813049a3ff85b18bc1ca6f640c7677c8bbf39414 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Sun, 18 Jun 2023 21:26:01 +0800 Subject: feat(exp): Add more test for level Signed-off-by: KunoiSayami --- expt_0525.cu | 48 +----------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) (limited to 'expt_0525.cu') diff --git a/expt_0525.cu b/expt_0525.cu index 5af1fc0..8e7cd10 100644 --- a/expt_0525.cu +++ b/expt_0525.cu @@ -204,52 +204,6 @@ public: } }; -/*struct MapNode { - LL key; - // Node *point[MAX_LEVEL + 1]; - Node *point; -}; - -class MemMap { -public: - size_t size; - size_t real_size; - MapNode *store; - - MemMap() : size(0), store(nullptr), real_size(0) {} - - __device__ bool insert(MapNode node) { - bool need_extend = this->size + 1 > this->real_size; - if (need_extend) { - bool need_copy = this->real_size == 0; - if (!need_copy) { - this->real_size += 1; - } - this->real_size *= 2; - MapNode *old = this->store; - this->store = new MapNode[this->real_size]; - if (need_copy) { - memcpy(this->store, old, this->real_size * sizeof(MapNode *)); - } - delete[] old; - } - // need sort after insert - this->store[size] = node; - this->size += 1; - } - - __device__ Node *search(LL key) { - for (int offset = 0; offset < this->size; offset++) { - if (this->store[offset].key >= key) { - return this->store[offset].point; - } - } - return nullptr; - } - - __device__ ~MemMap() { delete[] store; } -};*/ - // Definition of lock-free skip list class LockFreeSkipList { @@ -736,13 +690,13 @@ int main(int argc, char **argv) { sizeof(key_type) * search_length, cudaMemcpyHostToDevice); // Launch main kernel + blocks = calcBlocks(search_length); cudaEvent_t start, stop; cudaEventCreate(&start); cudaEventCreate(&stop); cudaEventRecord(start, nullptr); - blocks = calcBlocks(search_length); kernel<<>>(cudaOperatorItems, search_length, cudaResult); CudaCheckError(); cudaDeviceSynchronize(); -- cgit v1.3.1