/*************************************** Auteur : Pierre Aubert Mail : aubertp7@gmail.com Licence : CeCILL-C ****************************************/ #include #include "asterics_hpc.h" #include "table_particle.h" using namespace std; ///Get the number of cycles per elements of the moveParticle function /** @param nbElement : number of elements of the tables * @param nbRepetition : number of repetition to evaluate the function moveParticle */ void evaluateMoveParticle(long unsigned int nbElement, long unsigned int nbRepetition){ //Allocation of the tables TableParticle tp; allocTableParticle(tp, nbElement); initTableParticle(tp); //Stating the timer long unsigned int beginTime(rdtsc()); for(long unsigned int i(0lu); i < nbRepetition; ++i){ moveParticle(tp, 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 << "evaluateMoveParticle : nbElement = "<