4.46 beta

This commit is contained in:
Igor Pavlov
2007-05-25 00:00:00 +00:00
committed by Kornel Lesiński
parent a145bfc7cf
commit c574fc0f4b
191 changed files with 1318 additions and 854 deletions
@@ -76,8 +76,6 @@ static const UInt32 kMaxDicSize =
(1 << 27);
#endif
static const int kDefaultDictionary = 22;
bool CBenchmarkDialog::OnInit()
{
#ifdef LANG
@@ -423,7 +421,7 @@ struct CThreadBenchmark
HRESULT Process();
HRESULT Result;
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
((CThreadBenchmark *)param)->Result = ((CThreadBenchmark *)param)->Process();
return 0;
@@ -465,8 +463,9 @@ HRESULT CBenchCallback::SetDecodeResult(const CBenchInfo &info, bool final)
if (info2.NumIterations == 0)
info2.NumIterations = 1;
info2.GlobalTime /= info2.NumIterations;
info2.UserTime /= info2.NumIterations;
info2.UnpackSize *= info2.NumIterations;
info2.PackSize *= info2.NumIterations;
info2.NumIterations = 1;
if (final && SyncInfo->DecompressingInfo.GlobalTime == 0)
{
@@ -575,10 +574,8 @@ HRESULT Benchmark(
benchmarkDialog._syncInfo.NumThreads = numThreads;
benchmarker.SyncInfo = &benchmarkDialog._syncInfo;
CThread thread;
if (!thread.Create(CThreadBenchmark::MyThreadFunction, &benchmarker))
return E_FAIL;
NWindows::CThread thread;
RINOK(thread.Create(CThreadBenchmark::MyThreadFunction, &benchmarker));
benchmarkDialog.Create(0);
thread.Wait();
return S_OK;
return thread.Wait();
}
@@ -39,6 +39,11 @@ public:
CBenchInfo2 DecompressingInfoTemp;
CBenchInfo2 DecompressingInfo;
CProgressSyncInfo()
{
if (_startEvent.Create() != S_OK)
throw 3986437;
}
void Init()
{
Changed = false;