Search Results
Documentation
template<typename Result, typename Left, typename Right, bool LeftConsumable, bool RightConsumable>
class TiledArray::detail::Add< Result, Left, Right, LeftConsumable, RightConsumable >
Tile addition operation.
This addition operation will add the content two tiles, and accepts an optional permute argument.
Public Types | |
typedef Add< Result, Left, Right, LeftConsumable, RightConsumable > Add_ | |
This class type. More... | |
typedef Left left_type | |
Left-hand argument base type. More... | |
typedef Right right_type | |
Right-hand argument base type. More... | |
typedef Result result_type | |
The result tile type. More... | |
Public Member Functions | |
template<typename L , typename R , typename Perm , typename = std::enable_if_t<TiledArray::detail::is_permutation_v<Perm>>> | |
result_type operator() (L &&left, R &&right, const Perm &perm) const | |
Add-and-permute operator. More... | |
template<typename L , typename R > | |
result_type operator() (L &&left, R &&right) const | |
Add operator. More... | |
template<typename R > | |
result_type consume_left (left_type &left, R &&right) const | |
Add right to left. More... | |
template<typename L > | |
result_type consume_right (L &&left, right_type &right) const | |
Add left to right. More... | |
Static Public Attributes | |
static constexpr bool left_is_consumable | |
Indicates whether it is possible to consume the left tile. More... | |
static constexpr bool right_is_consumable | |
Indicates whether it is possible to consume the right tile. More... | |
Member Typedef Documentation
◆ Add_
typedef Add<Result, Left, Right, LeftConsumable, RightConsumable> TiledArray::detail::Add< Result, Left, Right, LeftConsumable, RightConsumable >::Add_ |
◆ left_type
typedef Left TiledArray::detail::Add< Result, Left, Right, LeftConsumable, RightConsumable >::left_type |
◆ result_type
typedef Result TiledArray::detail::Add< Result, Left, Right, LeftConsumable, RightConsumable >::result_type |
◆ right_type
typedef Right TiledArray::detail::Add< Result, Left, Right, LeftConsumable, RightConsumable >::right_type |
Member Function Documentation
◆ consume_left()
|
inline |
Add right to left.
Add the right tile to the left. The right tile may be replaced with ZeroTensor
argument, in which case the argument's element values are assumed to be 0
.
- Template Parameters
-
R The right-hand tile argument type
- Parameters
-
left The left-hand tile argument right The right-hand tile argument
- Returns
- The sum of
left
andright
.
◆ consume_right()
|
inline |
Add left to right.
Add the left tile to the right. The left tile may be replaced with ZeroTensor
argument, in which case the argument's element values are assumed to be 0
.
- Template Parameters
-
L The left-hand tile argument type
- Parameters
-
left The left-hand tile argument right The right-hand tile argument
- Returns
- The sum of
left
andright
.
◆ operator()() [1/2]
|
inline |
Add operator.
Compute the sum of two tiles. One of the argument tiles may be replaced with ZeroTensor
argument, in which case the argument's element values are assumed to be 0
.
- Template Parameters
-
L The left-hand tile argument type R The right-hand tile argument type
- Parameters
-
left The left-hand tile argument right The right-hand tile argument
- Returns
- The scaled sum of
left
andright
.
◆ operator()() [2/2]
|
inline |
Add-and-permute operator.
Compute the sum of two tiles and permute the result. One of the argument tiles may be replaced with ZeroTensor
argument, in which case the argument's element values are assumed to be 0
.
- Template Parameters
-
L The left-hand tile argument type R The right-hand tile argument type
- Parameters
-
left The left-hand tile argument right The right-hand tile argument perm The permutation applied to the result tile
- Returns
- The permuted and scaled sum of
left
andright
.
Member Data Documentation
◆ left_is_consumable
|
staticconstexpr |
◆ right_is_consumable
|
staticconstexpr |
The documentation for this class was generated from the following file:
- TiledArray/tile_op/add.h