Changeset 3777 in Sophya


Ignore:
Timestamp:
May 18, 2010, 6:03:56 PM (15 years ago)
Author:
ansari
Message:

Ajout calcul nb total d'operations , Reza 18/05/2010

Location:
trunk/AddOn/TAcq
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/brproc.cc

    r3776 r3777  
    6464  totnbpaq_=0;
    6565  numfile_=0;
     66  nb_flop_=0.;
    6667  moyfc_=moytt_=0.;
    6768
     
    337338          complex<r_4>((r_4)vpdata_[j][f].realB(), -(r_4)vpdata_[j][f].imagB());
    338339      }
     340      nb_flop_ += (7.*(r_8)vis.Size());
    339341    }
    340342  }
     
    379381            complex<r_4>((r_4)pvpdata[j][f].realB(), -(r_4)pvpdata[j][f].imagB());
    380382        }
     383        nb_flop_ += (7.*(r_8)(ffin-fdeb));
    381384      }
    382385    }
     
    467470/* --Methode-- */
    468471BRVisCalcGroup::BRVisCalcGroup(size_t nbcalc, RAcqMemZoneMgr& memgr, string outpath, uint_4 nmean, size_t nthr)
     472  : tm_(false)
    469473{
    470474  if ((nbcalc<1)||(nbcalc>4))
     
    495499  for(size_t i=0; i<viscalcp_.size(); i++)
    496500    viscalcp_[i]->start();
     501  tm_.SplitQ();
    497502}
    498503/* --Methode-- */
    499504void BRVisCalcGroup::join()
    500505{
    501   for(size_t i=0; i<viscalcp_.size(); i++)
     506  r_8 totflop=0.;
     507  for(size_t i=0; i<viscalcp_.size(); i++) {
    502508    viscalcp_[i]->join();
     509    totflop += viscalcp_[i]->TotNbFLOP();
     510  }
     511  tm_.SplitQ();
     512  cout << "      ----------------------------------------------------------" << endl;
     513  cout << " BRVisCalcGroup::join() : Finished , Elaspsed time: " << tm_.PartialElapsedTimems()
     514       << " ms (total:" << tm_.TotalElapsedTimems() << ")" << endl;
     515  cout << " ... TotalMegaFLOP= " << totflop/(1024.e3) << " @ "
     516       << totflop/(r_8)tm_.PartialElapsedTimems()/(1024) << " MFLOP/s" << endl;
     517  cout << "      ----------------------------------------------------------" << endl;
     518  return;
    503519}
    504520
  • trunk/AddOn/TAcq/brproc.h

    r3776 r3777  
    4848  virtual int    execute(int tid);
    4949
     50  // Le nombre total d'operations effectuees
     51  inline r_8 TotNbFLOP() { return nb_flop_; }
     52
    5053protected:
    5154  virtual int Process();
     
    7477  uint_4 numfile_;
    7578  uint_8 totnbpaq_;
     79
     80  r_8 nb_flop_;   // Nombre total d'operations effectuees
    7681
    7782  // Variables/objets pour la verifications des timetag
     
    104109protected:
    105110  vector<BRVisibilityCalculator *> viscalcp_;
     111  Timer tm_;
    106112};
    107113 
Note: See TracChangeset for help on using the changeset viewer.