Skip to content

Commit

Permalink
compile fix and pass prefetches flag via performCleanupTasks
Browse files Browse the repository at this point in the history
  • Loading branch information
markusbattarbee committed May 28, 2024
1 parent 03ebd10 commit b45ccee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/hashinator/hashinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Hashmap {
_mapInfo->currentMaxBucketOverflow = Hashinator::defaults::BUCKET_OVERFLOW;
_mapInfo->tombstoneCounter = 0;
#ifndef HASHINATOR_CPU_ONLY_MODE
SPLIT_CHECK_ERR(split_gpuMemcpyAsync(device_map, this, sizeof(Hashmap), split_gpuMemcpyHostToDevice, stream));
SPLIT_CHECK_ERR(split_gpuMemcpy(device_map, this, sizeof(Hashmap), split_gpuMemcpyHostToDevice));
#endif
}

Expand Down Expand Up @@ -603,12 +603,13 @@ class Hashmap {
}
#else
// Try to get the overflow back to the original one
template <bool prefetches = true>
void performCleanupTasks(split_gpuStream_t s = 0) {
if (tombstone_ratio() > 0.025) {
clean_tombstones(s);
clean_tombstones<prefetches>(s);
}
while (_mapInfo->currentMaxBucketOverflow > Hashinator::defaults::BUCKET_OVERFLOW) {
device_rehash(_mapInfo->sizePower + 1, s);
device_rehash<prefetches>(_mapInfo->sizePower + 1, s);
}
}

Expand Down

0 comments on commit b45ccee

Please sign in to comment.