Skip to content

Commit 8ab0a12

Browse files
committed
Removes unnecessary overloaded operator
1 parent 42e2778 commit 8ab0a12

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/taco/index_notation/index_notation.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,19 @@ class Access : public IndexExpr {
173173
const std::vector<IndexVar>& getIndexVars() const;
174174

175175
/// Assign the result of an expression to a left-hand-side tensor access.
176+
/// ```
177+
/// a(i) = b(i) * c(i);
178+
/// ```
176179
Assignment operator=(const IndexExpr&);
180+
181+
// Must override the default Access operator=, otherwise it is a copy.
177182
Assignment operator=(const Access&);
178183

179184
/// Accumulate the result of an expression to a left-hand-side tensor access.
180185
/// ```
181186
/// a(i) += B(i,j) * c(j);
182187
/// ```
183188
void operator+=(const IndexExpr&);
184-
void operator+=(const Access&);
185189

186190
private:
187191
const Node* getPtr() const;

src/index_notation/index_notation.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ void Access::operator+=(const IndexExpr& expr) {
250250
const_cast<AccessNode*>(getPtr())->setIndexExpression(expr, true);
251251
}
252252

253-
void Access::operator+=(const Access& expr) {
254-
operator+=(static_cast<IndexExpr>(expr));
255-
}
256-
257253

258254
// class Sum
259255
Reduction::Reduction(const Node* n) : IndexExpr(n) {

0 commit comments

Comments
 (0)