Search Results
Documentation
template<typename Result, typename Left, typename Right, typename Scalar, bool LeftConsumable, bool RightConsumable>
class TiledArray::detail::ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >
Tile scale-subtraction operation.
This subtraction operation will subtract the content two tiles and apply a permutation to the result tensor. If no permutation is given or the permutation is null, then the result is not permuted.
Public Types | |
typedef ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable > ScalSubt_ | |
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 Scalar scalar_type | |
Scaling factor type. More... | |
typedef Result result_type | |
The result tile type. More... | |
Public Member Functions | |
ScalSubt (const ScalSubt_ &)=default | |
ScalSubt (ScalSubt_ &&)=default | |
~ScalSubt ()=default | |
ScalSubt_ & operator= (const ScalSubt_ &)=default | |
ScalSubt_ & operator= (ScalSubt_ &&)=default | |
ScalSubt (const Scalar factor) | |
Constructor. More... | |
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 | |
Scale-subtract-and-permute operator. More... | |
template<typename L , typename R > | |
result_type operator() (L &&left, R &&right) const | |
Scale-and-subtract operator. More... | |
template<typename R > | |
result_type consume_left (left_type &left, R &&right) const | |
Subtract right to left and scale the result. More... | |
template<typename L > | |
result_type consume_right (L &&left, right_type &right) const | |
Subtract left to right and scale the result. More... | |
Static Public Attributes | |
static constexpr bool left_is_consumable | |
static constexpr bool right_is_consumable | |
Member Typedef Documentation
◆ left_type
typedef Left TiledArray::detail::ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::left_type |
◆ result_type
typedef Result TiledArray::detail::ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::result_type |
◆ right_type
typedef Right TiledArray::detail::ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::right_type |
◆ scalar_type
typedef Scalar TiledArray::detail::ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::scalar_type |
◆ ScalSubt_
typedef ScalSubt<Result, Left, Right, Scalar, LeftConsumable, RightConsumable> TiledArray::detail::ScalSubt< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::ScalSubt_ |
Constructor & Destructor Documentation
◆ ScalSubt() [1/3]
|
default |
◆ ScalSubt() [2/3]
|
default |
◆ ~ScalSubt()
|
default |
◆ ScalSubt() [3/3]
|
inlineexplicit |
Member Function Documentation
◆ consume_left()
|
inline |
Subtract right to left and scale the result.
Subtract 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 difference of
left
andright
.
◆ consume_right()
|
inline |
Subtract left to right and scale the result.
Subtract the left tile to the right, and scale the resulting left tile. 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 difference of
left
andright
.
◆ operator()() [1/2]
|
inline |
Scale-and-subtract operator.
Compute the scaled difference 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 difference of
left
andright
.
◆ operator()() [2/2]
|
inline |
Scale-subtract-and-permute operator.
Compute the scaled difference 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 difference of
left
andright
.
◆ operator=() [1/2]
|
default |
◆ operator=() [2/2]
|
default |
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/subt.h