SkelGIS
3.0
|
#include <dmatrix.hpp>
Public Member Functions | |
DMatrix () | |
default constructor of the distributed matrix interface | |
DMatrix (DMatrix_impl< T, 0, false > *_m) | |
constructor of the distributed matrix interface from pointer | |
DMatrix (DMatrix< T, 0, false > &_m) | |
constructor of the distributed matrix interface with another DMatrix | |
DMatrix (HEADER h, const T value, bool loc=false) | |
constructor of the distributed matrix interface from a HEADER and a default value | |
DMatrix (const char *binFile, bool loc=false) | |
constructor of the distributed matrix interface from a binary file | |
~DMatrix () | |
destructor of the distributed matrix | |
void | init (DMatrix_impl< T, 0, false > *_m) |
initialization of the distributed matrix interface from pointer | |
void | init (DMatrix< T, 0, false > &_m) |
initialization of the distributed matrix interface from another DMatrix | |
void | init (HEADER h, const T value, bool loc=false) |
initialization of the distributed matrix interface from a HEADER and a default value | |
void | init (const char *binFile, bool loc=false) |
initialization of the distributed matrix interface from a binary file | |
void | erase () |
to erase and clear the DMatrix | |
T | getValue (iterator< T, 0 > it) const |
Methods to get the value of the matrix at the iterator it (alternative to [it]) | |
T | getValue (iterator_cont< T, 0 > it) const |
T | getValue (iterator_step< T, 0 > it) const |
T | getValue (iterator_rev< T, 0 > it) const |
void | setValue (iterator< T, 0 > it, T value) |
Methods to set the value of the matrix at the iterator it (alternative to [it]=) | |
void | setValue (iterator_cont< T, 0 > it, T value) |
void | setValue (iterator_step< T, 0 > it, T value) |
void | setValue (iterator_rev< T, 0 > it, T value) |
iterator< T, 0 > | begin () |
Get the beginning iterator of the DMatrix (on the first element of the DMatrix) | |
iterator_cont< T, 0 > | begin_cont () |
iterator_rev< T, 0 > | begin_rev () |
iterator_step< T, 0 > | begin_step (int step, int nb) |
iterator_line< T, 0 > | begin_line () |
iterator< T, 0 > | end () |
Get the ending iterator of the DMatrix (on the last element of the DMatrix) | |
iterator_cont< T, 0 > | end_cont () |
iterator_rev< T, 0 > | end_rev () |
iterator_step< T, 0 > | end_step () |
iterator_line< T, 0 > | end_line () |
T & | operator[] (iterator< T, 0 > it) |
Operator [] to get and set an element of the matrix at iterator it. | |
T & | operator[] (iterator_cont< T, 0 > it) |
T & | operator[] (iterator_rev< T, 0 > it) |
T & | operator[] (iterator_step< T, 0 > it) |
DMatrix< T, 0, false > & | operator= (DMatrix< T, 0, false > &right) |
Operator = to assign the current DMatrix interface object to another one. | |
void | print () |
Print the matrix by block. | |
void | printAll () |
Print all the matrix by block. | |
void | write (char *binFile) |
Saving in a bin file the distributed matrix interface. | |
iterator< T, 0 > | getIterator (int x, int y) |
Get the iterator on the matrix at position (x,y) | |
iterator< T, 0 > | getIterator_cont (int x, int y) |
iterator< T, 0 > | getIterator_rev (int x, int y) |
void | getIndexes (iterator< T, 0 > it, int &col, int &li) |
Get the indexes of the iterator on the matrix. | |
void | getIndexes (iterator_cont< T, 0 > it, int &col, int &li) |
void | getIndexes (iterator_rev< T, 0 > it, int &col, int &li) |
HEADER | getGlobalHeader () |
Get the global header of the DMatrix. | |
HEADER | getHeader () |
Get the header of the DMatrix. | |
int | getCols () |
Get the number of columns in the domain decomposition. | |
int | getRows () |
Get the number of rows in the domain decomposition. | |
int | getCol () |
Get the column number of the DMatrix. | |
int | getRow () |
Get the row number of the DMatrix. | |
T * | getData () |
Get the data table of the DMatrix. | |
DMatrix_impl< T, 0, false > * | getDMatrix () |
Get the DMatrix_impl associated to the DMatrix interface. | |
Protected Attributes | |
DMatrix_impl< T, 0, false > * | m |
Pointer to DMatrix_impl object. |
DMatrix class.
template of the distributed matrix of SkelGIS. This is the fourth specialization of the DMatrix.
T | is the type of data to store in the DMatrix R overlap template parameter is not asked and specialized to 0. The line template parameter is specialized with the false value. In this case the parallel data distribution will be done along height and width (by block). |
Definition at line 3229 of file dmatrix.hpp.
skelgis::DMatrix< T, 0, false >::DMatrix | ( | DMatrix_impl< T, 0, false > * | _m | ) | [inline] |
constructor of the distributed matrix interface from pointer
This Constructor is used in the user function when a skeleton ApplyList is called.
_m | is a DMatrix_impl pointer |
Definition at line 3250 of file dmatrix.hpp.
skelgis::DMatrix< T, 0, false >::DMatrix | ( | DMatrix< T, 0, false > & | _m | ) | [inline] |
skelgis::DMatrix< T, 0, false >::DMatrix | ( | HEADER | h, |
const T | value, | ||
bool | loc = false |
||
) | [inline] |
constructor of the distributed matrix interface from a HEADER and a default value
The HEADER essentially define the size of the DMatrix, while the default value is given to each element of the DMatrix.
h | is the header to construct the object (see skelgis/util/utility.hpp) |
value | is the default value to put in the matrix |
loc | is a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction). |
Definition at line 3268 of file dmatrix.hpp.
skelgis::DMatrix< T, 0, false >::DMatrix | ( | const char * | binFile, |
bool | loc = false |
||
) | [inline] |
constructor of the distributed matrix interface from a binary file
A specific binary file format is read by SkelGIS. A Dmatrix instance can be constructed from a binary file.
binFile | is a binary input file to construct the DMatrix with |
loc | is a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction). |
Definition at line 3277 of file dmatrix.hpp.
iterator<T,0> skelgis::DMatrix< T, 0, false >::begin | ( | ) | [inline] |
Get the beginning iterator of the DMatrix (on the first element of the DMatrix)
This method exists for each type of iterator in SkelGIS.
Definition at line 3355 of file dmatrix.hpp.
iterator<T,0> skelgis::DMatrix< T, 0, false >::end | ( | ) | [inline] |
Get the ending iterator of the DMatrix (on the last element of the DMatrix)
This method exists for each type of iterator in SkelGIS.
Definition at line 3367 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::erase | ( | ) | [inline] |
to erase and clear the DMatrix
The equivalent to the erase of a std::vector in the STL. The erase will empty the DMatrix and will deallocate the memory space associated. This has to be done when the DMatrix is not usefull anymore.
Definition at line 3323 of file dmatrix.hpp.
int skelgis::DMatrix< T, 0, false >::getCol | ( | ) | [inline] |
Get the column number of the DMatrix.
Definition at line 3473 of file dmatrix.hpp.
int skelgis::DMatrix< T, 0, false >::getCols | ( | ) | [inline] |
Get the number of columns in the domain decomposition.
Definition at line 3459 of file dmatrix.hpp.
T* skelgis::DMatrix< T, 0, false >::getData | ( | ) | [inline] |
Get the data table of the DMatrix.
Definition at line 3487 of file dmatrix.hpp.
DMatrix_impl<T,0,false>* skelgis::DMatrix< T, 0, false >::getDMatrix | ( | ) | [inline] |
Get the DMatrix_impl associated to the DMatrix interface.
Definition at line 3494 of file dmatrix.hpp.
HEADER skelgis::DMatrix< T, 0, false >::getGlobalHeader | ( | ) | [inline] |
Get the global header of the DMatrix.
Definition at line 3445 of file dmatrix.hpp.
HEADER skelgis::DMatrix< T, 0, false >::getHeader | ( | ) | [inline] |
void skelgis::DMatrix< T, 0, false >::getIndexes | ( | iterator< T, 0 > | it, |
int & | col, | ||
int & | li | ||
) | [inline] |
Get the indexes of the iterator on the matrix.
This method exists for the three basic types of iterators.
it | is the iterator from which the indexes will be taken |
x | is the iterator position x returned |
y | is the iterator position y returned |
Definition at line 3436 of file dmatrix.hpp.
iterator<T,0> skelgis::DMatrix< T, 0, false >::getIterator | ( | int | x, |
int | y | ||
) | [inline] |
Get the iterator on the matrix at position (x,y)
This method exists for the three basic types of iterators.
x | is row index y is column index |
Definition at line 3424 of file dmatrix.hpp.
int skelgis::DMatrix< T, 0, false >::getRow | ( | ) | [inline] |
Get the row number of the DMatrix.
Definition at line 3480 of file dmatrix.hpp.
int skelgis::DMatrix< T, 0, false >::getRows | ( | ) | [inline] |
Get the number of rows in the domain decomposition.
Definition at line 3466 of file dmatrix.hpp.
T skelgis::DMatrix< T, 0, false >::getValue | ( | iterator< T, 0 > | it | ) | const [inline] |
Methods to get the value of the matrix at the iterator it (alternative to [it])
This method exists for each type of iterator in SkelGIS. This method is const as the value returned could not be modified.
it | is the iterator position |
Definition at line 3332 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::init | ( | DMatrix_impl< T, 0, false > * | _m | ) | [inline] |
initialization of the distributed matrix interface from pointer
The equivalent to the constructor from a pointer
_m | is a DMatrix_impl object |
Definition at line 3289 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::init | ( | DMatrix< T, 0, false > & | _m | ) | [inline] |
initialization of the distributed matrix interface from another DMatrix
The equivalent to the constructor from another DMatrix
_m | is a DMatrix object |
Definition at line 3297 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::init | ( | HEADER | h, |
const T | value, | ||
bool | loc = false |
||
) | [inline] |
initialization of the distributed matrix interface from a HEADER and a default value
The equivalent to the constructor from a HEADER and a default value
h | is the header to construct the object (see skelgis/util/utility.hpp) |
value | is the default value to put in the matrix |
Definition at line 3306 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::init | ( | const char * | binFile, |
bool | loc = false |
||
) | [inline] |
initialization of the distributed matrix interface from a binary file
The equivalent to the constructor from a binary file
binFile | is a binary input file to construct the DMatrix with |
Definition at line 3314 of file dmatrix.hpp.
DMatrix<T,0,false>& skelgis::DMatrix< T, 0, false >::operator= | ( | DMatrix< T, 0, false > & | right | ) | [inline] |
Operator = to assign the current DMatrix interface object to another one.
right | is the other DMatrix object |
Definition at line 3391 of file dmatrix.hpp.
T& skelgis::DMatrix< T, 0, false >::operator[] | ( | iterator< T, 0 > | it | ) | [inline] |
Operator [] to get and set an element of the matrix at iterator it.
This method exists for each type of iterator in SkelGIS.
it | is the iterator position |
Definition at line 3380 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::print | ( | ) | [inline] |
Print the matrix by block.
This method will print the DMatrix by processors in the directory "outputs".
Definition at line 3398 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::printAll | ( | ) | [inline] |
Print all the matrix by block.
This method will print the DMatrix by processors in the directory "outputs". It will also print the physical border of the DMatrix and the parallel overlap of the DMatrix.
Definition at line 3406 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::setValue | ( | iterator< T, 0 > | it, |
T | value | ||
) | [inline] |
Methods to set the value of the matrix at the iterator it (alternative to [it]=)
This method exists for each type of iterator in SkelGIS.
it | is the iterator position |
value | is the value to set |
Definition at line 3344 of file dmatrix.hpp.
void skelgis::DMatrix< T, 0, false >::write | ( | char * | binFile | ) | [inline] |
Saving in a bin file the distributed matrix interface.
This method writes the DMatrix in a single binary output file.
binFile | is a binary output file to save the DMatrix in |
Definition at line 3414 of file dmatrix.hpp.
DMatrix_impl<T,0,false>* skelgis::DMatrix< T, 0, false >::m [protected] |
Pointer to DMatrix_impl object.
The pointer to Dmatrix_impl object is the real distributed matrix object. DMatrix class is the user interface to this object.
Definition at line 3237 of file dmatrix.hpp.