Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tensor overloaded operators for component-wise operations #63

Open
fredrikbk opened this issue May 3, 2017 · 0 comments
Open

Add tensor overloaded operators for component-wise operations #63

fredrikbk opened this issue May 3, 2017 · 0 comments

Comments

@fredrikbk
Copy link
Contributor

fredrikbk commented May 3, 2017

Functions:

/// Negate tensor
template <typename C>
Expr operator-(const Tensor<C>&) {
  taco_not_supported_yet;
  return Expr();
}

/// Scale tensor
template <typename C>
Expr operator*(const Tensor<C>&, C) {
  taco_not_supported_yet;
  return Expr();
}

/// Scale tensor
template <typename C>
Expr operator*(C, const Tensor<C>&) {
  taco_not_supported_yet;
  return Expr();
}

/// Add tensors
template <typename T>
Expr operator+(const Tensor<T>&, const Tensor<T>&) {
  taco_not_supported_yet;
  return Expr();
}

/// Subtract tensors
template <typename T>
Expr operator-(const Tensor<T>&, const Tensor<T>&) {
  taco_not_supported_yet;
  return Expr();
}

Methods:

  Tensor<C>& operator*=(C) {
    taco_not_supported_yet;
  }

  Tensor<C>& operator+=(const Tensor<C>&) {
    taco_not_supported_yet;
  }

  Tensor<C>& operator-=(const Tensor<C>&) {
    taco_not_supported_yet;
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant