Home | History | Annotate | Download | only in Common

Lines Matching refs:UInt32

41 static const UInt32 kUncompressMinBlockSize =

48 static const UInt32 kCrcBlockSize =
55 static const UInt32 kAdditionalSize = (1 << 16);
56 static const UInt32 kCompressedAdditionalSize = (1 << 10);
57 static const UInt32 kMaxLzmaPropSize = 5;
61 UInt32 A1;
62 UInt32 A2;
66 UInt32 GetRnd()
102 UInt32 GetVal(UInt32 &res, int numBits)
104 UInt32 val = res & (((UInt32)1 << numBits) - 1);
108 UInt32 GetLen(UInt32 &res)
110 UInt32 len = GetVal(res, 2);
115 UInt32 pos = 0;
116 UInt32 rep0 = 1;
119 UInt32 res = RG->GetRnd();
125 UInt32 len;
132 UInt32 ppp = GetVal(res, 5) + 6;
143 for (UInt32 i = 0; i < len && pos < BufferSize; i++, pos++)
166 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
169 STDMETHODIMP CBenchmarkInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
172 UInt32 kMaxBlockSize = (1 << 20);
176 size = (UInt32)remain;
177 for (UInt32 i = 0; i < size; i++)
192 UInt32 Pos;
200 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
203 STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
209 Pos += (UInt32)curSize;
211 *processedSize = (UInt32)curSize;
225 UInt32 Crc;
228 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
231 STDMETHODIMP CCrcOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
391 static UInt32 GetLogSize(UInt32 size)
394 for (UInt32 j = 0; j < (1 << kSubBits); j++)
395 if (size <= (((UInt32)1) << i) + (j << (i - kSubBits)))
448 UInt64 GetCompressRating(UInt32 dictionarySize, UInt64 elapsedTime, UInt64 freq, UInt64 size)
456 UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations)
472 UInt32 NumIterations;
480 UInt32 DecoderIndex;
493 UInt32 crc;
494 UInt32 kBufferSize;
495 UInt32 compressedSize;
499 HRESULT Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandomGenerator *rg);
501 HRESULT Decode(UInt32 decoderIndex);
553 HRESULT CEncoderInfo::Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandomGenerator *rgLoc)
557 UInt32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize;
622 HRESULT CEncoderInfo::Decode(UInt32 decoderIndex)
640 for (UInt32 j = 0; j < NumIterations; j++)
657 static const UInt32 kNumThreadsMax = (1 << 16);
662 CBenchEncoders(UInt32 num): encoders(0) { encoders = new CEncoderInfo[num]; }
668 UInt32 numThreads, UInt32 dictionarySize, IBenchCallback *callback)
670 UInt32 numEncoderThreads =
676 UInt32 numSubDecoderThreads =
691 UInt32 i;
697 const UInt32 kLzmaId = 0x030101;
701 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
775 UInt32 numDecoderThreads = numEncoderThreads * numSubDecoderThreads;
791 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
811 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
826 for (UInt32 j = 0; j < numSubDecoderThreads; j++)
849 inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary)
851 UInt32 hs = dictionary - 1;
865 UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary)
867 const UInt32 kBufferSize = dictionary;
868 const UInt32 kCompressedBufferSize = (kBufferSize / 2);
869 UInt32 numSubThreads = (numThreads > 1) ? 2 : 1;
870 UInt32 numBigThreads = numThreads / numSubThreads;
875 static bool CrcBig(const void *data, UInt32 size, UInt32 numCycles, UInt32 crcBase)
877 for (UInt32 i = 0; i < numCycles; i++)
888 UInt32 Size;
889 UInt32 NumCycles;
890 UInt32 Crc;
908 UInt32 NumThreads;
913 for (UInt32 i = 0; i < NumThreads; i++)
925 static UInt32 CrcCalc1(const Byte *buf, UInt32 size)
927 UInt32 crc = CRC_INIT_VAL;;
928 for (UInt32 i = 0; i < size; i++)
933 static void RandGen(Byte *buf, UInt32 size, CBaseRandomGenerator &RG)
935 for (UInt32 i = 0; i < size; i++)
939 static UInt32 RandGenCrc(Byte *buf, UInt32 size, CBaseRandomGenerator &RG)
948 const UInt32 kBufferSize0 = (1 << 8);
949 const UInt32 kBufferSize1 = (1 << 10);
950 const UInt32 kCheckSize = (1 << 5);
954 UInt32 i;
957 UInt32 crc1 = CrcCalc1(buf, kBufferSize0);
963 for (UInt32 j = 0; j < kCheckSize; j++)
969 HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed)
983 UInt32 numCycles = (kCrcBlockSize) / ((bufferSize >> 2) + 1) + 1;
991 UInt32 i;
1016 UInt32 crc = RandGenCrc(buf, bufferSize, RG);