Mercurial > crc32
comparison crc32-test.c @ 1:90cb48b87dcc
*: don't hardcode the list of impls in multiple places
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 09 Feb 2026 01:18:06 -0500 |
| parents | 422835bc1aca |
| children | ead9f84d11db |
comparison
equal
deleted
inserted
replaced
| 0:422835bc1aca | 1:90cb48b87dcc |
|---|---|
| 9 #define DOUBLE(x) x x | 9 #define DOUBLE(x) x x |
| 10 DOUBLE(DOUBLE(DOUBLE(DOUBLE(DOUBLE(DOUBLE(DOUBLE("\x01\x02\x04\x08\x10\x20\x40\x80"))))))) | 10 DOUBLE(DOUBLE(DOUBLE(DOUBLE(DOUBLE(DOUBLE(DOUBLE("\x01\x02\x04\x08\x10\x20\x40\x80"))))))) |
| 11 #undef DOUBLE | 11 #undef DOUBLE |
| 12 ; | 12 ; |
| 13 static const crc32_r_spec crc[] = { | 13 static const crc32_r_spec crc[] = { |
| 14 crc32c_r, | 14 #define CRC32_IMPL(name) crc32##name##_r, |
| 15 crc32qw_r, | 15 #include "crc32-impls.h" |
| 16 crc32x86_vpclmulqdq_r | |
| 17 }; | 16 }; |
| 18 size_t i; | 17 size_t i; |
| 19 | 18 |
| 20 uint32_t crcc = crc32(testdata, sizeof(testdata)); | 19 uint32_t crcc = crc32(testdata, sizeof(testdata)); |
| 21 | 20 |
