1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-14 04:31:19 +00:00

Adds a quick way to get the compiler to pick an integral type.

This commit is contained in:
Thomas Harte 2021-06-22 19:33:29 -04:00
parent 2574407afb
commit d2ab0dd839

View File

@ -12,6 +12,8 @@
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
#include "Sizes.hpp"
namespace Numeric { namespace Numeric {
template <typename IntType> struct LSFRPolynomial {}; template <typename IntType> struct LSFRPolynomial {};
@ -76,6 +78,8 @@ template <typename IntType = uint64_t, IntType polynomial = LSFRPolynomial<IntTy
IntType value_ = 0; IntType value_ = 0;
}; };
template <uint64_t polynomial> class LFSRv: public LFSR<MinIntTypeValue<polynomial>, polynomial> {};
} }
#endif /* LFSR_h */ #endif /* LFSR_h */