Prevents the optimzation of the mean calculation by some compiler flags specifically -march=native.
| 26 | /// Prevents the optimzation of the mean calculation by some compiler flags |
| 27 | /// specifically -march=native. |
| 28 | [[gnu::optimize("01")]] void operator()(Ti _newMean, Tw newCount) { |
| 29 | To newMean = transform(_newMean); |
| 30 | if ((newCount != 0) || (runningCount != 0)) { |
| 31 | Tw runningScale = runningCount; |
| 32 | Tw newScale = newCount; |
| 33 | runningCount += newCount; |
| 34 | runningScale = runningScale / runningCount; |
| 35 | newScale = newScale / runningCount; |
| 36 | runningMean = (runningScale * runningMean) + (newScale * newMean); |
| 37 | } |
| 38 | } |
| 39 | }; |
| 40 | |
| 41 | template<typename T, typename Tw, int D> |
nothing calls this directly
no test coverage detected