queso-0.53.0
|
A class for partitioning vectors and matrices. More...
#include <DistArray.h>
Public Member Functions | |
Constructor/Destructor methods | |
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 | |
DistArray () | |
Default constructor. Do not call this directly. More... | |
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 | ( | const Map & | inputMap, |
const int | inputRowSize | ||
) |
Constructor for a given inputMap and inputRowSize.
Definition at line 37 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 56 of file DistArray.C.
References QUESO::DistArray< T >::copy(), and QUESO::DistArray< T >::m_elements.
QUESO::DistArray< T >::~DistArray | ( | ) |
Destructor.
Definition at line 72 of file DistArray.C.
|
private |
Default constructor. Do not call this directly.
|
private |
Copies the array.
Definition at line 160 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 126 of file DistArray.C.
Referenced by QUESO::VectorSpace< V, M >::VectorSpace().
int QUESO::DistArray< T >::MyLength | ( | ) | const |
Returns the length of the locally owned array.
Definition at line 137 of file DistArray.C.
Referenced by QUESO::ArrayOfOneDTables< V, M >::ArrayOfOneDTables(), and QUESO::VectorSpace< V, M >::VectorSpace().
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 104 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 115 of file DistArray.C.
DistArray< T > & QUESO::DistArray< T >::operator= | ( | const DistArray< T > & | rhs | ) |
Assignment operator.
Definition at line 88 of file DistArray.C.
References copy.
void QUESO::DistArray< T >::print | ( | std::ostream & | os | ) | const |
Definition at line 168 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 148 of file DistArray.C.
|
friend |
Definition at line 102 of file DistArray.h.
|
private |
Definition at line 122 of file DistArray.h.
Referenced by QUESO::DistArray< T >::DistArray().
|
private |
Definition at line 117 of file DistArray.h.
Referenced by QUESO::DistArray< T >::DistArray().
|
private |
Definition at line 121 of file DistArray.h.
Referenced by QUESO::DistArray< T >::DistArray().