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

Function moments

src/backend/cuda/moments.cpp:29–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28template<typename T>
29Array<float> moments(const Array<T> &in, const af_moment_type moment) {
30 in.eval();
31 dim4 odims, idims = in.dims();
32 dim_t moments_dim = bitCount(moment);
33
34 odims[0] = moments_dim;
35 odims[1] = 1;
36 odims[2] = idims[2];
37 odims[3] = idims[3];
38
39 Array<float> out = createValueArray<float>(odims, 0.f);
40 out.eval();
41
42 kernel::moments<T>(out, in, moment);
43 return out;
44}
45
46#define INSTANTIATE(T) \
47 template Array<float> moments<T>(const Array<T> &in, \

Callers

nothing calls this directly

Calls 3

bitCountFunction · 0.70
evalMethod · 0.45
dimsMethod · 0.45

Tested by

no test coverage detected