| 29 | |
| 30 | template<typename T> |
| 31 | Array<T> multiplyIndexed(const Array<T> &lhs, const Array<T> &rhs, |
| 32 | std::vector<af_seq> idx) { |
| 33 | Array<T> rhs_sub = createSubArray(rhs, idx); |
| 34 | Array<T> out = createEmptyArray<T>( |
| 35 | dim4(lhs.dims()[0], rhs_sub.dims()[1], lhs.dims()[2], lhs.dims()[3])); |
| 36 | T alpha = scalar<T>(1.0); |
| 37 | T beta = scalar<T>(0.0); |
| 38 | gemm(out, AF_MAT_NONE, AF_MAT_NONE, &alpha, lhs, rhs_sub, &beta); |
| 39 | return out; |
| 40 | } |
| 41 | |
| 42 | template<typename T> |
| 43 | static af_array transform_coordinates(const af_array &tf_, const float d0_, |
no test coverage detected