Lines Matching refs:U32

46 #include "util.h"       /* U32 */
121 static U32 FUZ_rotl32(U32 u32, U32 nbBits)
126 static U32 FUZ_highbit32(U32 v32)
134 static U32 FUZ_rand(U32* src)
136 U32 rand32 = *src;
147 static void FUZ_fillCompressibleNoiseBuffer(void* buffer, size_t bufferSize, double proba, U32* seed)
151 U32 const P32 = (U32)(32768 * proba);
317 static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double compressibility, U32 duration_s)
333 U32 coreRandState = seed;
363 { U32 randState = coreRandState ^ PRIME3;
375 U32 testNb = 0;
376 U32 randState = FUZ_rand(&coreRandState) ^ PRIME3;
378 int const blockStart = (int)(FUZ_rand(&randState) % (U32)(COMPRESSIBLE_NOISE_LENGTH - blockSize - 1)) + 1;
386 U32 const crcOrig = XXH32(block, (size_t)blockSize, 0);
411 U32 const crcBase = XXH32(block, (size_t)srcSize, 0);
421 { U32 const crcDec = XXH32(decodedBuffer, (size_t)srcSize, 0);
444 U32 const crcBase = XXH32(block, (size_t)srcSize, 0);
454 { U32 const crcDec = XXH32(decodedBuffer, (size_t)srcSize, 0);
513 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
539 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
552 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
577 { U32 const maxNbBits = FUZ_highbit32((U32)compressedSize);
581 { U32 const nbBits = FUZ_rand(&randState) % maxNbBits;
588 { U32 const nbBitsCodes = FUZ_rand(&randState) % maxNbBits;
589 U32 const nbBits = nbBitsCodes ? nbBitsCodes-1 : 0;
600 { U32 const endMark = 0xA9B1C3D6;
606 { U32 endCheck; memcpy(&endCheck, decodedBuffer+blockSize, sizeof(endCheck));
746 { U32 const crcCheck = XXH32(decodedBuffer+dictSize, (size_t)blockSize, 0);
755 { U32 const crcCheck = XXH32(decodedBuffer+dictSize, (size_t)blockSize, 0);
788 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
799 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
827 U32 expectedCrc;
882 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
893 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
946 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
995 { U32 const crcCheck = XXH32(decodedBuffer, (size_t)blockSize, 0);
1003 { int const availableSpace = (int)(FUZ_rand(&randState) % (U32)blockSize) + 5;
1020 { U32 const crcSrc = XXH32(block, (size_t)consumedSize, 0);
1021 U32 const crcDst = XXH32(decodedBuffer, (size_t)consumedSize, 0);
1073 U32 randState = 1;
1238 const U32 maxMessageSizeLog = 10;
1239 const U32 maxMessageSizeMask = (1<<maxMessageSizeLog) - 1;
1240 U32 messageSize = (FUZ_rand(&randState) & maxMessageSizeMask) + 1;
1241 U32 iNext = 0;
1242 U32 rNext = 0;
1243 U32 dNext = 0;
1244 const U32 dBufferSize = ringBufferSize + maxMessageSizeMask;
1485 const U32 maxMessageSizeLog = 10;
1486 const U32 maxMessageSizeMask = (1<<maxMessageSizeLog) - 1;
1487 U32 messageSize = (FUZ_rand(&randState) & maxMessageSizeMask) + 1;
1488 U32 iNext = 0;
1489 U32 rNext = 0;
1490 U32 dNext = 0;
1491 const U32 dBufferSize = ringBufferSize + maxMessageSizeMask;
1552 U32 totalMessageSize = 0;
1760 U32 seed = 0;
1768 U32 duration = 0;
1825 case '9': duration *= 10; duration += (U32)(*argument++ - '0'); continue;
1836 seed += (U32)(*argument - '0');
1872 U32 const h = XXH32(&t, sizeof(t), 1);