MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / operator()

Method operator()

src/backend/cpu/kernel/mean.hpp:28–38  ·  view source on GitHub ↗

Prevents the optimzation of the mean calculation by some compiler flags specifically -march=native.

Source from the content-addressed store, hash-verified

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
41template<typename T, typename Tw, int D>

Callers

nothing calls this directly

Calls 1

transformFunction · 0.70

Tested by

no test coverage detected