| 20 | |
| 21 | template<typename T> |
| 22 | Array<T> matmul(const Array<T> &lhs, const Array<T> &rhs, af_mat_prop optLhs, |
| 23 | af_mat_prop optRhs) { |
| 24 | int Mdim = optLhs == AF_MAT_NONE ? 0 : 1; |
| 25 | int Ndim = optRhs == AF_MAT_NONE ? 1 : 0; |
| 26 | Array<T> res = createEmptyArray<T>( |
| 27 | dim4(lhs.dims()[Mdim], rhs.dims()[Ndim], lhs.dims()[2], lhs.dims()[3])); |
| 28 | static const T alpha = T(1.0); |
| 29 | static const T beta = T(0.0); |
| 30 | gemm(res, optLhs, optRhs, &alpha, lhs, rhs, &beta); |
| 31 | return res; |
| 32 | } |
| 33 | |
| 34 | template<typename T> |
| 35 | Array<T> dot(const Array<T> &lhs, const Array<T> &rhs, af_mat_prop optLhs, |
no test coverage detected