TiledArray::detail::LazyArrayTile< Tile, Op > Class Template Reference

Documentation

template<typename Tile, typename Op>
class TiledArray::detail::LazyArrayTile< Tile, Op >

Lazy tile for on-the-fly evaluation of array tiles.

This tile object is used to hold input array tiles and do on-the-fly evaluation, type conversion, and/or permutations.

Template Parameters
TileArray tile type
OpThe operation type

Definition at line 42 of file array_eval.h.

Public Types

typedef LazyArrayTile< Tile, Op > LazyArrayTile_
 This class type. More...
 
typedef Op op_type
 The operation that will modify this tile. More...
 
typedef op_type::result_type eval_type
 
typedef Tile tile_type
 The input tile type. More...
 
using conversion_result_type = decltype(((!Op::is_consumable) &&consume_ ? op_->consume(tile_) :(*op_)(tile_)))
 conversion_type More...
 

Public Member Functions

 LazyArrayTile ()
 Default constructor. More...
 
 LazyArrayTile (const LazyArrayTile_ &other)
 Copy constructor. More...
 
 LazyArrayTile (const tile_type &tile, const std::shared_ptr< op_type > &op, const bool consume)
 Construct from tile and operation. More...
 
LazyArrayTile_operator= (const LazyArrayTile_ &other)
 Assignment operator. More...
 
bool is_consumable () const
 Query runtime consumable status. More...
 
 operator conversion_result_type () const
 Convert tile to evaluation type using the op object. More...
 
const tile_typetile () const
 return ref to input tile More...
 
template<typename Archive >
void serialize (const Archive &)
 Serialization (not implemented) More...
 

Member Typedef Documentation

◆ conversion_result_type

template<typename Tile , typename Op >
using TiledArray::detail::LazyArrayTile< Tile, Op >::conversion_result_type = decltype( ((!Op::is_consumable) && consume_ ? op_->consume(tile_) : (*op_)(tile_)))

conversion_type

Definition at line 58 of file array_eval.h.

◆ eval_type

template<typename Tile , typename Op >
typedef op_type::result_type TiledArray::detail::LazyArrayTile< Tile, Op >::eval_type

Definition at line 46 of file array_eval.h.

◆ LazyArrayTile_

template<typename Tile , typename Op >
typedef LazyArrayTile<Tile, Op> TiledArray::detail::LazyArrayTile< Tile, Op >::LazyArrayTile_

This class type.

Definition at line 44 of file array_eval.h.

◆ op_type

template<typename Tile , typename Op >
typedef Op TiledArray::detail::LazyArrayTile< Tile, Op >::op_type

The operation that will modify this tile.

Definition at line 45 of file array_eval.h.

◆ tile_type

template<typename Tile , typename Op >
typedef Tile TiledArray::detail::LazyArrayTile< Tile, Op >::tile_type

The input tile type.

Definition at line 47 of file array_eval.h.

Constructor & Destructor Documentation

◆ LazyArrayTile() [1/3]

template<typename Tile , typename Op >
TiledArray::detail::LazyArrayTile< Tile, Op >::LazyArrayTile ( )
inline

Default constructor.

Definition at line 68 of file array_eval.h.

◆ LazyArrayTile() [2/3]

template<typename Tile , typename Op >
TiledArray::detail::LazyArrayTile< Tile, Op >::LazyArrayTile ( const LazyArrayTile_ other)
inline

Copy constructor.

Parameters
otherThe LazyArrayTile object to be copied

Definition at line 82 of file array_eval.h.

◆ LazyArrayTile() [3/3]

template<typename Tile , typename Op >
TiledArray::detail::LazyArrayTile< Tile, Op >::LazyArrayTile ( const tile_type tile,
const std::shared_ptr< op_type > &  op,
const bool  consume 
)
inline

Construct from tile and operation.

Parameters
tileThe input tile that will be modified
opThe operation to be applied to the input tile
consumeIf true, the input tile may be consumed by op

Definition at line 98 of file array_eval.h.

Member Function Documentation

◆ is_consumable()

template<typename Tile , typename Op >
bool TiledArray::detail::LazyArrayTile< Tile, Op >::is_consumable ( ) const
inline

Query runtime consumable status.

Returns
true if this tile is consumable, otherwise false .

Definition at line 126 of file array_eval.h.

◆ operator conversion_result_type()

template<typename Tile , typename Op >
TiledArray::detail::LazyArrayTile< Tile, Op >::operator conversion_result_type ( ) const
inlineexplicit

Convert tile to evaluation type using the op object.

Definition at line 139 of file array_eval.h.

◆ operator=()

template<typename Tile , typename Op >
LazyArrayTile_& TiledArray::detail::LazyArrayTile< Tile, Op >::operator= ( const LazyArrayTile_ other)
inline

Assignment operator.

Parameters
otherThe object to be copied

Definition at line 113 of file array_eval.h.

◆ serialize()

template<typename Tile , typename Op >
template<typename Archive >
void TiledArray::detail::LazyArrayTile< Tile, Op >::serialize ( const Archive &  )
inline

Serialization (not implemented)

Template Parameters
ArchiveThe archive type

Definition at line 152 of file array_eval.h.

◆ tile()

template<typename Tile , typename Op >
const tile_type& TiledArray::detail::LazyArrayTile< Tile, Op >::tile ( ) const
inline

return ref to input tile

Definition at line 146 of file array_eval.h.


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