Skip to content

Commit 815af30

Browse files
authored
Merge pull request #142 from boostorg/splitmix
2 parents be37499 + 852cb0e commit 815af30

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

include/boost/random/splitmix64.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ class splitmix64
116116
/** Advances the state of the generator by @c z. */
117117
inline void discard(std::uint64_t z) noexcept
118118
{
119-
for (std::uint64_t i {}; i < z; ++i)
120-
{
121-
next();
122-
}
119+
state_ += z * UINT64_C(0x9E3779B97F4A7C15);
123120
}
124121

125122
/**

0 commit comments

Comments
 (0)