Tidy up hardware crc32 implementations
This commit is contained in:
parent
9566553856
commit
730f4f45ef
10 changed files with 217 additions and 239 deletions
|
@ -69,7 +69,7 @@ namespace wren {
|
|||
constexpr inline auto g_polynomial_table = PolynomialTable<Polynomial>::table;
|
||||
|
||||
template <std::uint32_t Polynomial, std::uint32_t XorIn=0xffffffff, std::uint32_t XorOut=XorIn>
|
||||
constexpr std::uint32_t crc32 (const char* data, std::size_t len, std::uint32_t crc) {
|
||||
constexpr std::uint32_t crc32 (const char* data, std::size_t len, std::uint32_t crc) noexcept {
|
||||
//static_assert(g_polynomial_table<Polynomial>[0b10000000] == Polynomial);
|
||||
crc ^= XorIn;
|
||||
for (std::size_t z = 0; z < len; ++z) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue