Lines Matching full:uint32
62 static void SetComplexCommands(UInt32 complexInSeconds, UInt64 cpuFreq, UInt64 &complexInCommands)
78 static const UInt32 kFilterUnpackSize = (48 << 10);
82 static const UInt32 kAdditionalSize = (1 << 16);
83 static const UInt32 kCompressedAdditionalSize = (1 << 10);
84 static const UInt32 kMaxLzmaPropSize = 5;
88 UInt32 A1;
89 UInt32 A2;
93 UInt32 GetRnd()
130 UInt32 GetVal(UInt32 &res, unsigned numBits)
132 UInt32 val = res & (((UInt32)1 << numBits) - 1);
136 UInt32 GetLen(UInt32 &res)
138 UInt32 len = GetVal(res, 2);
144 for (UInt32 i = 0; i < BufferSize; i++)
150 UInt32 pos = 0;
151 UInt32 rep0 = 1;
154 UInt32 res = RG->GetRnd();
160 UInt32 len;
167 UInt32 ppp = GetVal(res, 5) + 6;
178 for (UInt32 i = 0; i < len && pos < BufferSize; i++, pos++)
201 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
204 STDMETHODIMP CBenchmarkInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
207 UInt32 kMaxBlockSize = (1 << 20);
211 size = (UInt32)remain;
212 for (UInt32 i = 0; i < size; i++)
227 UInt32 Pos;
230 UInt32 Crc;
242 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
245 STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
254 Pos += (UInt32)curSize;
256 *processedSize = (UInt32)curSize;
271 UInt32 Crc;
276 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
279 STDMETHODIMP CCrcOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
477 static UInt32 GetLogSize(UInt32 size)
480 for (UInt32 j = 0; j < (1 << kSubBits); j++)
481 if (size <= (((UInt32)1) << i) + (j << (i - kSubBits)))
543 UInt32 EncComplex;
544 UInt32 DecComplexCompr;
545 UInt32 DecComplexUnc;
560 UInt64 GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size);
572 UInt64 CBenchProps::GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size)
592 UInt64 GetCompressRating(UInt32 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size)
612 UInt32 NumDecoderSubThreads;
632 UInt32 DecoderIndex;
648 UInt32 crc;
649 UInt32 kBufferSize;
650 UInt32 compressedSize;
658 UInt32 _uncompressedDataSize;
662 UInt32 uncompressedDataSize,
666 HRESULT Decode(UInt32 decoderIndex);
728 static const UInt32 k_LZMA = 0x030101;
732 UInt32 uncompressedDataSize,
738 UInt32 kCompressedBufferSize =
850 UInt32 crcPrev = 0;
874 _encoderFilter->Filter(rgCopy.Buffer, (UInt32)rg.BufferSize);
883 UInt32 crcNew = CRC_GET_DIGEST(outStreamSpec->Crc);
897 HRESULT CEncoderInfo::Decode(UInt32 decoderIndex)
1004 static const UInt32 kNumThreadsMax = (1 << 12);
1009 CBenchEncoders(UInt32 num): encoders(0) { encoders = new CEncoderInfo[num]; }
1025 UInt32 numThreads,
1027 UInt32 uncompressedDataSize,
1035 UInt32 numInStreams, numOutStreams;
1043 UInt32 numEncoderThreads = 1;
1044 UInt32 numSubDecoderThreads = 1;
1052 UInt32 numLzmaThreads = method.Get_Lzma_NumThreads(fixedNumber);
1066 UInt32 i;
1087 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
1172 UInt32 numDecoderThreads = numEncoderThreads * numSubDecoderThreads;
1195 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
1215 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
1230 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
1253 inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary)
1255 UInt32 hs = dictionary - 1;
1269 UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary)
1271 const UInt32 kBufferSize = dictionary;
1272 const UInt32 kCompressedBufferSize = (kBufferSize / 2);
1273 UInt32 numSubThreads = (numThreads > 1) ? 2 : 1;
1274 UInt32 numBigThreads = numThreads / numSubThreads;
1279 static HRESULT CrcBig(const void *data, UInt32 size, UInt64 numIterations,
1280 const UInt32 *checkSum, IHasher *hf,
1296 UInt32 hashSize = hf->GetDigestSize();
1299 UInt32 sum = 0;
1300 for (UInt32 j = 0; j < hashSize; j += 4)
1311 UInt32 g_BenchCpuFreqTemp = 1;
1317 static const UInt32 kNumFreqCommands = 128;
1319 static UInt32 CountCpuFreq(UInt32 sum, UInt32 num, UInt32 val)
1321 for (UInt32 i = 0; i < num; i++)
1335 UInt32 ValRes;
1336 UInt32 Size;
1350 UInt32 sum = g_BenchCpuFreqTemp;
1365 UInt32 NumThreads;
1370 for (UInt32 i = 0; i < NumThreads; i++)
1388 UInt32 Size;
1391 UInt32 CheckSum;
1414 UInt32 NumThreads;
1419 for (UInt32 i = 0; i < NumThreads; i++)
1432 static UInt32 CrcCalc1(const Byte *buf, UInt32 size)
1434 UInt32 crc = CRC_INIT_VAL;;
1435 for (UInt32 i = 0; i < size; i++)
1440 static void RandGen(Byte *buf, UInt32 size, CBaseRandomGenerator &RG)
1442 for (UInt32 i = 0; i < size; i++)
1446 static UInt32 RandGenCrc(Byte *buf, UInt32 size, CBaseRandomGenerator &RG)
1455 const UInt32 kBufferSize0 = (1 << 8);
1456 const UInt32 kBufferSize1 = (1 << 10);
1457 const UInt32 kCheckSize = (1 << 5);
1461 UInt32 i;
1464 UInt32 crc1 = CrcCalc1(buf, kBufferSize0);
1470 for (UInt32 j = 0; j < kCheckSize; j++)
1479 UInt32 EncComplex;
1480 UInt32 DecComplexCompr;
1481 UInt32 DecComplexUnc;
1508 UInt32 Complex;
1509 UInt32 CheckSum;
1651 static void PrintRequirements(IBenchPrintCallback &f, const char *sizeString, UInt64 size, const char *threadsString, UInt32 numThreads)
1668 UInt32 DictSize;
1758 UInt32 numThreads, bool forceUnpackSize, UInt32 unpackSize, IBenchPrintCallback *printCallback, CBenchCallbackToPrint *callback)
1772 UInt32 unpackSize2 = unpackSize;
1800 UInt32 numThreads,
1804 UInt32 &res)
1809 UInt32 bufferSize = 1 << 20;
1810 UInt32 complexity = kNumFreqCommands;
1818 UInt32 bsize = (bufferSize == 0 ? 1 : bufferSize);
1830 UInt32 i;
1856 UInt32 sum = g_BenchCpuFreqTemp;
1890 UInt32 numThreads, UInt32 bufferSize,
1892 UInt32 complexity,
1893 const UInt32 *checkSum,
1923 UInt32 bsize = (bufferSize == 0 ? 1 : bufferSize);
1935 UInt32 i;
1980 /* UInt32 crc = */ RandGenCrc(buf, bufferSize, RG);
2023 UInt32 numThreads, UInt32 bufSize,
2065 CTempValues(UInt32 num) { Values = new UInt64[num]; }
2075 else if (result <= (UInt32)0xFFFFFFFF)
2076 prop = (UInt32)result;
2081 static UInt32 GetNumThreadsNext(unsigned i, UInt32 numThreads)
2086 UInt32 num = (UInt32)(2 + (i & 1)) << (i >> 1);
2108 UInt32 numIterations,
2114 UInt32 numCPUs = 1;
2122 UInt32 numThreads = numCPUs;
2124 UInt32 testTime = kComplexInSeconds;
2165 UInt32 sum = (UInt32)start;
2166 sum = CountCpuFreq(sum, (UInt32)(numMilCommands * 1000000 / kNumFreqCommands), g_BenchCpuFreqTemp);
2194 UInt32 dict;
2204 UInt32 dictSize = method.Get_Lzma_DicSize();
2205 UInt32 uncompressedDataSize = kAdditionalSize + dictSize;
2229 UInt32 complexity = 10000;
2230 const UInt32 *checkSum = NULL;
2251 UInt32 t = GetNumThreadsNext(numThreadsTests, numThreads);
2266 for (UInt32 i = 0; i < numIterations; i++)
2270 UInt32 bufSize = (UInt32)1 << pow;
2284 UInt32 t = GetNumThreadsNext(ti, numThreads);
2319 if (GetBenchMemoryUsage(numThreads, ((UInt32)1 << dicSizeLog)) + (8 << 20) <= ramSize)
2415 for (UInt32 i = 0; i < numIterations; i++)
2426 UInt32 resVal;
2446 UInt32 resVal;
2478 unsigned pow = (dict < ((UInt32)1 << kStartDicLog)) ? kBenchMinDicLogSize : kStartDicLog;
2481 while (((UInt32)1 << pow) > dict && pow > 0)
2483 for (; ((UInt32)1 << pow) <= dict; pow++)
2491 callback.DictSize = (UInt32)1 << pow;
2500 NCOM::CPropVariant propVariant = (UInt32)pow;
2504 UInt32 uncompressedDataSize = callback.DictSize;