Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
std:start [2023/04/08 16:16] – [Nested namespaces] rajitstd:start [2025/09/16 14:33] (current) – [Runtime Functions] rajit
Line 34: Line 34:
 Given the current ''W''-bit state of a Fibonacci-style linear feedback shift register (LFSR), compute the next state. The LFSR has ''N'' taps, and the ith tap is at location ''taps[i]''. Given the current ''W''-bit state of a Fibonacci-style linear feedback shift register (LFSR), compute the next state. The LFSR has ''N'' taps, and the ith tap is at location ''taps[i]''.
  
 +<code act> 
 +export template<pint W; pint N; pint taps[N]> function galois_lfsr (int<W> state) : int<W>; 
 +</code> 
 +Given the current ''W''-bit state of a Galois-style linear feedback shift register (LFSR), compute the next state. The LFSR has ''N'' taps, and the ith tap is at location ''taps[i]''.