mirror of
https://github.com/aaru-dps/Aaru.Checksums.Native.git
synced 2025-12-16 19:24:29 +00:00
Add unit tests for Adler-32.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include "adler32.h"
|
||||
#include "simd.h"
|
||||
|
||||
AVX2 void adler32_avx2(uint16_t* sum1, uint16_t* sum2, const unsigned char* buf, size_t len)
|
||||
AVX2 void adler32_avx2(uint16_t* sum1, uint16_t* sum2, const unsigned char* buf, long len)
|
||||
{
|
||||
uint32_t s1 = *sum1;
|
||||
uint32_t s2 = *sum2;
|
||||
@@ -21,7 +21,7 @@ AVX2 void adler32_avx2(uint16_t* sum1, uint16_t* sum2, const unsigned char* buf,
|
||||
* Process the data in blocks.
|
||||
*/
|
||||
const unsigned BLOCK_SIZE = 1 << 5;
|
||||
size_t blocks = len / BLOCK_SIZE;
|
||||
long blocks = len / BLOCK_SIZE;
|
||||
len -= blocks * BLOCK_SIZE;
|
||||
|
||||
while(blocks)
|
||||
|
||||
Reference in New Issue
Block a user