| 62 | |
| 63 | template<typename T> |
| 64 | static inline void moment_copy(double* out, const af_array moments) { |
| 65 | const auto& info = getInfo(moments); |
| 66 | vector<T> h_moments(info.elements()); |
| 67 | copyData(h_moments.data(), moments); |
| 68 | |
| 69 | // convert to double |
| 70 | copy(begin(h_moments), end(h_moments), out); |
| 71 | } |
| 72 | |
| 73 | af_err af_moments_all(double* out, const af_array in, |
| 74 | const af_moment_type moment) { |