TiledArray::expressions::ExprEngine< Derived > Class Template Reference
Inheritance diagram for TiledArray::expressions::ExprEngine< Derived >:
Collaboration diagram for TiledArray::expressions::ExprEngine< Derived >:

Documentation

template<typename Derived>
class TiledArray::expressions::ExprEngine< Derived >

Expression engine.

Definition at line 45 of file expr_engine.h.

Public Types

typedef ExprEngine< Derived > ExprEngine_
 
typedef Derived derived_type
 The derived object type. More...
 
typedef EngineTrait< Derived >::value_type value_type
 Tensor value type. More...
 
typedef EngineTrait< Derived >::op_type op_type
 Tile operation type. More...
 
typedef EngineTrait< Derived >::policy policy
 The result policy type. More...
 
typedef EngineTrait< Derived >::dist_eval_type dist_eval_type
 This expression's distributed evaluator type. More...
 
typedef EngineTrait< Derived >::size_type size_type
 Size type. More...
 
typedef EngineTrait< Derived >::trange_type trange_type
 Tiled range type type. More...
 
typedef EngineTrait< Derived >::shape_type shape_type
 Tensor shape type. More...
 
typedef EngineTrait< Derived >::pmap_interface pmap_interface
 Process map interface type. More...
 

Public Member Functions

template<typename D >
 ExprEngine (const Expr< D > &expr)
 Default constructor. More...
 
void init (World &world, std::shared_ptr< pmap_interface > pmap, const BipartiteIndexList &target_indices)
 Construct and initialize the expression engine. More...
 
void init_struct (const BipartiteIndexList &target_indices)
 Initialize result tensor structure. More...
 
void init_distribution (World *world, const std::shared_ptr< pmap_interface > &pmap)
 Initialize result tensor distribution. More...
 
BipartitePermutation make_perm (const BipartiteIndexList &target_indices) const
 Permutation factory function. More...
 
op_type make_op () const
 Tile operation factory function. More...
 
derived_typederived ()
 Cast this object to its derived type. More...
 
const derived_typederived () const
 Cast this object to its derived type. More...
 
World * world () const
 World accessor. More...
 
const BipartiteIndexListindices () const
 Index list accessor. More...
 
const BipartitePermutationperm () const
 Permutation accessor. More...
 
const trange_typetrange () const
 Tiled range accessor. More...
 
const shape_typeshape () const
 Shape accessor. More...
 
const std::shared_ptr< pmap_interface > & pmap () const
 Process map accessor. More...
 
void permute_tiles (const bool status)
 Set the permute tiles flag. More...
 
void print (ExprOStream &os, const BipartiteIndexList &target_indices) const
 Expression print. More...
 
const char * make_tag () const
 Expression identification tag. More...
 

Protected Attributes

World * world_
 The world where this expression will be evaluated. More...
 
BipartiteIndexList indices_
 
bool permute_tiles_
 
BipartitePermutation perm_
 The permutation that will be applied to the outer tensor of tensors. More...
 
trange_type trange_
 The tiled range of the result tensor. More...
 
shape_type shape_
 The shape of the result tensor. More...
 
std::shared_ptr< pmap_interfacepmap_
 The process map for the result tensor. More...
 
std::shared_ptr< EngineParamOverride< Derived > > override_ptr_
 The engine params overriding the default. More...
 

Member Typedef Documentation

◆ derived_type

template<typename Derived >
typedef Derived TiledArray::expressions::ExprEngine< Derived >::derived_type

The derived object type.

Definition at line 48 of file expr_engine.h.

◆ dist_eval_type

template<typename Derived >
typedef EngineTrait<Derived>::dist_eval_type TiledArray::expressions::ExprEngine< Derived >::dist_eval_type

This expression's distributed evaluator type.

Definition at line 58 of file expr_engine.h.

◆ ExprEngine_

template<typename Derived >
typedef ExprEngine<Derived> TiledArray::expressions::ExprEngine< Derived >::ExprEngine_

Definition at line 47 of file expr_engine.h.

◆ op_type

template<typename Derived >
typedef EngineTrait<Derived>::op_type TiledArray::expressions::ExprEngine< Derived >::op_type

Tile operation type.

Definition at line 54 of file expr_engine.h.

