Skip to content

Commit

Permalink
Removes unnecessary overloaded operator
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikbk committed Apr 27, 2018
1 parent 42e2778 commit 8ab0a12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 5 additions & 1 deletion include/taco/index_notation/index_notation.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,19 @@ class Access : public IndexExpr {
const std::vector<IndexVar>& 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.
/// ```
/// a(i) += B(i,j) * c(j);
/// ```
void operator+=(const IndexExpr&);
void operator+=(const Access&);

private:
const Node* getPtr() const;
Expand Down
4 changes: 0 additions & 4 deletions src/index_notation/index_notation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,6 @@ void Access::operator+=(const IndexExpr& expr) {
const_cast<AccessNode*>(getPtr())->setIndexExpression(expr, true);
}

void Access::operator+=(const Access& expr) {
operator+=(static_cast<IndexExpr>(expr));
}


// class Sum
Reduction::Reduction(const Node* n) : IndexExpr(n) {
Expand Down

0 comments on commit 8ab0a12

Please sign in to comment.