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

Tensor implementation and base for other tensor implementation objects. More...

#include <array_impl.h>

Inheritance diagram for TiledArray::detail::ArrayImpl< Tile, Policy >:
Collaboration diagram for TiledArray::detail::ArrayImpl< Tile, Policy >:

Public Types

typedef ArrayImpl< Tile, Policy > ArrayImpl_
 This object type. More...
 
typedef TensorImpl< Policy > TensorImpl_
 The base class of this object. More...
 
typedef TensorImpl_::size_type size_type
 Size type. More...
 
typedef TensorImpl_::policy_type policy_type
 Policy type for this object. More...
 
typedef TensorImpl_::trange_type trange_type
 Tiled range type for this object. More...
 
typedef TensorImpl_::range_type range_type
 Elements/tiles range type. More...
 
typedef TensorImpl_::shape_type shape_type
 Shape type. More...
 
typedef TensorImpl_::pmap_interface pmap_interface
 process map interface type More...
 
typedef Tile value_type
 Tile or data type. More...
 
typedef eval_trait< Tile >::type eval_type
 The tile evaluation type. More...
 
typedef numeric_type< value_type >::type numeric_type
 the numeric type that supports Tile More...
 
typedef DistributedStorage< value_typestorage_type
 The data container type. More...
 
typedef storage_type::future future
 Future tile type. More...
 
typedef TileReference< ArrayImpl_reference
 Tile reference type. More...
 
typedef TileConstReference< ArrayImpl_const_reference
 Tile constant reference type. More...
 
typedef ArrayIterator< ArrayImpl_, referenceiterator
 Iterator type. More...
 
typedef ArrayIterator< const ArrayImpl_, const_referenceconst_iterator
 Constant iterator 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::size_type size_type
 Size 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

 ArrayImpl (World &world, const trange_type &trange, const shape_type &shape, const std::shared_ptr< pmap_interface > &pmap)
 Constructor. More...
 
virtual ~ArrayImpl ()
 Virtual destructor. More...
 
template<typename Index >
future get (const Index &i) const
 Tile future accessor. More...
 
template<typename Integer >
future get (const std::initializer_list< Integer > &i) const
 Tile future accessor. More...
 
template<typename Index , typename Value >
void set (const Index &i, const Value &value)
 Set tile. More...
 
iterator begin ()
 Array begin iterator. More...
 
const_iterator cbegin () const
 Array begin iterator. More...
 
iterator end ()
 Array end iterator. More...
 
const_iterator cend () const
 Array end iterator. More...
 
const madness::uniqueidT & id () const
 Unique object id accessor. 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...
 
size_type size () const
 Tensor tile volume accessor. More...
 
size_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...
 
DEPRECATED World & get_world () const
 
World & world () const
 World accessor. More...
 

Detailed Description

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

Tensor implementation and base for other tensor implementation objects.

This implementation object holds the data for tensor object, which includes tiled range, shape, and tiles. The tiles are held in a distributed container, stored according to a given process map.

Template Parameters
TileThe tile or value_type of this tensor
Note
The process map must be set before data elements can be set.
It is the users responsibility to ensure the process maps on all nodes are identical.

Definition at line 423 of file array_impl.h.

Member Typedef Documentation

◆ ArrayImpl_

template<typename Tile , typename Policy >
typedef ArrayImpl<Tile, Policy> TiledArray::detail::ArrayImpl< Tile, Policy >::ArrayImpl_

This object type.

Definition at line 425 of file array_impl.h.

◆ const_iterator

template<typename Tile , typename Policy >
typedef ArrayIterator<const ArrayImpl_, const_reference> TiledArray::detail::ArrayImpl< Tile, Policy >::const_iterator

Constant iterator type.

Definition at line 442 of file array_impl.h.

◆ const_reference

template<typename Tile , typename Policy >
typedef TileConstReference<ArrayImpl_> TiledArray::detail::ArrayImpl< Tile, Policy >::const_reference

Tile constant reference type.

Definition at line 440 of file array_impl.h.

◆ eval_type

template<typename Tile , typename Policy >
typedef eval_trait<Tile>::type TiledArray::detail::ArrayImpl< Tile, Policy >::eval_type

The tile evaluation type.

Definition at line 434 of file array_impl.h.

◆ future

template<typename Tile , typename Policy >
typedef storage_type::future TiledArray::detail::ArrayImpl< Tile, Policy >::future

Future tile type.

Definition at line 438 of file array_impl.h.

◆ iterator

template<typename Tile , typename Policy >
typedef ArrayIterator<ArrayImpl_, reference> TiledArray::detail::ArrayImpl< Tile, Policy >::iterator

Iterator type.

Definition at line 441 of file array_impl.h.

◆ numeric_type

template<typename Tile , typename Policy >
typedef numeric_type<value_type>::type TiledArray::detail::ArrayImpl< Tile, Policy >::numeric_type

the numeric type that supports Tile

Definition at line 436 of file array_impl.h.

◆ pmap_interface

template<typename Tile , typename Policy >
typedef TensorImpl_::pmap_interface TiledArray::detail::ArrayImpl< Tile, Policy >::pmap_interface

process map interface type

Definition at line 432 of file array_impl.h.

◆ policy_type

template<typename Tile , typename Policy >
typedef TensorImpl_::policy_type TiledArray::detail::ArrayImpl< Tile, Policy >::policy_type

Policy type for this object.

Definition at line 428 of file array_impl.h.

◆ range_type