◆ pmap_interface

template<typename Derived >
typedef EngineTrait<Derived>::pmap_interface TiledArray::expressions::ExprEngine< Derived >::pmap_interface

Process map interface type.

Definition at line 67 of file expr_engine.h.

◆ policy

template<typename Derived >
typedef EngineTrait<Derived>::policy TiledArray::expressions::ExprEngine< Derived >::policy

The result policy type.

Definition at line 56 of file expr_engine.h.

◆ shape_type

template<typename Derived >
typedef EngineTrait<Derived>::shape_type TiledArray::expressions::ExprEngine< Derived >::shape_type

Tensor shape type.

Definition at line 65 of file expr_engine.h.

◆ size_type

template<typename Derived >
typedef EngineTrait<Derived>::size_type TiledArray::expressions::ExprEngine< Derived >::size_type

Size type.

Definition at line 61 of file expr_engine.h.

◆ trange_type

template<typename Derived >
typedef EngineTrait<Derived>::trange_type TiledArray::expressions::ExprEngine< Derived >::trange_type

Tiled range type type.

Definition at line 63 of file expr_engine.h.

◆ value_type

template<typename Derived >
typedef EngineTrait<Derived>::value_type TiledArray::expressions::ExprEngine< Derived >::value_type

Tensor value type.

Definition at line 52 of file expr_engine.h.

Constructor & Destructor Documentation

◆ ExprEngine()

template<typename Derived >
template<typename D >
TiledArray::expressions::ExprEngine< Derived >::ExprEngine ( const Expr< D > &  expr)
inline

Default constructor.

All data members are initialized to NULL values.

Definition at line 93 of file expr_engine.h.

Member Function Documentation

◆ derived() [1/2]

template<typename Derived >
derived_type& TiledArray::expressions::ExprEngine< Derived >::derived ( )
inline

Cast this object to its derived type.

Definition at line 209 of file expr_engine.h.

Here is the caller graph for this function:

◆ derived() [2/2]

template<typename Derived >
const derived_type& TiledArray::expressions::ExprEngine< Derived >::derived ( ) const
inline

Cast this object to its derived type.

Definition at line 212 of file expr_engine.h.

◆ indices()

template<typename Derived >
const BipartiteIndexList& TiledArray::expressions::ExprEngine< Derived >::indices ( ) const
inline

Index list accessor.

Returns
A const reference to the index list

Definition at line 224 of file expr_engine.h.

Here is the caller graph for this function:

◆ init()

template<typename Derived >
void TiledArray::expressions::ExprEngine< Derived >::init ( World &  world,
std::shared_ptr< pmap_interface pmap,
const BipartiteIndexList target_indices 
)
inline

Construct and initialize the expression engine.

This function will initialize all expression engines in the expression graph. The init_indices(), init_struct(), and init_distribution() will be called for each node and leaf of the graph in that order.

Parameters
worldThe world where the expression will be evaluated
pmapThe process map for the result tensor (may be NULL)
target_indicesThe target index list of the result tensor

Definition at line 112 of file expr_engine.h.

Here is the call graph for this function:

◆ init_distribution()

template<typename Derived >
void TiledArray::expressions::ExprEngine< Derived >::init_distribution ( World *  world,
const std::shared_ptr< pmap_interface > &  pmap 
)
inline

Initialize result tensor distribution.

This function will initialize the world and process map for the result tensor. Derived classes may customize this function by providing their own implementation it.

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

Definition at line 171 of file expr_engine.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_struct()

template<typename Derived >
void TiledArray::expressions::ExprEngine< Derived >::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. These members are initialized with the make_perm(), make_trange(), and make_shape() functions. Derived classes may customize the structure initialization by providing their own implementation of this function or any of the above initialization. functions.

Parameters
target_indicesThe target index list for the result tensor

Definition at line 150 of file expr_engine.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_op()

template<typename Derived >
op_type TiledArray::expressions::ExprEngine< Derived >::make_op ( ) const
inline

Tile operation factory function.

This function will generate the tile operations by calling make_tile_op(). The permuting or non-permuting version of the tile operation will be selected based on permute_tiles(). Derived classes may customize this function by providing their own implementation it.

Definition at line 199 of file expr_engine.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_perm()

