mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-18 01:30:56 +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…
x
Reference in New Issue
Block a user