aboutsummaryrefslogtreecommitdiffstats
path: root/util/random/fast.h
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/random/fast.h
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/random/fast.h')
-rw-r--r--util/random/fast.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/random/fast.h b/util/random/fast.h
index ddc5711641..194524d4b9 100644
--- a/util/random/fast.h
+++ b/util/random/fast.h
@@ -3,7 +3,7 @@
#include "lcg_engine.h"
#include "common_ops.h"
-#include <util/generic/bitops.h>
+#include <util/generic/bitops.h>
#include <util/system/platform.h>
// based on http://www.pcg-random.org/. See T*FastRng* family below.
@@ -13,14 +13,14 @@ struct TPCGMixer {
const ui32 xorshifted = ((x >> 18u) ^ x) >> 27u;
const ui32 rot = x >> 59u;
- return RotateBitsRight(xorshifted, rot);
+ return RotateBitsRight(xorshifted, rot);
}
};
using TFastRng32Base = TLcgRngBase<TLcgIterator<ui64, ULL(6364136223846793005)>, TPCGMixer>;
using TReallyFastRng32Base = TLcgRngBase<TFastLcgIterator<ui64, ULL(6364136223846793005), ULL(1)>, TPCGMixer>;
-class IInputStream;
+class IInputStream;
struct TFastRng32: public TCommonRNG<ui32, TFastRng32>, public TFastRng32Base {
inline TFastRng32(ui64 seed, ui32 seq)
@@ -28,7 +28,7 @@ struct TFastRng32: public TCommonRNG<ui32, TFastRng32>, public TFastRng32Base {
{
}
- TFastRng32(IInputStream& entropy);
+ TFastRng32(IInputStream& entropy);
};
// faster than TFastRng32, but have only one possible stream sequence
@@ -38,14 +38,14 @@ struct TReallyFastRng32: public TCommonRNG<ui32, TReallyFastRng32>, public TReal
{
}
- TReallyFastRng32(IInputStream& entropy);
+ TReallyFastRng32(IInputStream& entropy);
};
class TFastRng64: public TCommonRNG<ui64, TFastRng64> {
public:
struct TArgs {
TArgs(ui64 seed) noexcept;
- TArgs(IInputStream& entropy);
+ TArgs(IInputStream& entropy);
ui64 Seed1;
ui64 Seed2;
@@ -58,7 +58,7 @@ public:
/*
* simplify constructions like
* TFastRng64 rng(17);
- * TFastRng64 rng(Seek()); //from any IInputStream
+ * TFastRng64 rng(Seek()); //from any IInputStream
*/
inline TFastRng64(const TArgs& args) noexcept
: TFastRng64(args.Seed1, args.Seq1, args.Seed2, args.Seq2)