MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / stable_mean

Function stable_mean

src/backend/oneapi/kernel/mean.hpp:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35template<typename To, typename Tw>
36void stable_mean(To *lhs, Tw *l_wt, To rhs, Tw r_wt) {
37 if (((*l_wt) != (Tw)0) || (r_wt != (Tw)0)) {
38 Tw l_scale = (*l_wt);
39 (*l_wt) += r_wt;
40 l_scale = l_scale / (*l_wt);
41
42 Tw r_scale = r_wt / (*l_wt);
43 (*lhs) = (l_scale * *lhs) + (r_scale * rhs);
44 }
45}
46
47template<typename Ti, typename Tw, typename To, uint dim, uint DIMY>
48class meanDimKernelSMEM {

Callers 4

operator()Method · 0.70
operator()Method · 0.70
mean_all_weightedFunction · 0.70
mean_allFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected