OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SIndex< Dim > Class Template Reference

#include <SIndex.h>

Inheritance diagram for SIndex< Dim >:
Inheritance graph
[legend]
Collaboration diagram for SIndex< Dim >:
Collaboration graph
[legend]

Public Types

typedef std::vector< std::shared_ptr< LSIndex< Dim > > > container_t
 
typedef unsigned int size_type
 
typedef container_t::iterator iterator_iv
 
typedef container_t::const_iterator const_iterator_iv
 
typedef container_t::size_type size_type_iv
 
typedef LSIndex< Dim >::iterator iterator_indx
 
typedef LSIndex< Dim >::const_iterator const_iterator_indx
 
- Public Types inherited from User
typedef Unique::type ID_t
 

Public Member Functions

 SIndex ()
 
 SIndex (FieldLayout< Dim > &)
 
 SIndex (const SIndex< Dim > &)
 
virtual ~SIndex ()
 
void initialize (FieldLayout< Dim > &)
 
bool needInitialize () const
 
template<class T1 >
SIndex< Dim > & operator= (const PETE_Expr< T1 > &rhs)
 
SIndex< Dim > & operator= (const SIndex< Dim > &)
 
SIndex< Dim > & operator= (const SOffset< Dim > &)
 
SIndex< Dim > & operator= (const NDIndex< Dim > &)
 
SIndex< Dim > & operator&= (const SIndex< Dim > &)
 
SIndex< Dim > & operator&= (const SOffset< Dim > &)
 
SIndex< Dim > & operator&= (const NDIndex< Dim > &)
 
SIndex< Dim > & operator|= (const SIndex< Dim > &)
 
SIndex< Dim > & operator|= (const SOffset< Dim > &)
 
SIndex< Dim > & operator|= (const NDIndex< Dim > &)
 
bool addIndex (const SOffset< Dim > &)
 
bool addIndex (iterator_iv &, const SOffset< Dim > &)
 
void addIndex (const NDIndex< Dim > &)
 
bool removeIndex (const SOffset< Dim > &)
 
bool removeIndex (iterator_iv &, const SOffset< Dim > &)
 
void removeIndex (const NDIndex< Dim > &)
 
void reserve (double=1.0)
 
void clear ()
 
SOffset< Dim > & getOffset ()
 
const SOffset< Dim > & getOffset () const
 
FieldLayout< Dim > & getFieldLayout () const
 
void setFieldLayout (FieldLayout< Dim > &)
 
const NDIndex< Dim > & getDomain () const
 
void setDomain (const NDIndex< Dim > &ndi)
 
SIndex< Dimoperator() (int)
 
SIndex< Dimoperator() (int, int)
 
SIndex< Dimoperator() (int, int, int)
 
SIndex< Dimoperator() (int, int, int, int)
 
SIndex< Dimoperator() (int, int, int, int, int)
 
SIndex< Dimoperator() (int, int, int, int, int, int)
 
SIndex< Dimoperator() (const SOffset< Dim > &)
 
SIndex< Dimoperator() (const int *)
 
IndexedSIndex< Dim, 1 > operator[] (const Index &)
 
template<unsigned int Dim2>
IndexedSIndex< Dim, Dim2 > operator[] (const NDIndex< Dim2 > &ndi)
 
void toNDIndex (const SOffset< Dim > &, NDIndex< Dim > &)
 
iterator_iv begin_iv ()
 
iterator_iv end_iv ()
 
const_iterator_iv begin_iv () const
 
const_iterator_iv end_iv () const
 
size_type_iv size_iv () const
 
size_type_iv size () const
 
bool hasIndex (const SOffset< Dim > &) const
 
virtual void Repartition (UserList *)
 
virtual void notifyUserOfDelete (UserList *)
 
void printDebug (Inform &) const
 
- Public Member Functions inherited from FieldLayoutUser
 FieldLayoutUser ()
 
virtual ~FieldLayoutUser ()
 
virtual void Repartition (UserList *)=0
 
- Public Member Functions inherited from User
 User ()
 
virtual ~User ()
 
