TiledArray::detail::Summa< Left, Right, Op, Policy > Class Template Reference
Inheritance diagram for TiledArray::detail::Summa< Left, Right, Op, Policy >:
Collaboration diagram for TiledArray::detail::Summa< Left, Right, Op, Policy >:

Documentation

template<typename Left, typename Right, typename Op, typename Policy>
class TiledArray::detail::Summa< Left, Right, Op, Policy >

Distributed contraction evaluator implementation.

Template Parameters
LeftThe left-hand argument evaluator type
RightThe right-hand argument evaluator type
OpThe contraction/reduction operation type
PolicyThe tensor policy class
Note
The algorithms in this class assume that the arguments have a two- dimensional cyclic distribution, and that the row phase of the left-hand argument and the column phase of the right-hand argument are equal to the number of rows and columns, respectively, in the ProcGrid object passed to the constructor.

Definition at line 55 of file contraction_eval.h.

Public Types

typedef Summa< Left, Right, Op, Policy > Summa_
 This object type. More...
 
typedef DistEvalImpl< typename Op::result_type, Policy > DistEvalImpl_
 The base class type. More...
 
typedef DistEvalImpl_::TensorImpl_ TensorImpl_
 The base, base class type. More...
 
typedef Left left_type
 The left-hand argument type. More...
 
typedef Right right_type
 The right-hand argument type. More...
 
typedef DistEvalImpl_::ordinal_type ordinal_type
 Ordinal type. More...
 
typedef DistEvalImpl_::range_type range_type
 Range type. More...
 
typedef DistEvalImpl_::shape_type shape_type
 Shape type. More...
 
typedef DistEvalImpl_::pmap_interface pmap_interface
 Process map interface type. More...
 
typedef DistEvalImpl_::trange_type trange_type
 Tiled range type. More...
 
typedef DistEvalImpl_::value_type value_type
 Tile type. More...
 
typedef DistEvalImpl_::eval_type eval_type
 Tile evaluation type. More...
 
typedef Op op_type
 Tile evaluation operator type. More...
 
- Public Types inherited from TiledArray::detail::DistEvalImpl< Op::result_type, Policy >
typedef DistEvalImpl< Op::result_type, Policy > DistEvalImpl_
 This object type. More...
 
typedef TiledArray::detail::TensorImpl< Policy > TensorImpl_
 Tensor implementation base class. More...
 
typedef TensorImpl_::ordinal_type ordinal_type
 Ordinal type. More...
 
typedef TensorImpl_::trange_type trange_type
 Tiled range type for this object. More...
 
typedef TensorImpl_::range_type range_type
 Range type this tensor. More...
 
typedef TensorImpl_::shape_type shape_type
 Shape type. More...
 
typedef TensorImpl_::pmap_interface pmap_interface
 process map interface type More...
 
typedef Op::result_type value_type
 Tile type. More...
 
typedef eval_trait< value_type >::type eval_type
 Tile evaluation type. More...
 
- Public Types inherited from TiledArray::detail::TensorImpl< Policy >
typedef TensorImpl< Policy > TensorImpl_
 
typedef Policy policy_type
 Policy type. More...
 
typedef Policy::trange_type trange_type
 Tiled range type. More...
 
typedef Policy::range_type range_type
 Element/tile range type. More...
 
typedef Policy::index1_type index1_type
 1-index type More...
 
typedef Policy::ordinal_type ordinal_type
 Ordinal type. More...
 
typedef Policy::shape_type shape_type
 Tensor shape type. More...
 
typedef Policy::pmap_interface pmap_interface
 Process map interface type. More...
 

Public Member Functions

template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
 Summa (const left_type &left, const right_type &right, World &world, const trange_type trange, const shape_type &shape, const std::shared_ptr< pmap_interface > &pmap, const Perm &perm, const op_type &op, const ordinal_type k, const ProcGrid &proc_grid)
 Constructor. More...
 
virtual ~Summa ()
 
virtual Future< value_typeget_tile (ordinal_type i) const
 Get tile at index i. More...
 
virtual void discard_tile (ordinal_type i) const
 Discard a tile that is not needed. More...
 
- Public Member Functions inherited from TiledArray::detail::DistEvalImpl< Op::result_type, Policy >
 DistEvalImpl (World &world, const trange_type &trange, const shape_type &shape, const std::shared_ptr< pmap_interface > &pmap, const Permutation &perm)
 Constructor. More...
 
virtual ~DistEvalImpl ()
 
const madness::uniqueidT & id () const
 Unique object id accessor. More...
 
void set_tile (ordinal_type i, const value_type &value)
 Set tensor value. More...
 
void set_tile (ordinal_type i, Future< value_type > f)
 Set tensor value with a future. More...
 
virtual void notify ()
 Tile set notification. More...
 
void wait () const
 Wait for all tiles to be assigned. More...
 
void eval ()
 Evaluate this tensor expression object. More...
 
- Public Member Functions inherited from TiledArray::detail::TensorImpl< Policy >
 TensorImpl (World &world, const trange_type &trange, const shape_type &shape, const std::shared_ptr< pmap_interface > &pmap)
 Constructor. More...
 
virtual ~TensorImpl ()
 Virtual destructor. More...
 
const std::shared_ptr< pmap_interface > & pmap () const
 Tensor process map accessor. More...
 
const range_typetiles_range () const
 Tiles range accessor. More...
 
ordinal_type size () const
 Tensor tile volume accessor. More...
 
ordinal_type local_size () const
 Local element count. More...
 
template<typename Index >
ProcessID owner (const Index &i) const
 Query a tile owner. More...
 
template<typename Index >
bool is_local (const Index &i) const
 Query for a locally owned tile. More...
 
template<typename Index >
bool is_zero (const Index &i) const
 Query for a zero tile. More...
 
bool is_dense () const
 Query the density of the tensor. More...
 
const shape_typeshape () const
 Tensor shape accessor. More...
 
const trange_typetrange () const
 Tiled range accessor. More...
 
World & get_world () const
 
World & world () const
 World accessor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TiledArray::detail::DistEvalImpl< Op::result_type, Policy >
ordinal_type perm_index_to_target (ordinal_type index) const
 Permute index from a source index to a target index. More...
 
ordinal_type perm_index_to_source (ordinal_type index) const
 Permute index from a target index to a source index. More...
 

Member Typedef Documentation

◆ DistEvalImpl_

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl<typename Op::result_type, Policy> TiledArray::detail::Summa< Left, Right, Op, Policy >::DistEvalImpl_

The base class type.

Definition at line 61 of file contraction_eval.h.

◆ eval_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::eval_type TiledArray::detail::Summa< Left, Right, Op, Policy >::eval_type

Tile evaluation type.

Definition at line 75 of file contraction_eval.h.

◆ left_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef Left TiledArray::detail::Summa< Left, Right, Op, Policy >::left_type

The left-hand argument type.

Definition at line 64 of file contraction_eval.h.

◆ op_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef Op TiledArray::detail::Summa< Left, Right, Op, Policy >::op_type

Tile evaluation operator type.

Definition at line 76 of file contraction_eval.h.

◆ ordinal_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::ordinal_type TiledArray::detail::Summa< Left, Right, Op, Policy >::ordinal_type

Ordinal type.

Definition at line 66 of file contraction_eval.h.

◆ pmap_interface

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::pmap_interface TiledArray::detail::Summa< Left, Right, Op, Policy >::pmap_interface

Process map interface type.

Definition at line 70 of file contraction_eval.h.

◆ range_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::range_type TiledArray::detail::Summa< Left, Right, Op, Policy >::range_type

Range type.

Definition at line 67 of file contraction_eval.h.

◆ right_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef Right TiledArray::detail::Summa< Left, Right, Op, Policy >::right_type

The right-hand argument type.

Definition at line 65 of file contraction_eval.h.

◆ shape_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::shape_type TiledArray::detail::Summa< Left, Right, Op, Policy >::shape_type

Shape type.

Definition at line 68 of file contraction_eval.h.

◆ Summa_

template<typename Left , typename Right , typename Op , typename Policy >
typedef Summa<Left, Right, Op, Policy> TiledArray::detail::Summa< Left, Right, Op, Policy >::Summa_

This object type.

Definition at line 59 of file contraction_eval.h.

◆ TensorImpl_

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::TensorImpl_ TiledArray::detail::Summa< Left, Right, Op, Policy >::TensorImpl_

The base, base class type.

Definition at line 63 of file contraction_eval.h.

◆ trange_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::trange_type TiledArray::detail::Summa< Left, Right, Op, Policy >::trange_type

Tiled range type.

Definition at line 72 of file contraction_eval.h.

◆ value_type

template<typename Left , typename Right , typename Op , typename Policy >
typedef DistEvalImpl_::value_type TiledArray::detail::Summa< Left, Right, Op, Policy >::value_type

Tile type.

Definition at line 73 of file contraction_eval.h.

Constructor & Destructor Documentation

◆ Summa()

template<typename Left , typename Right , typename Op , typename Policy >
template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
TiledArray::detail::Summa< Left, Right, Op, Policy >::Summa ( const left_type left,
const right_type right,
World &  world,
const trange_type  trange,
const shape_type shape,
const std::shared_ptr< pmap_interface > &  pmap,
const Perm &  perm,
const op_type op,
const ordinal_type  k,
const ProcGrid proc_grid 
)
inline

Constructor.

Parameters
leftThe left-hand argument evaluator
rightThe right-hand argument evaluator
worldThe world where the result lives
trangeThe tiled range object for the result
shapeThe tensor shape object for the result
pmapThe tile-process map for the result
permThe permutation that is applied to result tile indices
opThe tile transform operation
kThe number of tiles in the inner dimension
proc_gridThe process grid that defines the layout of the tiles during the contraction evaluation
Note
The trange, shape, and pmap refer to the final, permuted, state for the result, NOT to the result during the SUMMA evaluation.

Definition at line 1524 of file contraction_eval.h.

◆ ~Summa()

template<typename Left , typename Right , typename Op , typename Policy >
virtual TiledArray::detail::Summa< Left, Right, Op, Policy >::~Summa ( )
inlinevirtual

Definition at line 1544 of file contraction_eval.h.

Member Function Documentation

◆ discard_tile()

template<typename Left , typename Right , typename Op , typename Policy >
virtual void TiledArray::detail::Summa< Left, Right, Op, Policy >::discard_tile ( ordinal_type  i) const
inlinevirtual

Discard a tile that is not needed.

This function handles the cleanup for tiles that are not needed in subsequent computation.

Parameters
iThe index of the tile

Implements TiledArray::detail::DistEvalImpl< Op::result_type, Policy >.

Definition at line 1576 of file contraction_eval.h.

◆ get_tile()

template<typename Left , typename Right , typename Op , typename Policy >
virtual Future<value_type> TiledArray::detail::Summa< Left, Right, Op, Policy >::get_tile ( ordinal_type  i) const
inlinevirtual

Get tile at index i.

Parameters
iThe index of the tile
Returns
A Future to the tile at index i
Exceptions
TiledArray::ExceptionWhen tile i is owned by a remote node.
TiledArray::ExceptionWhen tile i a zero tile.

Implements TiledArray::detail::DistEvalImpl< Op::result_type, Policy >.

Definition at line 1552 of file contraction_eval.h.

Here is the call graph for this function:

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