Skip to content

Commit

Permalink
Merge branch 'shuffled' into hoxnox
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxnox committed May 18, 2016
2 parents e489f2a + 4b11d7c commit 6d7379d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shuffled.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ namespace iter {
}

// power of 2 approximation (val < pow(2, get_approx(val)+1))
uint16_t iter::impl::lfsr::get_approx(uint64_t val) {
inline uint16_t
iter::impl::lfsr::get_approx(uint64_t val) {
if (val == 0)
return 0;
uint16_t pow2_approx = 0;
Expand All @@ -53,7 +54,8 @@ uint16_t iter::impl::lfsr::get_approx(uint64_t val) {
return pow2_approx;
}

uint64_t iter::impl::lfsr::shift(uint64_t reg, uint8_t reg_size) {
inline uint64_t
iter::impl::lfsr::shift(uint64_t reg, uint8_t reg_size) {
if (reg & 1)
reg = ((reg ^ PRIME_POLY[reg_size]) >> 1) | (1 << reg_size);
else
Expand Down

0 comments on commit 6d7379d

Please sign in to comment.