ID_t get_Id () const
 
virtual void notifyUserOfDelete (UserList *)=0
 

Private Member Functions

 SIndex (const SIndex< Dim > &, const SOffset< Dim > &)
 
 SIndex (const SIndex< Dim > &, const int *)
 
void setup ()
 

Private Attributes

FieldLayout< Dim > * Layout
 
SOffset< DimOffset
 
container_t IndexList
 
NDIndex< DimBoundingBox
 

Friends

SIndex< Dimoperator+ (const SIndex< Dim > &si, const SOffset< Dim > &so)
 
SIndex< Dimoperator+ (const SOffset< Dim > &so, const SIndex< Dim > &si)
 
SIndex< Dimoperator+ (const SIndex< Dim > &si, const int *so)
 
SIndex< Dimoperator+ (const int *so, const SIndex< Dim > &si)
 
SIndex< Dimoperator- (const SIndex< Dim > &si, const SOffset< Dim > &so)
 
SIndex< Dimoperator- (const SOffset< Dim > &so, const SIndex< Dim > &si)
 
SIndex< Dimoperator- (const SIndex< Dim > &si, const int *so)
 
SIndex< Dimoperator- (const int *so, const SIndex< Dim > &si)
 

Additional Inherited Members

- Protected Attributes inherited from User
ID_t Id
 

Detailed Description

template<unsigned Dim>
class SIndex< Dim >

Definition at line 64 of file SIndex.h.

Member Typedef Documentation

◆ const_iterator_indx

template<unsigned Dim>
typedef LSIndex<Dim>::const_iterator SIndex< Dim >::const_iterator_indx

Definition at line 74 of file SIndex.h.

◆ const_iterator_iv

template<unsigned Dim>
typedef container_t::const_iterator SIndex< Dim >::const_iterator_iv

Definition at line 71 of file SIndex.h.

◆ container_t

template<unsigned Dim>
typedef std::vector< std::shared_ptr<LSIndex<Dim> > > SIndex< Dim >::container_t

Definition at line 68 of file SIndex.h.

◆ iterator_indx

template<unsigned Dim>
typedef LSIndex<Dim>::iterator SIndex< Dim >::iterator_indx

Definition at line 73 of file SIndex.h.

◆ iterator_iv

template<unsigned Dim>
typedef container_t::iterator SIndex< Dim >::iterator_iv

Definition at line 70 of file SIndex.h.

◆ size_type

template<unsigned Dim>
typedef unsigned int SIndex< Dim >::size_type

Definition at line 69 of file SIndex.h.

◆ size_type_iv

template<unsigned Dim>
typedef container_t::size_type SIndex< Dim >::size_type_iv

Definition at line 72 of file SIndex.h.

Constructor & Destructor Documentation

◆ SIndex() [1/5]

template<unsigned int Dim>
SIndex< Dim >::SIndex

Definition at line 39 of file SIndex.hpp.

◆ SIndex() [2/5]

template<unsigned int Dim>
SIndex< Dim >::SIndex ( FieldLayout< Dim > &  fl)

Definition at line 47 of file SIndex.hpp.

References SIndex< Dim >::setup().

Here is the call graph for this function:

◆ SIndex() [3/5]

template<unsigned int Dim>
SIndex< Dim >::SIndex ( const SIndex< Dim > &  si)

Definition at line 58 of file SIndex.hpp.

References SIndex< Dim >::Layout.

◆ ~SIndex()

template<unsigned int Dim>
SIndex< Dim >::~SIndex
virtual

Definition at line 113 of file SIndex.hpp.

◆ SIndex() [4/5]

template<unsigned int Dim>
SIndex< Dim >::SIndex ( const SIndex< Dim > &  si,
const SOffset< Dim > &  so 
)
private

Definition at line 75 of file SIndex.hpp.

References SIndex< Dim >::Layout.

◆ SIndex() [5/5]

template<unsigned int Dim>
SIndex< Dim >::SIndex ( const SIndex< Dim > &  si,
const int *  so 
)
private

Definition at line 95 of file SIndex.hpp.

