~ubuntu-branches/ubuntu/precise/p7zip/precise-updates

« back to all changes in this revision

Viewing changes to CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2009-02-14 20:12:27 UTC
  • mfrom: (1.1.11 upstream) (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090214201227-go63qxm9ozfdma60
Tags: 4.65~dfsg.1-1
* New upstream release.
* Remove wx2.8 Build-Depends added by mistakes (7zG is not yet
  intended to be built).
* Use dh_clean without -k.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
  UInt64 Usage;
25
25
  UInt64 RPU;
26
26
  void Init() { NumIterations = 0; Rating = 0; Usage = 0; RPU = 0; }
27
 
  void Normalize() 
28
 
  { 
29
 
    if (NumIterations == 0) 
 
27
  void Normalize()
 
28
  {
 
29
    if (NumIterations == 0)
30
30
      return;
31
 
    Rating /= NumIterations; 
32
 
    Usage /= NumIterations; 
33
 
    RPU /= NumIterations; 
 
31
    Rating /= NumIterations;
 
32
    Usage /= NumIterations;
 
33
    RPU /= NumIterations;
34
34
    NumIterations = 1;
35
35
  }
36
 
  void SetMid(const CTotalBenchRes &r1, const CTotalBenchRes &r2) 
37
 
  { 
38
 
    Rating = (r1.Rating + r2.Rating) / 2; 
 
36
  void SetMid(const CTotalBenchRes &r1, const CTotalBenchRes &r2)
 
37
  {
 
38
    Rating = (r1.Rating + r2.Rating) / 2;
39
39
    Usage = (r1.Usage + r2.Usage) / 2;
40
40
    RPU = (r1.RPU + r2.RPU) / 2;
41
41
    NumIterations = (r1.NumIterations + r2.NumIterations) / 2;
168
168
  if (!CrcInternalTest())
169
169
    return S_FALSE;
170
170
  #ifdef BENCH_MT
171
 
  UInt64 ramSize = NWindows::NSystem::GetRamSize();  // 
 
171
  UInt64 ramSize = NWindows::NSystem::GetRamSize();  //
172
172
  UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors();
173
173
  PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs);
174
174
  if (numThreads == (UInt32)-1)