diff options
| author | KunoiSayami <[email protected]> | 2022-02-17 14:11:18 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2022-02-17 14:11:18 +0800 |
| commit | 74c563f94e4b02779465ead2b2dbce0db59e352a (patch) | |
| tree | 64e747bfa7b46274a34b6c7787a7233ceafba846 /db/skiplist.cuh | |
| parent | e98fc6bf301bb3bf38aab4ccce51edc16953024b (diff) | |
merge: Merge remote-tracking branch google/main@4fb1468
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'db/skiplist.cuh')
| -rw-r--r-- | db/skiplist.cuh | 2 |
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); |
