TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable > Class Template Reference
Documentation
template<typename Result, typename Left, typename Right, typename Scalar, bool LeftConsumable, bool RightConsumable>
class TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >
Tile scale-multiplication operation.
This multiplication operation will multiply 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 consumedRightConsumable 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.
Public Types | |
typedef ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable > | ScalMult_ |
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 |
Result tile type. More... | |
Public Member Functions | |
ScalMult (const ScalMult_ &)=default | |
ScalMult (ScalMult_ &&)=default | |
~ScalMult ()=default | |
ScalMult_ & | operator= (const ScalMult_ &)=default |
ScalMult_ & | operator= (ScalMult_ &&)=default |
ScalMult (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-multiply-and-permute operator. More... | |
template<typename L , typename R > | |
result_type | operator() (L &&left, R &&right) const |
Scale-and-multiply operator. More... | |
template<typename R > | |
result_type | consume_left (left_type &left, R &&right) const |
Multiply right to left and scale the result. More... | |
template<typename L > | |
result_type | consume_right (L &&left, right_type &right) const |
Multiply left to right and scale the result. 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
◆ left_type
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
typedef Left TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::left_type |
◆ result_type
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
typedef Result TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::result_type |
◆ right_type
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
typedef Right TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::right_type |
◆ scalar_type
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
typedef Scalar TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::scalar_type |
◆ ScalMult_
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
typedef ScalMult<Result, Left, Right, Scalar, LeftConsumable, RightConsumable> TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::ScalMult_ |
Constructor & Destructor Documentation
◆ ScalMult() [1/3]
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
default |
◆ ScalMult() [2/3]
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
default |
◆ ~ScalMult()
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
default |
◆ ScalMult() [3/3]
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
inlineexplicit |
Member Function Documentation
◆ consume_left()
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename R >
|
inline |
◆ consume_right()
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L >
|
inline |
Multiply left to right and scale the result.
Multiply the left tile to the right, and scale the resulting left tile.
- Template Parameters
-
L The left-hand tile argument type
- Parameters
-
left The left-hand tile argument right The right-hand tile argument
- Returns
- The product of
left
andright
.
◆ operator()() [1/2]
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L , typename R >
|
inline |
Scale-and-multiply operator.
Compute the scaled product of two tiles.
- 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 product of
left
andright
.
◆ operator()() [2/2]
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>>>
|
inline |
Scale-multiply-and-permute operator.
Compute the scaled product of two tiles and permute the result.
- 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 product of
left
andright
.
◆ operator=() [1/2]
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
default |
◆ operator=() [2/2]
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
default |
Member Data Documentation
◆ left_is_consumable
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
staticconstexpr |
◆ right_is_consumable
template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
|
staticconstexpr |
The documentation for this class was generated from the following file:
- TiledArray/tile_op/mult.h