template<typename Tile , typename Policy >
typedef TensorImpl_::range_type TiledArray::detail::ArrayImpl< Tile, Policy >::range_type

Elements/tiles range type.

Definition at line 430 of file array_impl.h.

◆ reference

template<typename Tile , typename Policy >
typedef TileReference<ArrayImpl_> TiledArray::detail::ArrayImpl< Tile, Policy >::reference

Tile reference type.

Definition at line 439 of file array_impl.h.

◆ shape_type

template<typename Tile , typename Policy >
typedef TensorImpl_::shape_type TiledArray::detail::ArrayImpl< Tile, Policy >::shape_type

Shape type.

Definition at line 431 of file array_impl.h.

◆ size_type

template<typename Tile , typename Policy >
typedef TensorImpl_::size_type TiledArray::detail::ArrayImpl< Tile, Policy >::size_type

Size type.

Definition at line 427 of file array_impl.h.

◆ storage_type

template<typename Tile , typename Policy >
typedef DistributedStorage<value_type> TiledArray::detail::ArrayImpl< Tile, Policy >::storage_type

The data container type.

Definition at line 437 of file array_impl.h.

◆ TensorImpl_

template<typename Tile , typename Policy >
typedef TensorImpl<Policy> TiledArray::detail::ArrayImpl< Tile, Policy >::TensorImpl_

The base class of this object.

Definition at line 426 of file array_impl.h.

◆ trange_type

template<typename Tile , typename Policy >
typedef TensorImpl_::trange_type TiledArray::detail::ArrayImpl< Tile, Policy >::trange_type

Tiled range type for this object.

Definition at line 429 of file array_impl.h.

◆ value_type

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

Tile or data type.

Definition at line 433 of file array_impl.h.

Constructor & Destructor Documentation

◆ ArrayImpl()

template<typename Tile , typename Policy >
TiledArray::detail::ArrayImpl< Tile, Policy >::ArrayImpl ( World &  world,
const trange_type trange,
const shape_type shape,
const std::shared_ptr< pmap_interface > &  pmap 
)
inline

Constructor.

The size of shape must be equal to the volume of the tiled range tiles.

Parameters
worldThe world where this tensor will live
trangeThe tiled range for this tensor
shapeThe shape of this tensor
pmapThe tile-process map
Exceptions
TiledArray::ExceptionWhen the size of shape is not equal to zero

Definition at line 459 of file array_impl.h.

◆ ~ArrayImpl()

template<typename Tile , typename Policy >
virtual TiledArray::detail::ArrayImpl< Tile, Policy >::~ArrayImpl ( )
inlinevirtual

Virtual destructor.

Definition at line 466 of file array_impl.h.

Member Function Documentation

◆ begin()

template<typename Tile , typename Policy >
iterator TiledArray::detail::ArrayImpl< Tile, Policy >::begin ( )
inline

Array begin iterator.

Returns
A const iterator to the first element of the array.

Definition at line 509 of file array_impl.h.

Here is the call graph for this function:

◆ cbegin()

template<typename Tile , typename Policy >
const_iterator TiledArray::detail::ArrayImpl< Tile, Policy >::cbegin ( ) const
inline

Array begin iterator.

Returns
A const iterator to the first element of the array.

Definition at line 524 of file array_impl.h.

Here is the call graph for this function:

◆ cend()

template<typename Tile , typename Policy >
const_iterator TiledArray::detail::ArrayImpl< Tile, Policy >::cend ( ) const
inline

Array end iterator.

Returns
A const iterator to one past the last element of the array.

Definition at line 546 of file array_impl.h.

Here is the call graph for this function:

◆ end()

template<typename Tile , typename Policy >
iterator TiledArray::detail::ArrayImpl< Tile, Policy >::end ( )
inline

Array end iterator.

Returns
A const iterator to one past the last element of the array.

Definition at line 539 of file array_impl.h.

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

◆ get() [1/2]

template<typename Tile , typename Policy >
template<typename Index >
future TiledArray::detail::ArrayImpl< Tile, Policy >::get ( const Index &  i) const
inline

Tile future accessor.

Template Parameters
IndexThe index type
Parameters
iThe tile index
Returns
A future to tile i
Exceptions
TiledArray::ExceptionWhen tile i is zero

Definition at line 475 of file array_impl.h.

Here is the call graph for this function:

◆ get() [2/2]

template<typename Tile , typename Policy >
template<typename Integer >
future TiledArray::detail::ArrayImpl< Tile, Policy >::get ( const std::initializer_list< Integer > &  i) const
inline

Tile future accessor.

Template Parameters
IntegerAn integer type
Parameters
iThe tile index, as an std::initializer_list<Integer>
Returns
A future to tile i
Exceptions
TiledArray::ExceptionWhen tile i is zero

Definition at line 487 of file array_impl.h.

◆ id()

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

Unique object id accessor.

Returns
A const reference to this object unique id

Definition at line 553 of file array_impl.h.

◆ set()

template<typename Tile , typename Policy >
template<typename Index , typename Value >
void TiledArray::detail::ArrayImpl< Tile, Policy >::set ( const Index &  i,
const Value &  value 
)
inline

Set tile.

Set the tile at i with value . Value type may be value_type , Future<value_type> , or madness::detail::MoveWrapper<value_type> .

Template Parameters
IndexThe index type
ValueThe value type
Parameters
iThe index of the tile to be set
valueThe object tat contains the tile value

Definition at line 501 of file array_impl.h.

Here is the call graph for this function:

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