|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
A functor to perform add operation on a Tensor. More...
#include <linalg_op.h>
Public Member Functions | |
| void | operator() (const Tensor &x, const Tensor &y, Tensor &z) |
| Perform add operation on the input Tensors. | |
| template<typename T > | |
| void | operator() (const T &alpha, const Tensor &x, const T &beta, const Tensor &y, Tensor &z) |
A functor to perform add operation on a Tensor.
This functor adds two Tensors element-wise, resulting in a new Tensor with the same shape as the input Tensors.
| void container::op::add_op::operator() | ( | const T & | alpha, |
| const Tensor & | x, | ||
| const T & | beta, | ||
| const Tensor & | y, | ||
| Tensor & | z | ||
| ) |
Perform add operation on the input Tensors.
This function adds two Tensors element-wise, resulting in a new Tensor with the same shape as the input Tensors.
| x | The first input Tensor. |
| y | The second input Tensor. |
| z | The output Tensor that will hold the result of the add operation. It must have the same shape as the input Tensors. |