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.
- Template Parameters
-
Result | The result tile type |
Left | The left-hand argument type |
Right | The right-hand argument type |
Scalar | The scaling factor type |
LeftConsumable | If true , the left-hand tile is a temporary and may be consumed |
RightConsumable | If true , the right-hand tile is a temporary and may be consumed |
- Note
- Input tiles can be consumed only if their type matches the result type.
Definition at line 237 of file subt.h.
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename R >
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
and right
.
Definition at line 387 of file subt.h.
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L >
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
and right
.
Definition at line 407 of file subt.h.
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L , typename R >
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
and right
.
Definition at line 372 of file subt.h.
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L , typename R , typename Perm , typename = std::enable_if_t<TiledArray::detail::is_permutation_v<Perm>>>
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
and right
.
Definition at line 357 of file subt.h.