mirror of
https://github.com/TomHarte/CLK.git
synced 2024-08-23 02:29:01 +00:00
Documents next
.
This commit is contained in:
parent
5391a699a4
commit
4b2c68c3d3
@ -47,6 +47,10 @@ template <typename IntType = uint64_t, IntType polynomial = LSFRPolynomial<IntTy
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Advances the LSFR, returning either an @c IntType of value @c 1 or @c 0,
|
||||||
|
determining the bit that was just shifted out.
|
||||||
|
*/
|
||||||
IntType next() {
|
IntType next() {
|
||||||
auto result = value_ & 1;
|
auto result = value_ & 1;
|
||||||
value_ = (value_ >> 1) ^ (result * polynomial);
|
value_ = (value_ >> 1) ^ (result * polynomial);
|
||||||
|
Loading…
Reference in New Issue
Block a user