queso-0.52.0
|
A class for partitioning vectors and matrices. More...
#include <DistArray.h>
Public Member Functions | |
Constructor/Destructor methods | |
DistArray () | |
Default constructor. Do not call this directly. More... | |
DistArray (const Map &inputMap, const int inputRowSize) | |
Constructor for a given inputMap and inputRowSize. More... | |
DistArray (const DistArray< T > &src) | |
Copy constructor. More... | |
~DistArray () | |
Destructor. More... | |
Set methods | |
DistArray< T > & | operator= (const DistArray< T > &rhs) |
Assignment operator. More... | |
Query methods | |
T & | operator() (int localElementId, int colId) |
Returns a reference to the colId column component of the localElementId local element. More... | |
const T & | operator() (int localElementId, int colId) const |
Returns a reference to the colId column component of the localElementId local element.(const) More... | |
int | GlobalLength () const |
Returns the global length of the array. More... | |
int | MyLength () const |
Returns the length of the locally owned array. More... | |
int | RowSize () const |
Returns the row size, that is, the amount of data associated with each element. More... | |
Private Member Functions | |
void | copy (const DistArray< T > &src) |
Copies the array. More... | |
Private Attributes | |
Map | m_Map |
unsigned int | m_rowSize |
std::vector< std::vector< T > > | m_elements |
I/O methods | |
void | print (std::ostream &os) const |
std::ostream & | operator<< (std::ostream &os, const DistArray< T > &obj) |
A class for partitioning vectors and matrices.
Class DistArray allows the construction and usage of multi-vectors. These vectors contain element of type T, and the storage is row-oriented (instead of and not column-oriented; thus his class should be used as a container for data, on which no BLAS-like operations are performed).
DistArray objects are identified by an Map and a RowSize. The map specifies the distribution of the elements across the processors and therefore the number of local elements, while the RowSize gives the total number of data assigned to each node. RowSize is constant for all elements.
Definition at line 56 of file DistArray.h.
QUESO::DistArray< T >::DistArray | ( | ) |
Default constructor. Do not call this directly.
Definition at line 36 of file DistArray.C.
References UQ_FATAL_TEST_MACRO, and QUESO::UQ_UNAVAILABLE_RANK.
QUESO::DistArray< T >::DistArray | ( | const Map & | inputMap, |
const int | inputRowSize | ||
) |
Constructor for a given inputMap and inputRowSize.
Definition at line 47 of file DistArray.C.
References QUESO::DistArray< T >::m_elements, QUESO::DistArray< T >::m_Map, QUESO::DistArray< T >::m_rowSize, and QUESO::Map::NumGlobalElements().
QUESO::DistArray< T >::DistArray | ( | const DistArray< T > & | src | ) |
Copy constructor.
Definition at line 66 of file DistArray.C.
References QUESO::DistArray< T >::copy(), and QUESO::DistArray< T >::m_elements.
QUESO::DistArray< T >::~DistArray | ( | ) |
Destructor.
Definition at line 82 of file DistArray.C.
|
private |
Copies the array.
Definition at line 170 of file DistArray.C.
References queso_not_implemented.
Referenced by QUESO::DistArray< T >::DistArray().
int QUESO::DistArray< T >::GlobalLength | ( | ) | const |
Returns the global length of the array.
Definition at line 136 of file DistArray.C.
int QUESO::DistArray< T >::MyLength | ( | ) | const |
Returns the length of the locally owned array.
Definition at line 147 of file DistArray.C.
Referenced by QUESO::ArrayOfOneDTables< V, M >::ArrayOfOneDTables().
T & QUESO::DistArray< T >::operator() | ( | int | localElementId, |
int | colId | ||
) |
Returns a reference to the colId column component of the localElementId local element.
Definition at line 114 of file DistArray.C.
const T & QUESO::DistArray< T >::operator() | ( | int | localElementId, |
int | colId | ||
) | const |
Returns a reference to the colId column component of the localElementId local element.(const)
Definition at line 125 of file DistArray.C.
DistArray< T > & QUESO::DistArray< T >::operator= | ( | const DistArray< T > & | rhs | ) |
Assignment operator.
Definition at line 98 of file DistArray.C.
void QUESO::DistArray< T >::print | ( | std::ostream & | os | ) | const |
Definition at line 178 of file DistArray.C.
int QUESO::DistArray< T >::RowSize | ( | ) | const |
Returns the row size, that is, the amount of data associated with each element.
Definition at line 158 of file DistArray.C.
|
friend |
Definition at line 106 of file DistArray.h.
|
private |
Definition at line 124 of file DistArray.h.
Referenced by QUESO::DistArray< T >::DistArray().
|
private |
Definition at line 119 of file DistArray.h.
Referenced by QUESO::DistArray< T >::DistArray().
|
private |
Definition at line 123 of file DistArray.h.
Referenced by QUESO::DistArray< T >::DistArray().