ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | List of all members
container::op::add_op Struct Reference

A functor to perform add operation on a Tensor. More...

#include <linalg_op.h>

Collaboration diagram for container::op::add_op:

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)
 

Detailed Description

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.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
void container::op::add_op::operator() ( const T alpha,
const Tensor x,
const T beta,
const Tensor y,
Tensor z 
)
Here is the call graph for this function:

◆ operator()() [2/2]

void container::op::add_op::operator() ( const Tensor x,
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.

Parameters
xThe first input Tensor.
yThe second input Tensor.
zThe output Tensor that will hold the result of the add operation. It must have the same shape as the input Tensors.
Here is the call graph for this function:

The documentation for this struct was generated from the following files: