summaryrefslogtreecommitdiff
path: root/expt_0528.cu
diff options
context:
space:
mode:
Diffstat (limited to 'expt_0528.cu')
-rw-r--r--expt_0528.cu12
1 files changed, 2 insertions, 10 deletions
diff --git a/expt_0528.cu b/expt_0528.cu
index cbc6c91..27bc29f 100644
--- a/expt_0528.cu
+++ b/expt_0528.cu
@@ -263,13 +263,10 @@ class LockFreeSkipList {
int *randoms = nullptr;
- double scaleSize;
-
public:
Node *head = nullptr;
Node *tail = nullptr;
- LockFreeSkipList(int *randoms, size_t random_length, double scale_size)
- : scaleSize(scale_size) {
+ LockFreeSkipList(int *randoms, size_t random_length) {
Node *h = new Node(0);
// size_ = 0;
Node *t = new Node(std::numeric_limits<key_type>::max() - 1);
@@ -622,10 +619,6 @@ __global__ void print_function() {
memcpy(spend_time, lockFreeSkipList->spend_time, sizeof(int) * NUM_ITEMS);
}*/
-inline double calcSliceSize(size_t insertion_size) {
- return 1.0 / (double)insertion_size;
-}
-
inline size_t calcBlocks(size_t input) {
return (input % (NUM_THREADS * FACTOR) == 0)
? input / (NUM_THREADS * FACTOR)
@@ -700,8 +693,7 @@ int main(int argc, char **argv) {
// Allocate the skip list
LockFreeSkipList *Clist;
- auto *list = new LockFreeSkipList(random_level, insertion_length,
- calcSliceSize(insertion_length));
+ auto *list = new LockFreeSkipList(random_level, insertion_length);
cudaMalloc(&Clist, sizeof(LockFreeSkipList));
cudaMemcpy(Clist, list, sizeof(LockFreeSkipList), cudaMemcpyHostToDevice);