aboutsummaryrefslogtreecommitdiffstats
path: root/util/random/fast.h
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /util/random/fast.h
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/random/fast.h')
-rw-r--r--util/random/fast.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/random/fast.h b/util/random/fast.h
index ddc5711641..8aad8a489d 100644
--- a/util/random/fast.h
+++ b/util/random/fast.h
@@ -9,7 +9,7 @@
// based on http://www.pcg-random.org/. See T*FastRng* family below.
struct TPCGMixer {
- static inline ui32 Mix(ui64 x) noexcept {
+ static inline ui32 Mix(ui64 x) noexcept {
const ui32 xorshifted = ((x >> 18u) ^ x) >> 27u;
const ui32 rot = x >> 59u;
@@ -44,7 +44,7 @@ struct TReallyFastRng32: public TCommonRNG<ui32, TReallyFastRng32>, public TReal
class TFastRng64: public TCommonRNG<ui64, TFastRng64> {
public:
struct TArgs {
- TArgs(ui64 seed) noexcept;
+ TArgs(ui64 seed) noexcept;
TArgs(IInputStream& entropy);
ui64 Seed1;
@@ -53,26 +53,26 @@ public:
ui32 Seq2;
};
- TFastRng64(ui64 seed1, ui32 seq1, ui64 seed2, ui32 seq2) noexcept;
+ TFastRng64(ui64 seed1, ui32 seq1, ui64 seed2, ui32 seq2) noexcept;
/*
* simplify constructions like
* TFastRng64 rng(17);
* TFastRng64 rng(Seek()); //from any IInputStream
*/
- inline TFastRng64(const TArgs& args) noexcept
+ inline TFastRng64(const TArgs& args) noexcept
: TFastRng64(args.Seed1, args.Seq1, args.Seed2, args.Seq2)
{
}
- inline ui64 GenRand() noexcept {
+ inline ui64 GenRand() noexcept {
const ui64 x = R1_.GenRand();
const ui64 y = R2_.GenRand();
return (x << 32) | y;
}
- inline void Advance(ui64 delta) noexcept {
+ inline void Advance(ui64 delta) noexcept {
R1_.Advance(delta);
R2_.Advance(delta);
}