TiledArray::detail::ArrayIterator< Impl, Reference > Class Template Reference

Documentation

template<typename Impl, typename Reference>
class TiledArray::detail::ArrayIterator< Impl, Reference >

Distributed tensor iterator.

This iterator will reference local tiles for a TensorImpl object. It can be used to get or set futures to a tile, or access the coordinate and ordinal index of the tile.

Template Parameters
ImplThe TensorImpl type
ReferenceThe iterator reference type

Definition at line 236 of file array_impl.h.

Public Types

typedef ptrdiff_t difference_type
 Difference type. More...
 
typedef Impl::future value_type
 Iterator dereference value type. More...
 
typedef PointerProxy< value_typepointer
 Pointer type to iterator value. More...
 
typedef Reference reference
 Reference type to iterator value. More...
 
typedef std::forward_iterator_tag iterator_category
 Iterator category type. More...
 
typedef ArrayIterator< Impl, Reference > ArrayIterator_
 This object type. More...
 
typedef Impl::range_type::index index_type
 
typedef Impl::ordinal_type ordinal_type
 
typedef Impl::range_type range_type
 
typedef Impl::value_type tile_type
 

Public Member Functions

 ArrayIterator ()
 Default constructor. More...
 
 ArrayIterator (Impl *tensor, typename Impl::pmap_interface::const_iterator it)
 Constructor. More...
 
 ArrayIterator (const ArrayIterator_ &other)
 Copy constructor. More...
 
template<typename I , typename R , typename std::enable_if<!((!std::is_const< Impl >::value) &&std::is_const< I >::value)>::type * = nullptr>
 ArrayIterator (const ArrayIterator< I, R > &other)
 Copy const iterator constructor. More...
 
ArrayIterator_operator= (const ArrayIterator_ &other)
 Copy operator. More...
 
template<typename R >
ArrayIterator_operator= (const ArrayIterator< Impl, R > &other)
 Copy operator. More...
 
ArrayIterator_operator++ ()
 Prefix increment operator. More...
 
ArrayIterator_ operator++ (int)
 Post-fix increment operator. More...
 
template<typename I , typename R >
bool operator== (const ArrayIterator< I, R > &other) const
 Equality operator. More...
 
template<typename I , typename R >
bool operator!= (const ArrayIterator< I, R > &other) const
 Inequality operator. More...
 
reference operator* () const
 Dereference operator. More...
 
pointer operator-> () const
 Arrow dereference operator. More...
 
index_type index () const
 Tile coordinate index accessor. More...
 
ordinal_type ordinal () const
 Tile ordinal index accessor. More...
 
range_type make_range () const
 Tile range factory function. More...
 

Friends

template<typename , typename >
class ArrayIterator
 

Member Typedef Documentation

◆ ArrayIterator_

template<typename Impl , typename Reference >
typedef ArrayIterator<Impl, Reference> TiledArray::detail::ArrayIterator< Impl, Reference >::ArrayIterator_

This object type.

Definition at line 253 of file array_impl.h.

◆ difference_type

template<typename Impl , typename Reference >
typedef ptrdiff_t TiledArray::detail::ArrayIterator< Impl, Reference >::difference_type

Difference type.

Definition at line 246 of file array_impl.h.

◆ index_type

template<typename Impl , typename Reference >
typedef Impl::range_type::index TiledArray::detail::ArrayIterator< Impl, Reference >::index_type

Definition at line 254 of file array_impl.h.

◆ iterator_category

template<typename Impl , typename Reference >
typedef std::forward_iterator_tag TiledArray::detail::ArrayIterator< Impl, Reference >::iterator_category

Iterator category type.

Definition at line 252 of file array_impl.h.

◆ ordinal_type

template<typename Impl , typename Reference >
typedef Impl::ordinal_type TiledArray::detail::ArrayIterator< Impl, Reference >::ordinal_type

Definition at line 255 of file array_impl.h.

◆ pointer

template<typename Impl , typename Reference >
typedef PointerProxy<value_type> TiledArray::detail::ArrayIterator< Impl, Reference >::pointer

Pointer type to iterator value.

Definition at line 249 of file array_impl.h.

◆ range_type

template<typename Impl , typename Reference >
typedef Impl::range_type TiledArray::detail::ArrayIterator< Impl, Reference >::range_type

Definition at line 256 of file array_impl.h.

◆ reference

template<typename Impl , typename Reference >
typedef Reference TiledArray::detail::ArrayIterator< Impl, Reference >::reference

Reference type to iterator value.

Definition at line 250 of file array_impl.h.

◆ tile_type

template<typename Impl , typename Reference >
typedef Impl::value_type TiledArray::detail::ArrayIterator< Impl, Reference >::tile_type

Definition at line 257 of file array_impl.h.

◆ value_type

template<typename Impl , typename Reference >
typedef Impl::future TiledArray::detail::ArrayIterator< Impl, Reference >::value_type

Iterator dereference value type.

Definition at line 248 of file array_impl.h.

Constructor & Destructor Documentation

◆ ArrayIterator() [1/4]

template<typename Impl , typename Reference >
TiledArray::detail::ArrayIterator< Impl, Reference >::ArrayIterator ( )
inline

Default constructor.

Definition at line 271 of file array_impl.h.

◆ ArrayIterator() [2/4]

template<typename Impl , typename Reference >
TiledArray::detail::ArrayIterator< Impl, Reference >::ArrayIterator ( Impl *  tensor,
typename Impl::pmap_interface::const_iterator  it 
)
inline

Constructor.

Definition at line 274 of file array_impl.h.

◆ ArrayIterator() [3/4]

template<typename Impl , typename Reference >
TiledArray::detail::ArrayIterator< Impl, Reference >::ArrayIterator ( const ArrayIterator_ other)
inline

Copy constructor.

Parameters
otherThe transform iterator to copy

Definition at line 280 of file array_impl.h.

◆ ArrayIterator() [4/4]

template<typename Impl , typename Reference >
template<typename I , typename R , typename std::enable_if<!((!std::is_const< Impl >::value) &&std::is_const< I >::value)>::type * = nullptr>
TiledArray::detail::ArrayIterator< Impl, Reference >::ArrayIterator ( const ArrayIterator< I, R > &  other)
inline

Copy const iterator constructor.

Template Parameters
RIterator reference type
Parameters
otherThe transform iterator to copy

Definition at line 291 of file array_impl.h.

Member Function Documentation

◆ index()

template<typename Impl , typename Reference >
index_type TiledArray::detail::ArrayIterator< Impl, Reference >::index ( ) const
inline

Tile coordinate index accessor.

Returns
The coordinate index of the current tile

Definition at line 376 of file array_impl.h.

◆ make_range()

template<typename Impl , typename Reference >
range_type TiledArray::detail::ArrayIterator< Impl, Reference >::make_range ( ) const
inline

Tile range factory function.

Construct a range object for the current tile

Definition at line 392 of file array_impl.h.

◆ operator!=()

template<typename Impl , typename Reference >
template<typename I , typename R >
bool TiledArray::detail::ArrayIterator< Impl, Reference >::operator!= ( const ArrayIterator< I, R > &  other) const
inline

Inequality operator.

Template Parameters
RIterator reference type
Parameters
otherThe iterator to compare to this iterator.
Returns
true when the iterators are not equal to each other, otherwise false.

Definition at line 353 of file array_impl.h.

◆ operator*()

template<typename Impl , typename Reference >
reference TiledArray::detail::ArrayIterator< Impl, Reference >::operator* ( ) const
inline

Dereference operator.

Returns
A reference to the current tile future.

Definition at line 360 of file array_impl.h.

◆ operator++() [1/2]

template<typename Impl , typename Reference >
ArrayIterator_& TiledArray::detail::ArrayIterator< Impl, Reference >::operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object after it has been incremented.

Definition at line 321 of file array_impl.h.

◆ operator++() [2/2]

template<typename Impl , typename Reference >
ArrayIterator_ TiledArray::detail::ArrayIterator< Impl, Reference >::operator++ ( int  )
inline

Post-fix increment operator.

Returns
A copy of this object before it is incremented.

Definition at line 329 of file array_impl.h.

◆ operator->()

template<typename Impl , typename Reference >
pointer TiledArray::detail::ArrayIterator< Impl, Reference >::operator-> ( ) const
inline

Arrow dereference operator.

Returns
A pointer-proxy to the current tile

Definition at line 368 of file array_impl.h.

◆ operator=() [1/2]

template<typename Impl , typename Reference >
template<typename R >
ArrayIterator_& TiledArray::detail::ArrayIterator< Impl, Reference >::operator= ( const ArrayIterator< Impl, R > &  other)
inline

Copy operator.

Template Parameters
RIterator reference type
Parameters
otherThe transform iterator to copy
Returns
A reference to this object

Definition at line 311 of file array_impl.h.

◆ operator=() [2/2]

template<typename Impl , typename Reference >
ArrayIterator_& TiledArray::detail::ArrayIterator< Impl, Reference >::operator= ( const ArrayIterator_ other)
inline

Copy operator.

Parameters
otherThe transform iterator to copy
Returns
A reference to this object

Definition at line 298 of file array_impl.h.

◆ operator==()

template<typename Impl , typename Reference >
template<typename I , typename R >
bool TiledArray::detail::ArrayIterator< Impl, Reference >::operator== ( const ArrayIterator< I, R > &  other) const
inline

Equality operator.

Template Parameters
RIterator reference type
Parameters
otherThe iterator to compare to this iterator.
Returns
true when the iterators are equal to each other, otherwise false.

Definition at line 342 of file array_impl.h.

◆ ordinal()

template<typename Impl , typename Reference >
ordinal_type TiledArray::detail::ArrayIterator< Impl, Reference >::ordinal ( ) const
inline

Tile ordinal index accessor.

Returns
The ordinal index of the current tile

Definition at line 384 of file array_impl.h.

Friends And Related Function Documentation

◆ ArrayIterator

template<typename Impl , typename Reference >
template<typename , typename >
friend class ArrayIterator
friend

Definition at line 240 of file array_impl.h.


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