Search Results

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.

Definition at line 269 of file mult.h.

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

Left-hand argument base type.

Definition at line 274 of file mult.h.

◆ 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

Result tile type.

Definition at line 277 of file mult.h.

◆ 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

Right-hand argument base type.

Definition at line 275 of file mult.h.

◆ 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

Scaling factor type.

Definition at line 276 of file mult.h.

◆ 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_

This class type.

Definition at line 273 of file mult.h.

Constructor & Destructor Documentation

◆ ScalMult() [1/3]

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::ScalMult ( const ScalMult_ )
default

◆ ScalMult() [2/3]

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::ScalMult ( ScalMult_ &&  )
default

◆ ~ScalMult()

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::~ScalMult ( )
default

◆ ScalMult() [3/3]

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::ScalMult ( const Scalar  factor)
inlineexplicit

Constructor.

Parameters
factorThe scaling factor applied to result tiles

Definition at line 375 of file mult.h.

Member Function Documentation

◆ consume_left()

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename R >
result_type TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::consume_left ( left_type left,
R &&  right 
) const
inline

Multiply right to left and scale the result.

Multiply the right tile to the left.

Template Parameters
RThe right-hand tile argument type
Parameters
leftThe left-hand tile argument
rightThe right-hand tile argument
Returns
The product of left and right.

Definition at line 415 of file mult.h.

◆ consume_right()

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L >
result_type TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::consume_right ( L &&  left,
right_type right 
) const
inline

Multiply left to right and scale the result.

Multiply the left tile to the right, and scale the resulting left tile.

Template Parameters
LThe left-hand tile argument type
Parameters
leftThe left-hand tile argument
rightThe right-hand tile argument
Returns
The product of left and right.

Definition at line 434 of file mult.h.

◆ operator()() [1/2]

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
template<typename L , typename R >
result_type TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::operator() ( L &&  left,
R &&  right 
) const
inline

Scale-and-multiply operator.

Compute the scaled product of two tiles.

Template Parameters
LThe left-hand tile argument type
RThe right-hand tile argument type
Parameters
leftThe left-hand tile argument
rightThe right-hand tile argument
Returns
The scaled product of left and right.

Definition at line 402 of file mult.h.

◆ 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>>>
result_type TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::operator() ( L &&  left,
R &&  right,
const Perm &  perm 
) const
inline

Scale-multiply-and-permute operator.

Compute the scaled product of two tiles and permute the result.

Template Parameters
LThe left-hand tile argument type
RThe right-hand tile argument type
Parameters
leftThe left-hand tile argument
rightThe right-hand tile argument
permThe permutation applied to the result tile
Returns
The permuted and scaled product of left and right.

Definition at line 389 of file mult.h.

◆ operator=() [1/2]

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
ScalMult_& TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::operator= ( const ScalMult_ )
default

◆ operator=() [2/2]

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
ScalMult_& TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::operator= ( ScalMult_ &&  )
default

Member Data Documentation

◆ left_is_consumable

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
constexpr bool TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::left_is_consumable
staticconstexpr
Initial value:
=
LeftConsumable && std::is_same<result_type, left_type>::value

Indicates whether it is possible to consume the left tile.

Definition at line 280 of file mult.h.

◆ right_is_consumable

template<typename Result , typename Left , typename Right , typename Scalar , bool LeftConsumable, bool RightConsumable>
constexpr bool TiledArray::detail::ScalMult< Result, Left, Right, Scalar, LeftConsumable, RightConsumable >::right_is_consumable
staticconstexpr
Initial value:
=
RightConsumable && std::is_same<result_type, right_type>::value

Indicates whether it is possible to consume the right tile.

Definition at line 283 of file mult.h.


The documentation for this class was generated from the following file: