Skip to content
Snippets Groups Projects
Commit 81e20c4c authored by Shiyin Kang's avatar Shiyin Kang
Browse files

comment about aliasing in AddMatMatDivMat.

parent 4c1a86d8
No related branches found
No related tags found
No related merge requests found
......@@ -1012,6 +1012,8 @@ void CuMatrixBase<Real>::AddMatBlocks(Real alpha, const CuMatrixBase<Real> &A,
}
}
/// dst = a * b / c (by element; when c = 0, dst = a)
/// dst can be an alias of a, b or c safely and get expected result.
template<typename Real>
void CuMatrixBase<Real>::AddMatMatDivMat(const CuMatrixBase<Real> &A,
const CuMatrixBase<Real> &B, const CuMatrixBase<Real> &C) {
......
......@@ -416,6 +416,7 @@ class CuMatrixBase {
/// A = alpha * x * y^T + A .
void AddVecVec(Real alpha, const CuVectorBase<Real> &x, const CuVectorBase<Real> &y);
/// *this = a * b / c (by element; when c = 0, *this = a)
/// *this can be an alias of a, b or c safely and get expected result.
void AddMatMatDivMat(const CuMatrixBase<Real> &A, const CuMatrixBase<Real> &B, const CuMatrixBase<Real> &C);
/// *this = beta * *this + alpha * M M^T, for symmetric matrices. It only
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment