TiledArray::expressions::MultEngine< Left, Right, Result > Class Template Reference

Documentation

template<typename Left, typename Right, typename Result>
class TiledArray::expressions::MultEngine< Left, Right, Result >

Multiplication expression engine.

This implements any expression encoded with the multiplication operator. This includes Hadamard product, e.g.

(c("i,j")=)a("i,j")*b("i,j")

, and pure contractions, e.g.

(c("i,j")=)a("i,k")*b("k,j")

.

Definition at line 202 of file mult_engine.h.

Public Types

typedef MultEngine< Left, Right, Result > MultEngine_
 This class type. More...
 
typedef ContEngine< MultEngine_ContEngine_
 Contraction engine base class. More...
 
typedef BinaryEngine< MultEngine_BinaryEngine_
 Binary base class type. More...
 
typedef BinaryEngine< MultEngine_ExprEngine_
 Expression engine base class type. More...
 
typedef EngineTrait< MultEngine_ >::left_type left_type
 The left-hand expression type. More...
 
typedef EngineTrait< MultEngine_ >::right_type right_type
 The right-hand expression type. More...
 
typedef EngineTrait< MultEngine_ >::value_type value_type
 The result tile type. More...
 
typedef EngineTrait< MultEngine_ >::op_base_type op_base_type
 The tile operation type. More...
 
typedef EngineTrait< MultEngine_ >::op_type op_type
 The tile operation type. More...
 
typedef EngineTrait< MultEngine_ >::policy policy
 The result policy type. More...
 
typedef EngineTrait< MultEngine_ >::dist_eval_type dist_eval_type
 The distributed evaluator type. More...
 
typedef EngineTrait< MultEngine_ >::scalar_type scalar_type
 Tile scalar type. More...
 
typedef EngineTrait< MultEngine_ >::size_type size_type
 Size type. More...
 
typedef EngineTrait< MultEngine_ >::trange_type trange_type
 Tiled range type. More...
 
typedef EngineTrait< MultEngine_ >::shape_type shape_type
 Shape type. More...
 
typedef EngineTrait< MultEngine_ >::pmap_interface pmap_interface
 Process map interface type. More...
 

Public Member Functions

template<typename L , typename R >
 MultEngine (const MultExpr< L, R > &expr)
 Constructor. More...
 
void perm_indices (const BipartiteIndexList &target_indices)
 Set the index list for this expression. More...
 
void init_indices (const BipartiteIndexList &target_indices)
 Initialize the index list of this expression. More...
 
void init_indices ()
 Initialize the index list of this expression. More...
 
void init_struct (const BipartiteIndexList &target_indices)
 Initialize result tensor structure. More...
 
void init_distribution (World *world, std::shared_ptr< pmap_interface > pmap)
 Initialize result tensor distribution. More...
 
trange_type make_trange () const
 Non-permuting tiled range factory function. More...
 
trange_type make_trange (const Permutation &perm) const
 Permuting tiled range factory function. More...
 
shape_type make_shape () const
 Non-permuting shape factory function. More...
 
shape_type make_shape (const Permutation &perm) const
 Permuting shape factory function. More...
 
op_type make_tile_op () const
 Non-permuting tile operation factory function. More...
 
template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
op_type make_tile_op (const Perm &perm) const
 Permuting tile operation factory function. More...
 
dist_eval_type make_dist_eval () const
 Construct the distributed evaluator for this expression. More...
 
const char * make_tag () const
 Expression identification tag. More...
 
void print (ExprOStream os, const BipartiteIndexList &target_indices) const
 Expression print. More...
 

Member Typedef Documentation

◆ BinaryEngine_

template<typename Left , typename Right , typename Result >
typedef BinaryEngine<MultEngine_> TiledArray::expressions::MultEngine< Left, Right, Result >::BinaryEngine_

Binary base class type.

Definition at line 208 of file mult_engine.h.

◆ ContEngine_

template<typename Left , typename Right , typename Result >
typedef ContEngine<MultEngine_> TiledArray::expressions::MultEngine< Left, Right, Result >::ContEngine_

Contraction engine base class.

Definition at line 207 of file mult_engine.h.

◆ dist_eval_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::dist_eval_type TiledArray::expressions::MultEngine< Left, Right, Result >::dist_eval_type

The distributed evaluator type.

Definition at line 228 of file mult_engine.h.

◆ ExprEngine_

template<typename Left , typename Right , typename Result >
typedef BinaryEngine<MultEngine_> TiledArray::expressions::MultEngine< Left, Right, Result >::ExprEngine_

Expression engine base class type.

Definition at line 210 of file mult_engine.h.

◆ left_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::left_type TiledArray::expressions::MultEngine< Left, Right, Result >::left_type

The left-hand expression type.

Definition at line 214 of file mult_engine.h.

◆ MultEngine_

template<typename Left , typename Right , typename Result >
typedef MultEngine<Left, Right, Result> TiledArray::expressions::MultEngine< Left, Right, Result >::MultEngine_

This class type.

Definition at line 205 of file mult_engine.h.

◆ op_base_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::op_base_type TiledArray::expressions::MultEngine< Left, Right, Result >::op_base_type

The tile operation type.

Definition at line 222 of file mult_engine.h.

◆ op_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::op_type TiledArray::expressions::MultEngine< Left, Right, Result >::op_type

The tile operation type.

Definition at line 224 of file mult_engine.h.

◆ pmap_interface

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::pmap_interface TiledArray::expressions::MultEngine< Left, Right, Result >::pmap_interface

Process map interface type.

Definition at line 240 of file mult_engine.h.

◆ policy

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::policy TiledArray::expressions::MultEngine< Left, Right, Result >::policy

The result policy type.

Definition at line 226 of file mult_engine.h.

◆ right_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::right_type TiledArray::expressions::MultEngine< Left, Right, Result >::right_type

The right-hand expression type.

Definition at line 216 of file mult_engine.h.

◆ scalar_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::scalar_type TiledArray::expressions::MultEngine< Left, Right, Result >::scalar_type

Tile scalar type.

Definition at line 230 of file mult_engine.h.

◆ shape_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::shape_type TiledArray::expressions::MultEngine< Left, Right, Result >::shape_type

Shape type.

Definition at line 238 of file mult_engine.h.

◆ size_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::size_type TiledArray::expressions::MultEngine< Left, Right, Result >::size_type

Size type.

Definition at line 234 of file mult_engine.h.

◆ trange_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::trange_type TiledArray::expressions::MultEngine< Left, Right, Result >::trange_type

Tiled range type.

Definition at line 236 of file mult_engine.h.

◆ value_type

template<typename Left , typename Right , typename Result >
typedef EngineTrait<MultEngine_>::value_type TiledArray::expressions::MultEngine< Left, Right, Result >::value_type

The result tile type.

Definition at line 220 of file mult_engine.h.

Constructor & Destructor Documentation

◆ MultEngine()

template<typename Left , typename Right , typename Result >
template<typename L , typename R >
TiledArray::expressions::MultEngine< Left, Right, Result >::MultEngine ( const MultExpr< L, R > &  expr)
inline

Constructor.

Template Parameters
LThe left-hand argument expression type
RThe right-hand argument expression type
Parameters
exprThe parent expression

Definition at line 249 of file mult_engine.h.

Member Function Documentation

◆ init_distribution()

template<typename Left , typename Right , typename Result >
void TiledArray::expressions::MultEngine< Left, Right, Result >::init_distribution ( World *  world,
std::shared_ptr< pmap_interface pmap 
)
inline

Initialize result tensor distribution.

This function will initialize the world and process map for the result tensor.

Parameters
worldThe world were the result will be distributed
pmapThe process map for the result tensor tiles

Definition at line 349 of file mult_engine.h.

Here is the call graph for this function:

◆ init_indices() [1/2]

template<typename Left , typename Right , typename Result >
void TiledArray::expressions::MultEngine< Left, Right, Result >::init_indices ( )
inline

Initialize the index list of this expression.

Definition at line 310 of file mult_engine.h.

Here is the call graph for this function:

◆ init_indices() [2/2]

template<typename Left , typename Right , typename Result >
void TiledArray::expressions::MultEngine< Left, Right, Result >::init_indices ( const BipartiteIndexList target_indices)
inline

Initialize the index list of this expression.

Parameters
target_indicesThe target index list for this expression

Definition at line 269 of file mult_engine.h.

Here is the call graph for this function:

◆ init_struct()

template<typename Left , typename Right , typename Result >
void TiledArray::expressions::MultEngine< Left, Right, Result >::init_struct ( const BipartiteIndexList target_indices)
inline

Initialize result tensor structure.

This function will initialize the permutation, tiled range, and shape for the result tensor.

Parameters
target_indicesThe target index list for the result tensor

Definition at line 335 of file mult_engine.h.

Here is the call graph for this function:

◆ make_dist_eval()

template<typename Left , typename Right , typename Result >
dist_eval_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_dist_eval ( ) const
inline

Construct the distributed evaluator for this expression.

Returns
The distributed evaluator that will evaluate this expression

Definition at line 443 of file mult_engine.h.

Here is the call graph for this function:

◆ make_shape() [1/2]

template<typename Left , typename Right , typename Result >
shape_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_shape ( ) const
inline

Non-permuting shape factory function.

Returns
The result shape

Definition at line 380 of file mult_engine.h.

◆ make_shape() [2/2]

template<typename Left , typename Right , typename Result >
shape_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_shape ( const Permutation perm) const
inline

Permuting shape factory function.

Parameters
permThe permutation to be applied to the array
Returns
The result shape

Definition at line 388 of file mult_engine.h.

Here is the call graph for this function:

◆ make_tag()

template<typename Left , typename Right , typename Result >
const char* TiledArray::expressions::MultEngine< Left, Right, Result >::make_tag ( ) const
inline

Expression identification tag.

Returns
An expression tag used to identify this expression

Definition at line 453 of file mult_engine.h.

◆ make_tile_op() [1/2]

template<typename Left , typename Right , typename Result >
op_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_tile_op ( ) const
inline

Non-permuting tile operation factory function.

Returns
The tile operation

Definition at line 396 of file mult_engine.h.

◆ make_tile_op() [2/2]

template<typename Left , typename Right , typename Result >
template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
op_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_tile_op ( const Perm &  perm) const
inline

Permuting tile operation factory function.

Parameters
permThe permutation to be applied to the result
Returns
The tile operation

Definition at line 421 of file mult_engine.h.

◆ make_trange() [1/2]

template<typename Left , typename Right , typename Result >
trange_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_trange ( ) const
inline

Non-permuting tiled range factory function.

Returns
The result tiled range object

Definition at line 359 of file mult_engine.h.

Here is the call graph for this function:

◆ make_trange() [2/2]

template<typename Left , typename Right , typename Result >
trange_type TiledArray::expressions::MultEngine< Left, Right, Result >::make_trange ( const Permutation perm) const
inline

Permuting tiled range factory function.

Parameters
permThe permutation to be applied to the array
Returns
The result tiled range object

Definition at line 370 of file mult_engine.h.

Here is the call graph for this function:

◆ perm_indices()

template<typename Left , typename Right , typename Result >
void TiledArray::expressions::MultEngine< Left, Right, Result >::perm_indices ( const BipartiteIndexList target_indices)
inline

Set the index list for this expression.

This function will set the index list for this expression and its children such that the number of permutations is minimized. The final index list may not be set to target, which indicates that the result of this expression will be permuted to match target_indices.

Parameters
target_indicesThe target index list for this expression

Definition at line 258 of file mult_engine.h.

Here is the call graph for this function:

◆ print()

template<typename Left , typename Right , typename Result >
void TiledArray::expressions::MultEngine< Left, Right, Result >::print ( ExprOStream  os,
const BipartiteIndexList target_indices 
) const
inline

Expression print.

Parameters
osThe output stream
target_indicesThe target index list for this expression

Definition at line 459 of file mult_engine.h.

Here is the call graph for this function:

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