Public Member Functions | Protected Attributes | List of all members
Seldon::DistributedVector< T, Allocator > Class Template Reference

class storing a vector distributed over all the processors More...

#include <DistributedVector.hxx>

Inheritance diagram for Seldon::DistributedVector< T, Allocator >:
Seldon::Vector< T, VectFull, typename SeldonDefaultAllocator< VectFull, T >::allocator >

Public Member Functions

 DistributedVector ()
 default constructor
 
 DistributedVector (const IVect &rows, const MPI_Comm &comm)
 Constructor taking overlapped rows. More...
 
 DistributedVector (const DistributedVector< T, Allocator > &V)
 Copy constructor.
 
void SetOverlapRow (const IVect &rows, const MPI_Comm &comm)
 sets overlapped rows and MPI communicator
 
int GetNbOverlap () const
 returns the number of rows already counted
 
int GetOverlapRow (int i) const
 returns an overlapped row number
 
const MPI_Comm & GetCommunicator () const
 returns communicator
 
void SetCommunicator (const MPI_Comm &comm)
 sets communicator
 

Protected Attributes

IVectOverlapRowNumbers
 row numbers shared with other processors More...
 
MPI_Comm comm_
 MPI communicator grouping processors involved in the computation.
 

Detailed Description

template<class T, class Allocator = typename SeldonDefaultAllocator<VectFull, T>::allocator>
class Seldon::DistributedVector< T, Allocator >

class storing a vector distributed over all the processors

This class is useful when some rows of the vector are shared by several processors. Functions DotProd, DotProdConj and Norm2 are overloaded in order to take into account this overlap.

Definition at line 33 of file DistributedVector.hxx.

Constructor & Destructor Documentation

◆ DistributedVector()

template<class T , class Allocator >
Seldon::DistributedVector< T, Allocator >::DistributedVector ( const IVect rows,
const MPI_Comm &  comm 
)
inline

Constructor taking overlapped rows.

In the array rows, you store all the row numbers which are already counted in another processor. For example : if processor 0 contains rows (0, 3, 5, 7, 8) if processor 1 contains rows (0, 1, 2, 4, 5, 6) Then you can set OverlapRowNumbers empty on processor 0, and equal to (0, 5) on processor 1. If there is no row shared by processors, the array rows will be empty for each processor

Definition at line 47 of file DistributedVectorInline.cxx.

Member Data Documentation

◆ OverlapRowNumbers

template<class T , class Allocator = typename SeldonDefaultAllocator<VectFull, T>::allocator>
IVect* Seldon::DistributedVector< T, Allocator >::OverlapRowNumbers
protected

row numbers shared with other processors

In this array, you store all the row numbers which are already counted in another processor. For example : if processor 0 contains rows (0, 3, 5, 7, 8) if processor 1 contains rows (0, 1, 2, 4, 5, 6) Then you can set OverlapRowNumbers empty on processor 0, and equal to (0, 5) on processor 1

Definition at line 46 of file DistributedVector.hxx.


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