From 8ab0a124e1bdbfc7d5d579c9c63b28a4f1253d38 Mon Sep 17 00:00:00 2001 From: Fredrik Kjolstad Date: Fri, 27 Apr 2018 10:27:27 -0400 Subject: [PATCH] Removes unnecessary overloaded operator --- include/taco/index_notation/index_notation.h | 6 +++++- src/index_notation/index_notation.cpp | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/taco/index_notation/index_notation.h b/include/taco/index_notation/index_notation.h index 2c75b5cac..ba030ac42 100644 --- a/include/taco/index_notation/index_notation.h +++ b/include/taco/index_notation/index_notation.h @@ -173,7 +173,12 @@ class Access : public IndexExpr { const std::vector& getIndexVars() const; /// Assign the result of an expression to a left-hand-side tensor access. + /// ``` + /// a(i) = b(i) * c(i); + /// ``` Assignment operator=(const IndexExpr&); + + // Must override the default Access operator=, otherwise it is a copy. Assignment operator=(const Access&); /// Accumulate the result of an expression to a left-hand-side tensor access. @@ -181,7 +186,6 @@ class Access : public IndexExpr { /// a(i) += B(i,j) * c(j); /// ``` void operator+=(const IndexExpr&); - void operator+=(const Access&); private: const Node* getPtr() const; diff --git a/src/index_notation/index_notation.cpp b/src/index_notation/index_notation.cpp index 27a445fc1..f27574cb3 100644 --- a/src/index_notation/index_notation.cpp +++ b/src/index_notation/index_notation.cpp @@ -250,10 +250,6 @@ void Access::operator+=(const IndexExpr& expr) { const_cast(getPtr())->setIndexExpression(expr, true); } -void Access::operator+=(const Access& expr) { - operator+=(static_cast(expr)); -} - // class Sum Reduction::Reduction(const Node* n) : IndexExpr(n) {