Lines Matching defs:const

63 static const UInt32 k_LZMA = 0x030101;

66 static const UInt64 kComplexInCommands = (UInt64)1 <<
73 static const UInt32 kComplexInMs = 4000;
79 const UInt64 kMinFreq = (UInt64)1000000 * 4;
80 const UInt64 kMaxFreq = (UInt64)1000000 * 20000;
92 // const UInt64 kBenchmarkUsageMult = 1000000; // for debug
93 static const unsigned kBenchmarkUsageMultBits = 16;
94 static const UInt64 kBenchmarkUsageMult = 1 << kBenchmarkUsageMultBits;
101 static const unsigned kNumHashDictBits = 17;
102 static const UInt32 kFilterUnpackSize = (47 << 10); // + 5; // for test
104 static const unsigned kOldLzmaDictBits = 32;
106 // static const size_t kAdditionalSize = (size_t)1 << 32; // for debug
107 static const size_t kAdditionalSize = (size_t)1 << 16;
108 static const UInt32 kCompressedAdditionalSize = (1 << 10);
110 static const UInt32 kMaxMethodPropSize = (1 << 6);
142 const size_t size4 = size & ~((size_t)3);
146 const UInt32 v = RG.GetRnd();
178 const size_t bufSize = Size();
189 const size_t bufSize = Size();
194 // printf("\n bufSize = 0x%p\n", (const void *)bufSize);
221 const unsigned kAddBits = 6;
228 const UInt32 ppp = GetVal(r, numLogBits) + kAddBits;
243 const size_t rem = bufSize - pos;
248 const Byte *src = dest - rep0;
263 const Byte *Data;
267 void Init(const Byte *data, size_t size)
273 bool WasFinished() const { return Pos == Size; }
278 const UInt32 kMaxBlockSize = (1 << 20);
281 const size_t remain = Size - Pos;
324 void Calc(const void *data, size_t size)
329 size_t GetPos() const { return Pos; }
334 Z7_COM7F_IMF(CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize))
369 void Calc(const void *data, size_t size)
375 Z7_COM7F_IMF(CCrcOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize))
490 static inline UInt64 GetTime64(const FILETIME &t) { return ((UInt64)t.dwHighDateTime << 32) | t.dwLowDateTime; }
593 Z7_COM7F_IMF(CBenchProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize))
635 static const unsigned kSubBits = 8;
652 const unsigned i = GetLogSize(size) - 1;
664 const UInt64 kMaxVal = (UInt64)1 << 62;
674 const double v =
704 UInt64 CBenchInfo::GetUsage() const
716 const double v =
729 UInt64 CBenchInfo::GetRatingPerUsage(UInt64 rating) const
740 const double v =
753 UInt64 CBenchInfo::GetSpeed(UInt64 numUnits) const
782 UInt64 GetNumCommands_Enc(UInt64 unpackSize) const
784 const UInt32 kMinSize = 100;
790 UInt64 GetNumCommands_Dec(UInt64 packSize, UInt64 unpackSize) const
797 UInt64 GetRating_Enc(UInt64 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size) const;
798 UInt64 GetRating_Dec(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt64 numIterations) const;
809 UInt64 CBenchProps::GetRating_Enc(UInt64 dictSize, UInt64 elapsedTime, UInt64 freq, UInt64 size) const
826 const UInt32 t = GetLogSize_Sub(dictSize) - (kBenchMinDicLogSize << kSubBits);
829 const UInt64 numCommands = GetNumCommands_from_Size_and_Complexity(size, encComplex);
833 UInt64 CBenchProps::GetRating_Dec(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt64 numIterations) const
835 const UInt64 numCommands = GetNumCommands_Dec(inSize, outSize) * numIterations;
841 UInt64 CBenchInfo::GetRating_LzmaEnc(UInt64 dictSize) const
848 UInt64 CBenchInfo::GetRating_LzmaDec() const
870 DWORD_PTR GetAffinityMask(UInt32 bundleIndex, CCpuSet *cpuSet) const;
871 bool NeedAffinity() const { return NumBundleThreads != 0; }
873 WRes CreateThread_WithAffinity(NWindows::CThread &thread, THREAD_FUNC_TYPE startAddress, LPVOID parameter, UInt32 bundleIndex) const
926 DWORD_PTR CAffinityMode::GetAffinityMask(UInt32 bundleIndex, CCpuSet *cpuSet) const
1074 const Byte *uncompressedDataPtr;
1076 const Byte *fileData;
1201 const COneMethodInfo &method = _method;
1204 const size_t kCompressedBufferSize = _encoderFilter ?
1221 uncompressedDataPtr = (const Byte *)rg;
1241 crc = CrcCalc((const Byte *)rg, rg.Size());
1242 uncompressedDataPtr = (const Byte *)rg;
1282 const UInt64 reduceSize = kBufferSize;
1424 const UInt32 mask = (CheckCrc_Enc ? 0 : 0xFFFF);
1425 const bool useCrc = (mask < NumIterations);
1438 const UInt64 numIterations = NumIterations;
1495 const UInt32 crc2 = CRC_GET_DIGEST(outStreamSpec->Crc);
1571 const UInt64 reduceSize = _uncompressedDataSize;
1581 /* (const Byte *)*propStreamSpec, */
1614 const UInt64 numIterations = NumIterations;
1615 const E_CheckCrcMode checkCrcMode = CheckCrcMode_Dec;
1625 const UInt64 outSize = kBufferSize;
1639 memcpy((Byte *)rgCopy, (const Byte *)*outStreamSpec, compressedSize);
1650 inStreamSpec->Init((const Byte *)*outStreamSpec, compressedSize);
1693 static const UInt32 kNumThreadsMax = (1 << 12);
1778 const CAffinityMode *affinityMode,
1780 const COneMethodInfo &method2,
1782 const Byte *fileData,
1793 const int codecIndex = FindMethod_Index(
1813 const UInt32 numLzmaThreads = method.Get_Lzma_NumThreads();
1821 const bool mtEncMode = (numEncoderThreads > 1) || affinityMode->NeedAffinity();
1977 const WRes wres = encoder.ReadyEvent.Lock();
1986 const WRes wres = encoderFlusher.StartAndWait();
2007 const CEncoderInfo &encoder = encoders[i];
2023 const UInt32 numDecoderThreads = numEncoderThreads * numSubDecoderThreads;
2025 const bool mtDecoderMode = (numDecoderThreads > 1) || affinityMode->NeedAffinity();
2065 const HRESULT res = encoder.CreateDecoderThread(j, (i == 0 && j == 0)
2089 const WRes wres2 = encoder.thread[j].
2094 const HRESULT res2 = encoder.Results[j];
2128 const CEncoderInfo &encoder = encoders[i];
2174 const UInt32 kBlockSizeMax = (UInt32)0 - (UInt32)(1 << 16);
2184 const UInt64 v = (hs + son) * 4 + blockSize +
2195 const size_t kBufferSize = (size_t)dictionary + kAdditionalSize;
2196 const UInt64 kCompressedBufferSize = GetBenchCompressedSize(kBufferSize); // / 2;
2199 const int algo = (level < 5 ? 0 : 1);
2200 const int btMode = (algo == 0 ? 0 : 1);
2225 const Byte *Data;
2232 HRESULT Generate(const Byte *data, size_t size);
2234 const UInt32 *checkSum, IHasher *hf,
2239 HRESULT CCrcInfo_Base::Generate(const Byte *data, size_t size)
2257 const UInt32 *checkSum, IHasher *hf,
2266 const UInt32 hashSize = hf->GetDigestSize();
2270 const Byte *buf = Data;
2271 const size_t size = Size;
2283 const size_t rem = size - pos;
2284 const UInt32 kStep = ((UInt32)1 << 31);
2285 const UInt32 curSize = (rem < kStep) ? (UInt32)rem : kStep;
2330 static const UInt32 kNumFreqCommands = 128;
2420 const Byte *Data;
2460 static const bool k_Crc_CreateLocalBuf_For_File = true; // for total BW test
2461 // static const bool k_Crc_CreateLocalBuf_For_File = false; // for shared memory read test
2558 static UInt32 CrcCalc1(const Byte *buf, size_t size)
2577 const size_t kBufferSize0 = (1 << 8);
2578 const size_t kBufferSize1 = (1 << 10);
2579 const unsigned kCheckSize = (1 << 5);
2605 const char *Name;
2617 static const CBenchMethod g_Bench[] =
2685 const char *Name;
2693 static const CBenchHash g_Hash[] =
2734 static const unsigned kFieldSize_Name = 12;
2735 static const unsigned kFieldSize_SmallName = 4;
2736 static const unsigned kFieldSize_Speed = 9;
2737 static const unsigned kFieldSize_Usage = 5;
2738 static const unsigned kFieldSize_RU = 6;
2739 static const unsigned kFieldSize_Rating = 6;
2740 static const unsigned kFieldSize_EU = 5;
2741 static const unsigned kFieldSize_Effec = 5;
2742 static const unsigned kFieldSize_CrcSpeed = 8;
2745 static const unsigned kFieldSize_TotalSize = 4 + kFieldSize_Speed + kFieldSize_Usage + kFieldSize_RU + kFieldSize_Rating;
2746 static const unsigned kFieldSize_EUAndEffec = 2 + kFieldSize_EU + kFieldSize_Effec;
2799 void CTotalBenchRes::Generate_From_BenchInfo(const CBenchInfo &info)
2815 void CTotalBenchRes::Update_With_Res(const CTotalBenchRes &r)
2826 const CBenchInfo &info,
2858 bool showFreq, UInt64 cpuFreq, bool showSpeed, const CTotalBenchRes &res)
2860 const UInt64 numIterations2 = res.NumIterations2 ? res.NumIterations2 : 1;
2861 const UInt64 speed = res.Speed / numIterations2;
2880 AString GetProcessThreadsInfo(const NSystem::CProcessAffinity &ti)
2907 const unsigned bit = (ti.IsCpuSet(i + k) ? 1 : 0);
2952 static void PrintRequirements(IBenchPrintCallback &f, const char *sizeString,
2953 bool size_Defined, UInt64 size, const char *threadsString, UInt32 numThreads)
3009 void Print(const char *s);
3013 HRESULT SetEncodeResult(const CBenchInfo &info, bool final) Z7_override;
3014 HRESULT SetDecodeResult(const CBenchInfo &info, bool final) Z7_override;
3024 HRESULT CBenchCallbackToPrint::SetEncodeResult(const CBenchInfo &info, bool final)
3032 const UInt64 rating = BenchProps.GetRating_Enc(DictSize, info.GlobalTime, info.GlobalFreq, info.UnpackSize * info.NumIterations);
3042 static const char * const kSep = " | ";
3044 HRESULT CBenchCallbackToPrint::SetDecodeResult(const CBenchInfo &info, bool final)
3052 const UInt64 rating = BenchProps.GetRating_Dec(info.GlobalTime, info.GlobalFreq, info.UnpackSize, info.PackSize, info.NumIterations);
3068 void CBenchCallbackToPrint::Print(const char *s)
3078 static void PrintLeft(IBenchPrintCallback &f, const char *s, unsigned size)
3086 static void PrintRight(IBenchPrintCallback &f, const char *s, unsigned size)
3095 static bool DoesWildcardMatchName_NoCase(const AString &mask, const char *name)
3107 const COneMethodInfo &methodMask,
3111 const CAffinityMode *affinityMode,
3115 const Byte *fileData,
3120 const CBenchMethod &bench = g_Bench[i];
3146 const HRESULT res = MethodBench(
3193 , const CAffinityMode *affinityMode
3201 , const CAffinityMode *affinityMode
3216 const UInt32 complexity = kNumFreqCommands;
3294 const UInt64 numCommands = (UInt64)numIterations * numIterations2 * numThreads * complexity;
3295 const UInt64 rating = info.GetSpeed(numCommands);
3317 const size_t bufferSize,
3318 const Byte *fileData,
3324 const UInt32 *checkSum,
3325 const COneMethodInfo &method,
3328 const CAffinityMode *affinityMode,
3341 const AString &methodName = method.MethodName;
3360 const size_t bsize = (bufferSize == 0 ? 1 : bufferSize);
3488 const UInt64 numCommands = unpSizeThreads2 * complexity / 256;
3489 const UInt64 rating = info.GetSpeed(numCommands);
3507 const COneMethodInfo &methodMask,
3511 const Byte *fileData,
3514 const CAffinityMode *affinityMode,
3521 const CBenchHash &bench = g_Hash[i];
3536 const HRESULT res = CrcBench(
3571 static void ParseNumberString(const UString &s, NCOM::CPropVariant &prop)
3573 const wchar_t *end;
3584 static bool AreSameMethodNames(const char *fullName, const char *shortName)
3625 const CObjectVector<CProperty> &props,
3690 const CProperty &property = props[i];
3706 const CProperty &property = props[i];
3778 const bool isCurrent_fixedDict = name.IsEqualTo("df");
3830 const UString s = name.Ptr(2);
3891 const UInt64 realDelta = ::GetTimeCount() - start;
3897 const UInt64 freq = GetFreq();
3899 const UInt64 hz = MyMultDiv64(numMilCommands * 1000000, freq, start);
3900 const UInt64 mipsVal = numMilCommands * freq / start;
4001 const HRESULT res = fb.FreqBench(NULL /* printCallback */
4035 const bool needStop = (numMilCommands >= (1 <<
4067 const bool dictIsDefined = (isFixedDict || method.Get_DicSize(dict));
4069 const unsigned level = method.GetLevel();
4072 const AString original_MethodName = methodName;
4080 const UInt64 dictSize = method.Get_Lzma_DicSize();
4102 uncompressedDataSize, (const Byte *)fileDataBuffer,
4110 const bool isHashMethod = FindHashMethod(EXTERNAL_CODECS_LOC_VARS methodName, hashID);
4146 const int index = method.FindProp(NCoderPropID::kDictionarySize);
4154 const UInt32 *checkSum = NULL;
4161 const CBenchHash &h = g_Hash[i];
4164 const int propPos = benchMethod.Find(':');
4173 const bool sameProps = method.PropsString.IsEqualTo_Ascii_NoCase(benchProps);
4199 const CBenchMethod &bench = g_Bench[i];
4202 const int propPos = benchMethod.Find(':');
4211 const bool sameProps = method.PropsString.IsEqualTo_Ascii_NoCase(benchProps);
4255 const unsigned next = nt * 2;
4256 const UInt32 ntHalf= numThreadsSpecified / 2;
4269 const unsigned numItems = numThreadsVector.Size() * numColumns;
4317 const UInt64 bufSize = (UInt64)1 << pow;
4333 const UInt32 numThreads = numThreadsVector[ti];
4338 const HRESULT res = CrcBench(EXTERNAL_CODECS_LOC_VARS complexInCommands,
4340 dataSize, (const Byte *)fileDataBuffer,
4375 const CBenchMethod &bench = g_Bench[benchIndex];
4387 const unsigned k_UnknownCoderComplexity = 4;
4402 const NCOM::CPropVariant propVariant = (UInt32)pow;
4406 const HRESULT res = MethodBench(
4415 dataSize, (const Byte *)fileDataBuffer,
4427 const CBenchInfo &bi = callback.BenchInfo_Results[i];
4428 const UInt64 usage = bi.GetUsage();
4429 const UInt64 speed = bi.GetUnpackSizeSpeed();
4514 const unsigned dicSizeLog_Main = (totalBenchMode ? 24 : 25);
4634 const unsigned kNumCpuTests = 3;
4648 const HRESULT res = fb.FreqBench(printCallback
4683 const HRESULT res = TotalBench(EXTERNAL_CODECS_LOC_VARS
4691 (const Byte *)fileDataBuffer,
4711 const HRESULT res = TotalBench_Hash(EXTERNAL_CODECS_LOC_VARS
4714 dataSize, (const Byte *)fileDataBuffer,
4734 const HRESULT res = fb.FreqBench(printCallback
4752 const CBenchMethod &h = g_Bench[i];
4755 const int propPos = benchMethod.Find(':');
4824 const HRESULT res = MethodBench(
4832 uncompressedDataSize, (const Byte *)fileDataBuffer,