TiledArray  0.7.0
TiledArray::detail::Mult< Result, Left, Right, LeftConsumable, RightConsumable > Class Template Reference

Tile multiplication operation. More...

#include <mult.h>

Public Types

typedef Mult< Result, Left, Right, LeftConsumable, RightConsumable > Mult_
 
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 >
result_type operator() (L &&left, R &&right, const Permutation &perm) const
 Multiply-and-permute operator. More...
 
template<typename L , typename R >
result_type operator() (L &&left, R &&right) const
 Multiply operator. More...
 
template<typename R >
result_type consume_left (left_type &left, R &&right) const
 Multiply right to left. More...
 
template<typename L >
result_type consume_right (L &&left, right_type &right) const
 Multiply 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...
 

Detailed Description

template<typename Result, typename Left, typename Right, bool LeftConsumable, bool RightConsumable>
class TiledArray::detail::Mult< Result, Left, Right, LeftConsumable, RightConsumable >

Tile multiplication operation.

This multiplication will multiply the content two tiles, and accepts an optional permute argument.

Template Parameters
ResultThe result tile type
LeftThe left-hand argument type
RightThe right-hand argument type
LeftConsumableIf true, the left-hand tile is a temporary and may be consumed
RightConsumableIf 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 51 of file mult.h.

Member Typedef Documentation

◆ left_type

template<typename Result , typename Left , typename Right , bool LeftConsumable, bool RightConsumable>
typedef Left TiledArray::detail::Mult< Result, Left, Right, LeftConsumable, RightConsumable >::left_type

Left-hand argument base type.

Definition at line 55 of file mult.h.

◆ Mult_

template<typename Result , typename Left , typename Right , bool LeftConsumable, bool RightConsumable>
typedef Mult<Result, Left, Right, LeftConsumable, RightConsumable> TiledArray::detail::Mult< Result, Left, Right, LeftConsumable, RightConsumable >::Mult_

Definition at line 54 of file mult.h.

◆ result_type

template<typename Result , typename Left , typename Right , bool LeftConsumable, bool RightConsumable>
typedef Result TiledArray::detail::Mult< Result, Left, Right, LeftConsumable, RightConsumable >::result_type

The result tile type.

Definition at line 57 of file mult.h.

◆ right_type

template<typename Result , typename Left , typename Right , bool LeftConsumable, bool RightConsumable>
typedef Right TiledArray::detail::Mult< Result, Left, Right, LeftConsumable, RightConsumable >::right_type

Right-hand argument base type.

Definition at line 56 of file mult.h.

Member Function Documentation

◆ consume_left()

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

Multiply right to left.

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 186 of file mult.h.

◆ consume_right()

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

Multiply left to right.

Multiply the left tile to the right.

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 204 of file mult.h.

◆ operator()() [1/2]

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

Multiply-and-permute operator.

Compute the 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 160 of file mult.h.

◆ operator()() [2/2]

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

Multiply operator.

Compute the 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 173 of file mult.h.

Member Data Documentation

◆ left_is_consumable

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

Indicates whether it is possible to consume the left tile.

Definition at line 60 of file mult.h.

◆ right_is_consumable

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

Indicates whether it is possible to consume the right tile.

Definition at line 63 of file mult.h.


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