aboutsummaryrefslogtreecommitdiff
path: root/db/skiplist.cuh
diff options
context:
space:
mode:
Diffstat (limited to 'db/skiplist.cuh')
-rw-r--r--db/skiplist.cuh2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/skiplist.cuh b/db/skiplist.cuh
index 2501af8..6f0cc6c 100644
--- a/db/skiplist.cuh
+++ b/db/skiplist.cuh
@@ -327,7 +327,7 @@ __device__ int SkipList<Key, Comparator>::RandomHeight() {
// Increase height with probability 1 in kBranching
static const unsigned int kBranching = 4;
int height = 1;
- while (height < kMaxHeight && ((rnd_.Next() % kBranching) == 0)) {
+ while (height < kMaxHeight && rnd_.OneIn(kBranching)) {
height++;
}
assert(height > 0);