Proto  3.2
Public Member Functions | Protected Attributes | Friends | List of all members
Proto::DataIndex< P > Class Template Reference

Data Index. More...

#include <Proto_DataIndex.H>

Inheritance diagram for Proto::DataIndex< P >:
Inheritance graph
[legend]

Public Member Functions

 DataIndex ()
 Default Constructor. More...
 
 DataIndex (const std::shared_ptr< P > a_partition, unsigned int a_index)
 Explicit Constructor. More...
 
 DataIndex (const DataIndex &other)
 Copy constructor. More...
 
DataIndexoperator= (const DataIndex &other)
 Copy assignment. More...
 
 ~DataIndex ()
 Destructor. More...
 
bool operator== (const DataIndex< P > &a_di) const
 Equality Operator. More...
 
bool operator== (const DataIterator< P > &a_iter) const
 Equality Operator (Overload) More...
 
bool operator!= (const DataIndex< P > &a_di) const
 Inequality Operator. More...
 
bool operator!= (const DataIterator< P > &a_iter) const
 Inequality Operator (Overload) More...
 
 operator int () const
 Integer Cast. More...
 
int local () const
 Local Value. More...
 
int global () const
 Local Value. More...
 
bool compatible (const DataIndex< P > &a_index) const
 Compatibility Query. More...
 
bool compatible (const P &a_partition) const
 Compatibility Query. More...
 
const P & partition () const
 

Protected Attributes

shared_ptr< P > m_partition
 
int m_currentInt
 

Friends

class DisjointBoxLayout
 
template<typename PP >
class DataIterator
 
template<typename PP >
std::ostream & operator<< (std::ostream &a_os, const DataIndex< PP > &a_index)
 

Detailed Description

template<typename P>
class Proto::DataIndex< P >

Data Index.

Data Index is a special object used in tandem with DataIterator. See DataIterator for further documentation.

Template Parameters
PA "Partition" object which defines "layoutness" of the iterable object (see BoxPartition)

Constructor & Destructor Documentation

◆ DataIndex() [1/3]

template<typename P>
Proto::DataIndex< P >::DataIndex ( )
inline

Default Constructor.

◆ DataIndex() [2/3]

template<typename P>
Proto::DataIndex< P >::DataIndex ( const std::shared_ptr< P >  a_partition,
unsigned int  a_index 
)
inline

Explicit Constructor.

◆ DataIndex() [3/3]

template<typename P>
Proto::DataIndex< P >::DataIndex ( const DataIndex< P > &  other)
inline

Copy constructor.

◆ ~DataIndex()

template<typename P>
Proto::DataIndex< P >::~DataIndex ( )
inline

Destructor.

Member Function Documentation

◆ operator=()

template<typename P>
DataIndex& Proto::DataIndex< P >::operator= ( const DataIndex< P > &  other)
inline

Copy assignment.

◆ operator==() [1/2]

template<typename P>
bool Proto::DataIndex< P >::operator== ( const DataIndex< P > &  a_di) const
inline

◆ operator==() [2/2]

template<typename P>
bool Proto::DataIndex< P >::operator== ( const DataIterator< P > &  a_iter) const
inline

Equality Operator (Overload)

Provided to increase expressiveness and backwards compatibility

◆ operator!=() [1/2]

template<typename P>
bool Proto::DataIndex< P >::operator!= ( const DataIndex< P > &  a_di) const
inline

◆ operator!=() [2/2]

template<typename P>
bool Proto::DataIndex< P >::operator!= ( const DataIterator< P > &  a_iter) const
inline

Inequality Operator (Overload)

Provided to increase expressiveness and backwards compatibility

◆ operator int()

template<typename P>
Proto::DataIndex< P >::operator int ( ) const
inline

Integer Cast.

Data Index implicitly casts to the LOCAL index of the iterable. This behavior is used internally to increase code clarity.

◆ local()

template<typename P>
int Proto::DataIndex< P >::local ( ) const
inline

Local Value.

Returns the integer value associated with the LOCAL (in the sense of MPI process) index of the iterate.

Referenced by Proto::DataIndex< BoxPartition >::operator int().

◆ global()

template<typename P>
int Proto::DataIndex< P >::global ( ) const
inline

Local Value.

Returns the integer value associated with the GLOBAL (in the sense of MPI process) index of the iterate.

◆ compatible() [1/2]

template<typename P>
bool Proto::DataIndex< P >::compatible ( const DataIndex< P > &  a_index) const
inline

Compatibility Query.

Returns true if the partition associated with *this is compatible with that associated with another index.

Referenced by Proto::CoarseFineBoundary< P >::onCoarseBoundary(), and Proto::CoarseFineBoundary< P >::onFineBoundary().

◆ compatible() [2/2]

template<typename P>
bool Proto::DataIndex< P >::compatible ( const P &  a_partition) const
inline

Compatibility Query.

Returns true if the partition associated with *this is compatible with another partition.

◆ partition()

template<typename P>
const P& Proto::DataIndex< P >::partition ( ) const
inline

Friends And Related Function Documentation

◆ DisjointBoxLayout

template<typename P>
friend class DisjointBoxLayout
friend

◆ DataIterator

template<typename P>
template<typename PP >
friend class DataIterator
friend

◆ operator<<

template<typename P>
template<typename PP >
std::ostream& operator<< ( std::ostream &  a_os,
const DataIndex< PP > &  a_index 
)
friend

Member Data Documentation

◆ m_partition

template<typename P>
shared_ptr<P> Proto::DataIndex< P >::m_partition
protected

◆ m_currentInt

template<typename P>
int Proto::DataIndex< P >::m_currentInt
protected

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