You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2024. It is now read-only.
static inline Matrix<T, Rows, Cols> HadamardProduct( const Matrix<T, Rows, Cols>& m1, const Matrix<T, Rows, Cols>& m2) {
MATHFU_MAT_OPERATOR(m1[i] * m2[i]);
}
this function can not compile because MATHFU_MAT_OPERATOR expand as :
Matrix<T, Rows, Cols> result;
MATHFU_TOOL_MAT_OPERATION(result.data_[i] = (OP));
where result.data_[i] is a vector and m1[i] * m2[i] is a scalar
this shoud be implemented as below:
static inline Matrix<T, Rows, Cols> HadamardProduct( const Matrix<T, Rows, Cols>& m1, const Matrix<T, Rows, Cols>& m2) {
Matrix<T, Rows, Cols> result;
for (int i = 0; i < kElements;++i) {
result[i] = (m1[i] * m2[i]);
}
return result;
}
The text was updated successfully, but these errors were encountered: