TiledArray  0.7.0
TiledArray::detail::DistEval< Tile, Policy > Class Template Reference

Tensor expression object. More...

#include <dist_eval.h>

Public Types

typedef DistEval< Tile, Policy > DistEval_
 This class type. More...
 
typedef DistEvalImpl< Tile, Policy > impl_type
 Implementation base class type. More...
 
typedef impl_type::size_type size_type
 Size type. More...
 
typedef impl_type::trange_type trange_type
 Tiled range type for this object. More...
 
typedef impl_type::range_type range_type
 Range type this tensor. More...
 
typedef impl_type::shape_type shape_type
 Tensor shape type. More...
 
typedef impl_type::pmap_interface pmap_interface
 Process map interface type. More...
 
typedef impl_type::value_type value_type
 Tile type. More...
 
typedef impl_type::eval_type eval_type
 Tile evaluation type. More...
 
typedef Future< value_typefuture
 Future of tile type. More...
 

Public Member Functions

template<typename Impl >
 DistEval (const std::shared_ptr< Impl > &pimpl)
 Constructor. More...
 
 DistEval (const DistEval_ &other)
 Copy constructor. More...
 
DistEval_operator= (const DistEval_ &other)
 Assignment operator. More...
 
void eval ()
 Evaluate this tensor object with the given result variable list. More...
 
const range_typerange () const
 Tensor tile size array accessor. More...
 
size_type size () const
 Tensor tile volume accessor. More...
 
ProcessID owner (size_type i) const
 Query a tile owner. More...
 
bool is_local (size_type i) const
 Query for a locally owned tile. More...
 
bool is_zero (size_type i) const
 Query for a zero tile. More...
 
const std::shared_ptr< pmap_interface > & pmap () const
 Tensor process map accessor. 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...
 
future get (size_type i) const
 Tile move. More...
 
virtual void discard (size_type i) const
 Discard a tile that is not needed. More...
 
World & world () const
 World object accessor. More...
 
madness::uniqueidT id () const
 Unique object id. More...
 
void wait () const
 Wait for all local tiles to be evaluated. More...
 

Detailed Description

template<typename Tile, typename Policy>
class TiledArray::detail::DistEval< Tile, Policy >

Tensor expression object.

This object holds a tensor expression. It is used to store various type of tensor expressions that depend on the pimpl used to construct the expression.

Template Parameters
TileThe output tile type
PolicyThe tensor policy class

Definition at line 241 of file dist_eval.h.

Member Typedef Documentation

◆ DistEval_

template<typename Tile , typename Policy >
typedef DistEval<Tile, Policy> TiledArray::detail::DistEval< Tile, Policy >::DistEval_

This class type.

Definition at line 243 of file dist_eval.h.

◆ eval_type

template<typename Tile , typename Policy >
typedef impl_type::eval_type TiledArray::detail::DistEval< Tile, Policy >::eval_type

Tile evaluation type.

Definition at line 251 of file dist_eval.h.

◆ future

template<typename Tile , typename Policy >
typedef Future<value_type> TiledArray::detail::DistEval< Tile, Policy >::future

Future of tile type.

Definition at line 252 of file dist_eval.h.

◆ impl_type

template<typename Tile , typename Policy >
typedef DistEvalImpl<Tile, Policy> TiledArray::detail::DistEval< Tile, Policy >::impl_type

Implementation base class type.

Definition at line 244 of file dist_eval.h.

◆ pmap_interface

template<typename Tile , typename Policy >
typedef impl_type::pmap_interface TiledArray::detail::DistEval< Tile, Policy >::pmap_interface

Process map interface type.

Definition at line 249 of file dist_eval.h.

◆ range_type

template<typename Tile , typename Policy >
typedef impl_type::range_type TiledArray::detail::DistEval< Tile, Policy >::range_type

Range type this tensor.

Definition at line 247 of file dist_eval.h.

◆ shape_type

template<typename Tile , typename Policy >
typedef impl_type::shape_type TiledArray::detail::DistEval< Tile, Policy >::shape_type

Tensor shape type.

Definition at line 248 of file dist_eval.h.

◆ size_type

template<typename Tile , typename Policy >
typedef impl_type::size_type TiledArray::detail::DistEval< Tile, Policy >::size_type

Size type.

Definition at line 245 of file dist_eval.h.

◆ trange_type

template<typename Tile , typename Policy >
typedef impl_type::trange_type TiledArray::detail::DistEval< Tile, Policy >::trange_type

Tiled range type for this object.

Definition at line 246 of file dist_eval.h.

◆ value_type

template<typename Tile , typename Policy >
typedef impl_type::value_type TiledArray::detail::DistEval< Tile, Policy >::value_type

Tile type.

Definition at line 250 of file dist_eval.h.

Constructor & Destructor Documentation

◆ DistEval() [1/2]

template<typename Tile , typename Policy >
template<typename Impl >
TiledArray::detail::DistEval< Tile, Policy >::DistEval ( const std::shared_ptr< Impl > &  pimpl)
inline

Constructor.

Parameters
pimplA pointer to the expression implementation object

Definition at line 262 of file dist_eval.h.

◆ DistEval() [2/2]

template<typename Tile , typename Policy >
TiledArray::detail::DistEval< Tile, Policy >::DistEval ( const DistEval_ other)
inline

Copy constructor.

Create a shallow copy of other .

Parameters
otherThe object to be copied.

Definition at line 272 of file dist_eval.h.

Member Function Documentation

◆ discard()

template<typename Tile , typename Policy >
virtual void TiledArray::detail::DistEval< Tile, Policy >::discard ( size_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

Definition at line 351 of file dist_eval.h.

◆ eval()

template<typename Tile , typename Policy >
void TiledArray::detail::DistEval< Tile, Policy >::eval ( )
inline

Evaluate this tensor object with the given result variable list.

v is the dimension ordering that the parent expression expects. The returned future will be evaluated once the tensor has been evaluated.

Definition at line 288 of file dist_eval.h.

◆ get()

template<typename Tile , typename Policy >
future TiledArray::detail::DistEval< Tile, Policy >::get ( size_type  i) const
inline

Tile move.

Tile is removed after it is set.

Parameters
iThe tile index
Returns
Tile i

Definition at line 344 of file dist_eval.h.

◆ id()

template<typename Tile , typename Policy >
madness::uniqueidT TiledArray::detail::DistEval< Tile, Policy >::id ( ) const
inline

Unique object id.

Returns
The unique id for this object

Definition at line 361 of file dist_eval.h.

◆ is_dense()

template<typename Tile , typename Policy >
bool TiledArray::detail::DistEval< Tile, Policy >::is_dense ( ) const
inline

Query the density of the tensor.

Returns
true if the tensor is dense, otherwise false

Definition at line 327 of file dist_eval.h.

◆ is_local()

template<typename Tile , typename Policy >
bool TiledArray::detail::DistEval< Tile, Policy >::is_local ( size_type  i) const
inline

Query for a locally owned tile.

Parameters
iThe tile index to query
Returns
true if the tile is owned by this node, otherwise false

Definition at line 311 of file dist_eval.h.

◆ is_zero()

template<typename Tile , typename Policy >
bool TiledArray::detail::DistEval< Tile, Policy >::is_zero ( size_type  i) const
inline

Query for a zero tile.

Parameters
iThe tile index to query
Returns
true if the tile is zero, otherwise false

Definition at line 317 of file dist_eval.h.

◆ operator=()

template<typename Tile , typename Policy >
DistEval_& TiledArray::detail::DistEval< Tile, Policy >::operator= ( const DistEval_ other)
inline

Assignment operator.

Create a shallow copy of other

Parameters
otherThe object to be copied
Returns
A reference to this object

Definition at line 279 of file dist_eval.h.

◆ owner()

template<typename Tile , typename Policy >
ProcessID TiledArray::detail::DistEval< Tile, Policy >::owner ( size_type  i) const
inline

Query a tile owner.

Parameters
iThe tile index to query
Returns
The process ID of the node that owns tile i

Definition at line 305 of file dist_eval.h.

◆ pmap()

template<typename Tile , typename Policy >
const std::shared_ptr<pmap_interface>& TiledArray::detail::DistEval< Tile, Policy >::pmap ( ) const
inline

Tensor process map accessor.

Returns
A shared pointer to the process map of this tensor

Definition at line 322 of file dist_eval.h.

◆ range()

template<typename Tile , typename Policy >
const range_type& TiledArray::detail::DistEval< Tile, Policy >::range ( ) const
inline

Tensor tile size array accessor.

Returns
The size array of the tensor tiles

Definition at line 294 of file dist_eval.h.

◆ shape()

template<typename Tile , typename Policy >
const shape_type& TiledArray::detail::DistEval< Tile, Policy >::shape ( ) const
inline

Tensor shape accessor.

Returns
A reference to the tensor shape map

Definition at line 332 of file dist_eval.h.

◆ size()

template<typename Tile , typename Policy >
size_type TiledArray::detail::DistEval< Tile, Policy >::size ( ) const
inline

Tensor tile volume accessor.

Returns
The number of tiles in the tensor

Definition at line 299 of file dist_eval.h.

◆ trange()

template<typename Tile , typename Policy >
const trange_type& TiledArray::detail::DistEval< Tile, Policy >::trange ( ) const
inline

Tiled range accessor.

Returns
The tiled range of the tensor

Definition at line 337 of file dist_eval.h.

◆ wait()

template<typename Tile , typename Policy >
void TiledArray::detail::DistEval< Tile, Policy >::wait ( ) const
inline

Wait for all local tiles to be evaluated.

Definition at line 364 of file dist_eval.h.

◆ world()

template<typename Tile , typename Policy >
World& TiledArray::detail::DistEval< Tile, Policy >::world ( ) const
inline

World object accessor.

Returns
A reference to the world object

Definition at line 356 of file dist_eval.h.


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