8.2.5.2 : The reduction.cpp file
There is the 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; } |