From 74c563f94e4b02779465ead2b2dbce0db59e352a Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Thu, 17 Feb 2022 14:11:18 +0800 Subject: merge: Merge remote-tracking branch google/main@4fb1468 Signed-off-by: KunoiSayami --- db/skiplist.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/skiplist.cuh') 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::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); -- cgit v1.3.1