/*************************************** Auteur : Pierre Aubert Mail : aubertp7@gmail.com Licence : CeCILL-C ****************************************/ #include #include #include "asterics_hpc.h" #include "Particle.h" using namespace std; ///Get the number of cycles per elements of the function move of Particle /** @param nbElement : number of elements of the tables * @param nbRepetition : number of repetition to evaluate the function move of Particle */ void evaluateClassParticlePropagation(long unsigned int nbElement, long unsigned int nbRepetition){ //Allocation of the tables std::vector vecParticle(nbElement); for(std::vector::iterator it(vecParticle.begin()); it != vecParticle.end(); ++it){ it->randomInit(); } //Stating the timer long unsigned int beginTime(rdtsc()); for(long unsigned int i(0lu); i < nbRepetition; ++i){ for(std::vector::iterator it(vecParticle.begin()); it != vecParticle.end(); ++it){ it->move(0.005f); } } //Get the time of the nbRepetition calls long unsigned int elapsedTime((double)(rdtsc() - beginTime)/((double)nbRepetition)); double cyclePerElement(((double)elapsedTime)/((double)nbElement)); cout << "evaluateClassParticlePropagation : nbElement = "<