Previous The reduction.h file |
Parent Solving the performance problem |
Outline | Next The main_reduction.cpp file |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#include "reduction.h" ///Do the reduction /** @param tabValue : input table * @param nbElement : number of elements in the input table * @return sum of all the elements of the input table */ float reduction(const float * tabValue, long unsigned int nbElement){ float res(0.0f); for(long unsigned int i(0lu); i < nbElement; ++i){ res += tabValue[i]; } return res; } |
Previous The reduction.h file |
Parent Solving the performance problem |
Outline | Next The main_reduction.cpp file |