template<typename Derived >
BipartitePermutation TiledArray::expressions::ExprEngine< Derived >::make_perm ( const BipartiteIndexList target_indices) const
inline

Permutation factory function.

This function will generate the permutation that will be applied to the result tensor. Derived classes may customize this function by providing their own implementation it.

Definition at line 188 of file expr_engine.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_tag()

template<typename Derived >
const char* TiledArray::expressions::ExprEngine< Derived >::make_tag ( ) const
inline

Expression identification tag.

Returns
An expression tag used to identify this expression

Definition at line 269 of file expr_engine.h.

◆ perm()

template<typename Derived >
const BipartitePermutation& TiledArray::expressions::ExprEngine< Derived >::perm ( ) const
inline

Permutation accessor.

Returns
A const reference to the permutation

Definition at line 229 of file expr_engine.h.

Here is the caller graph for this function:

◆ permute_tiles()

template<typename Derived >
void TiledArray::expressions::ExprEngine< Derived >::permute_tiles ( const bool  status)
inline

Set the permute tiles flag.

Parameters
statusThe new status for permute tiles (true == permute result tiles)

Definition at line 250 of file expr_engine.h.

◆ pmap()

template<typename Derived >
const std::shared_ptr<pmap_interface>& TiledArray::expressions::ExprEngine< Derived >::pmap ( ) const
inline

Process map accessor.

Returns
A const reference to the process map

Definition at line 244 of file expr_engine.h.

Here is the caller graph for this function:

◆ print()

template<typename Derived >
void TiledArray::expressions::ExprEngine< Derived >::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 256 of file expr_engine.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shape()

template<typename Derived >
const shape_type& TiledArray::expressions::ExprEngine< Derived >::shape ( ) const
inline

Shape accessor.

Returns
A const reference to the tiled range

Definition at line 239 of file expr_engine.h.

◆ trange()

template<typename Derived >
const trange_type& TiledArray::expressions::ExprEngine< Derived >::trange ( ) const
inline

Tiled range accessor.

Returns
A const reference to the tiled range

Definition at line 234 of file expr_engine.h.

Here is the caller graph for this function:

◆ world()

template<typename Derived >
World* TiledArray::expressions::ExprEngine< Derived >::world ( ) const
inline

World accessor.

Returns
A pointer to world

Definition at line 219 of file expr_engine.h.

Here is the caller graph for this function:

Member Data Documentation

◆ indices_

template<typename Derived >
BipartiteIndexList TiledArray::expressions::ExprEngine< Derived >::indices_
protected

The index list of this expression; bipartite due to need to support recursive tensors (i.e. Tensor-of-Tensor)

Definition at line 75 of file expr_engine.h.

◆ override_ptr_

template<typename Derived >
std::shared_ptr<EngineParamOverride<Derived> > TiledArray::expressions::ExprEngine< Derived >::override_ptr_
protected

The engine params overriding the default.

Definition at line 86 of file expr_engine.h.

◆ perm_

template<typename Derived >
BipartitePermutation TiledArray::expressions::ExprEngine< Derived >::perm_
protected

The permutation that will be applied to the outer tensor of tensors.

Definition at line 80 of file expr_engine.h.

◆ permute_tiles_

template<typename Derived >
bool TiledArray::expressions::ExprEngine< Derived >::permute_tiles_
protected

Result tile permutation flag (true == permute tile)

Definition at line 77 of file expr_engine.h.

◆ pmap_

template<typename Derived >
std::shared_ptr<pmap_interface> TiledArray::expressions::ExprEngine< Derived >::pmap_
protected

The process map for the result tensor.

Definition at line 84 of file expr_engine.h.

◆ shape_

template<typename Derived >
shape_type TiledArray::expressions::ExprEngine< Derived >::shape_
protected

The shape of the result tensor.

Definition at line 82 of file expr_engine.h.

◆ trange_

template<typename Derived >
trange_type TiledArray::expressions::ExprEngine< Derived >::trange_
protected

The tiled range of the result tensor.

Definition at line 81 of file expr_engine.h.

◆ world_

template<typename Derived >
World* TiledArray::expressions::ExprEngine< Derived >::world_
protected

The world where this expression will be evaluated.

Definition at line 73 of file expr_engine.h.


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