References SIndex< Dim >::Layout.

Member Function Documentation

◆ addIndex() [1/3]

template<unsigned int Dim>
void SIndex< Dim >::addIndex ( const NDIndex< Dim > &  constndi)

Definition at line 203 of file SIndex.hpp.

References begin(), Dim, end(), and NDIndex< Dim >::size().

Here is the call graph for this function:

◆ addIndex() [2/3]

template<unsigned int Dim>
bool SIndex< Dim >::addIndex ( const SOffset< Dim > &  so)

◆ addIndex() [3/3]

template<unsigned Dim>
bool SIndex< Dim >::addIndex ( iterator_iv ,
const SOffset< Dim > &   
)

◆ begin_iv() [1/2]

template<unsigned Dim>
iterator_iv SIndex< Dim >::begin_iv ( )
inline

◆ begin_iv() [2/2]

template<unsigned Dim>
const_iterator_iv SIndex< Dim >::begin_iv ( ) const
inline

Definition at line 247 of file SIndex.h.

References SIndex< Dim >::IndexList.

◆ clear()

template<unsigned int Dim>
void SIndex< Dim >::clear

Definition at line 332 of file SIndex.hpp.

References a.

Referenced by SIndexAssignTraits< Dim, OpAssign >::initialize().

◆ end_iv() [1/2]

template<unsigned Dim>
iterator_iv SIndex< Dim >::end_iv ( )
inline

Definition at line 246 of file SIndex.h.

References SIndex< Dim >::IndexList.

Referenced by operator<<(), and SIndex< Dim >::operator|=().

◆ end_iv() [2/2]

template<unsigned Dim>
const_iterator_iv SIndex< Dim >::end_iv ( ) const
inline

Definition at line 248 of file SIndex.h.

References SIndex< Dim >::IndexList.

◆ getDomain()

template<unsigned Dim>
const NDIndex< Dim > & SIndex< Dim >::getDomain ( void  ) const
inline

◆ getFieldLayout()

template<unsigned Dim>
FieldLayout< Dim > & SIndex< Dim >::getFieldLayout ( ) const
inline

Definition at line 147 of file SIndex.h.

References SIndex< Dim >::Layout.

◆ getOffset() [1/2]

template<unsigned Dim>
SOffset< Dim > & SIndex< Dim >::getOffset ( )
inline

Definition at line 143 of file SIndex.h.

References SIndex< Dim >::Offset.

Referenced by operator<<().

◆ getOffset() [2/2]

template<unsigned Dim>
const SOffset< Dim > & SIndex< Dim >::getOffset ( ) const
inline

Definition at line 144 of file SIndex.h.

References SIndex< Dim >::Offset.

◆ hasIndex()

template<unsigned int Dim>
bool SIndex< Dim >::hasIndex ( const SOffset< Dim > &  so) const

Definition at line 345 of file SIndex.hpp.

References a.

Referenced by SIndex< Dim >::operator&=().

◆ initialize()

template<unsigned int Dim>
void SIndex< Dim >::initialize ( FieldLayout< Dim > &  fl)

◆ needInitialize()

template<unsigned Dim>
bool SIndex< Dim >::needInitialize ( ) const
inline

◆ notifyUserOfDelete()

template<unsigned int Dim>
void SIndex< Dim >::notifyUserOfDelete ( UserList userlist)
virtual

Implements User.

Definition at line 729 of file SIndex.hpp.

References UserList::getUserListID().

Here is the call graph for this function:

◆ operator&=() [1/3]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator&= ( const NDIndex< Dim > &  ndi)

Definition at line 478 of file SIndex.hpp.

References a, SIndex< Dim >::addIndex(), and SIndex< Dim >::begin_iv().

Here is the call graph for this function:

◆ operator&=() [2/3]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator&= ( const SIndex< Dim > &  si)

Definition at line 427 of file SIndex.hpp.

References a, SIndex< Dim >::addIndex(), SIndex< Dim >::begin_iv(), SIndex< Dim >::BoundingBox, and SIndex< Dim >::hasIndex().

Here is the call graph for this function:

◆ operator&=() [3/3]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator&= ( const SOffset< Dim > &  so)

Definition at line 461 of file SIndex.hpp.

◆ operator()() [1/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( const int *  so)

Definition at line 635 of file SIndex.hpp.

◆ operator()() [2/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( const SOffset< Dim > &  so)

Definition at line 627 of file SIndex.hpp.

◆ operator()() [3/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( int  i0)

Definition at line 573 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator()() [4/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( int  i0,
int  i1 
)

Definition at line 582 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator()() [5/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( int  i0,
int  i1,
int  i2 
)

Definition at line 590 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator()() [6/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( int  i0,
int  i1,
int  i2,
int  i3 
)

Definition at line 599 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator()() [7/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( int  i0,
int  i1,
int  i2,
int  i3,
int  i4 
)

Definition at line 608 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator()() [8/8]

template<unsigned int Dim>
SIndex< Dim > SIndex< Dim >::operator() ( int  i0,
int  i1,
int  i2,
int  i3,
int  i4,
int  i5 
)

Definition at line 617 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator=() [1/4]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator= ( const NDIndex< Dim > &  ndi)

Definition at line 408 of file SIndex.hpp.

◆ operator=() [2/4]

template<unsigned Dim>
template<class T1 >
SIndex< Dim > & SIndex< Dim >::operator= ( const PETE_Expr< T1 > &  rhs)
inline

Definition at line 98 of file SIndex.h.

References assign().

Here is the call graph for this function:

◆ operator=() [3/4]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator= ( const SIndex< Dim > &  si)

◆ operator=() [4/4]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator= ( const SOffset< Dim > &  so)

Definition at line 389 of file SIndex.hpp.

◆ operator[]() [1/2]

template<unsigned int Dim>
IndexedSIndex< Dim, 1 > SIndex< Dim >::operator[] ( const Index i)

Definition at line 649 of file SIndex.hpp.

References CTAssert, and Dim.

◆ operator[]() [2/2]

template<unsigned Dim>
template<unsigned int Dim2>
IndexedSIndex< Dim, Dim2 > SIndex< Dim >::operator[] ( const NDIndex< Dim2 > &  ndi)
inline

Definition at line 222 of file SIndex.h.

References CTAssert, and Dim.

◆ operator|=() [1/3]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator|= ( const NDIndex< Dim > &  ndi)

Definition at line 555 of file SIndex.hpp.

◆ operator|=() [2/3]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator|= ( const SIndex< Dim > &  si)

Definition at line 511 of file SIndex.hpp.

References a, SIndex< Dim >::begin_iv(), and SIndex< Dim >::end_iv().

Here is the call graph for this function:

◆ operator|=() [3/3]

template<unsigned int Dim>
SIndex< Dim > & SIndex< Dim >::operator|= ( const SOffset< Dim > &  so)

Definition at line 538 of file SIndex.hpp.

◆ printDebug()

template<unsigned int Dim>
void SIndex< Dim >::printDebug ( Inform o) const

Definition at line 764 of file SIndex.hpp.

References endl().

Here is the call graph for this function:

◆ removeIndex() [1/3]

template<unsigned int Dim>
void SIndex< Dim >::removeIndex ( const NDIndex< Dim > &  constndi)

Definition at line 279 of file SIndex.hpp.

References begin(), Dim, end(), and NDIndex< Dim >::size().

Here is the call graph for this function:

◆ removeIndex() [2/3]

template<unsigned int Dim>
bool SIndex< Dim >::removeIndex ( const SOffset< Dim > &  so)

Definition at line 242 of file SIndex.hpp.

Referenced by SIndexAssignTraits< Dim, OpBitwiseAndAssign >::apply().

◆ removeIndex() [3/3]

template<unsigned Dim>
bool SIndex< Dim >::removeIndex ( iterator_iv ,
const SOffset< Dim > &   
)

◆ Repartition()

template<unsigned int Dim>
void SIndex< Dim >::Repartition ( UserList userlist)
virtual

Implements FieldLayoutUser.

Definition at line 713 of file SIndex.hpp.

References UserList::getUserListID().

Here is the call graph for this function:

◆ reserve()

template<unsigned int Dim>
void SIndex< Dim >::reserve ( double  fraction = 1.0)

Definition at line 318 of file SIndex.hpp.

References a.

◆ setDomain()

template<unsigned Dim>
void SIndex< Dim >::setDomain ( const NDIndex< Dim > &  ndi)
inline

Definition at line 154 of file SIndex.h.

◆ setFieldLayout()

template<unsigned int Dim>
void SIndex< Dim >::setFieldLayout ( FieldLayout< Dim > &  fl)

Definition at line 695 of file SIndex.hpp.

◆ setup()

template<unsigned int Dim>
void SIndex< Dim >::setup ( void  )
private

Definition at line 137 of file SIndex.hpp.

References FieldLayout< Dim >::end_iv().

Referenced by SIndex< Dim >::SIndex().

Here is the call graph for this function:

◆ size()

template<unsigned int Dim>
SIndex< Dim >::size_type_iv SIndex< Dim >::size ( void  ) const

Definition at line 678 of file SIndex.hpp.

References a.

◆ size_iv()

template<unsigned Dim>
size_type_iv SIndex< Dim >::size_iv ( ) const
inline

Definition at line 249 of file SIndex.h.

References SIndex< Dim >::IndexList.

Referenced by operator<<().

◆ toNDIndex()

template<unsigned int Dim>
void SIndex< Dim >::toNDIndex ( const SOffset< Dim > &  val,
NDIndex< Dim > &  NDI 
)

Definition at line 664 of file SIndex.hpp.

References Dim.

Friends And Related Function Documentation

◆ operator+ [1/4]

template<unsigned Dim>
SIndex< Dim > operator+ ( const int *  so,
const SIndex< Dim > &  si 
)
friend

Definition at line 179 of file SIndex.h.

◆ operator+ [2/4]

template<unsigned Dim>
SIndex< Dim > operator+ ( const SIndex< Dim > &  si,
const int *  so 
)
friend

Definition at line 174 of file SIndex.h.

◆ operator+ [3/4]

template<unsigned Dim>
SIndex< Dim > operator+ ( const SIndex< Dim > &  si,
const SOffset< Dim > &  so 
)
friend

Definition at line 164 of file SIndex.h.

◆ operator+ [4/4]

template<unsigned Dim>
SIndex< Dim > operator+ ( const SOffset< Dim > &  so,
const SIndex< Dim > &  si 
)
friend

Definition at line 169 of file SIndex.h.

◆ operator- [1/4]

template<unsigned Dim>
SIndex< Dim > operator- ( const int *  so,
const SIndex< Dim > &  si 
)
friend

Definition at line 199 of file SIndex.h.

◆ operator- [2/4]

template<unsigned Dim>
SIndex< Dim > operator- ( const SIndex< Dim > &  si,
const int *  so 
)
friend

Definition at line 194 of file SIndex.h.

◆ operator- [3/4]

template<unsigned Dim>
SIndex< Dim > operator- ( const SIndex< Dim > &  si,
const SOffset< Dim > &  so 
)
friend

Definition at line 184 of file SIndex.h.

◆ operator- [4/4]

template<unsigned Dim>
SIndex< Dim > operator- ( const SOffset< Dim > &  so,
const SIndex< Dim > &  si 
)
friend

Definition at line 189 of file SIndex.h.

Member Data Documentation

◆ BoundingBox

template<unsigned Dim>
NDIndex<Dim> SIndex< Dim >::BoundingBox
private

◆ IndexList

template<unsigned Dim>
container_t SIndex< Dim >::IndexList
private

◆ Layout

template<unsigned Dim>
FieldLayout<Dim>* SIndex< Dim >::Layout
private

◆ Offset

template<unsigned Dim>
SOffset<Dim> SIndex< Dim >::Offset
private

Definition at line 280 of file SIndex.h.

Referenced by SIndex< Dim >::getOffset(), and SIndex< Dim >::operator=().


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