MADNESS
0.10.1
|
#include <distributed_matrix.h>
Public Member Functions | |
DistributedMatrixDistribution () | |
Default constructor makes an invalid distribution. More... | |
virtual | ~DistributedMatrixDistribution () |
void | clear () |
Resets state to same as default constructor. More... | |
int64_t | coldim () const |
Returns the column dimension of the matrix ... i.e., n for A(n,m) More... | |
int64_t | coltile () const |
Returns the column tile size. More... | |
const DistributedMatrixDistribution & | distribution () const |
Returns the distribution (aka *this) More... | |
void | get_colrange (int p, int64_t &ilow, int64_t &ihigh) const |
Returns the inclusive range of column indices on processor p. More... | |
void | get_range (int p, int64_t &ilow, int64_t &ihigh, int64_t &jlow, int64_t &jhigh) const |
Returns the inclusive ranges of column and row indicies on processor p. More... | |
void | get_rowrange (int p, int64_t &jlow, int64_t &jhigh) const |
Returns the inclusive range of row indices on processor p. More... | |
World & | get_world () const |
Returns the associated world. More... | |
bool | is_column_distributed () const |
Returns true if the matrix is column distributed (i.e., row dimension not distributed) More... | |
bool | is_row_distributed () const |
Returns true if the matrix is row distributed (i.e., column dimension not distributed) More... | |
int64_t | local_coldim () const |
Returns the no. of column elements stored on this processor. More... | |
void | local_colrange (int64_t &ilow, int64_t &ihigh) const |
Returns the inclusive range of column indices on this processor. More... | |
int64_t | local_ihigh () const |
Returns the last column index on this processor (-1 if no data present) More... | |
int64_t | local_ilow () const |
Returns the first column index on this processor (0 if no data present) More... | |
int64_t | local_jhigh () const |
Returns the last row index on this processor (0 if no data present) More... | |
int64_t | local_jlow () const |
Returns the first row index on this processor (0 if no data present) More... | |
int64_t | local_rowdim () const |
Returns the no. of row elements stored on this processor. More... | |
void | local_rowrange (int64_t &jlow, int64_t &jhigh) const |
Returns the inclusive range of row indices on this processor. More... | |
int64_t | local_size () const |
Returns the total no. of elements stored on this processor. More... | |
bool | operator== (const DistributedMatrixDistribution &d) const |
ProcessID | owner (int64_t i, int64_t j) const |
Returns the number of the process that owns element (i,j) More... | |
int64_t | process_coldim () const |
Returns the no. of processors in the column dimension. More... | |
int64_t | process_rowdim () const |
Returns the no. of processors in the row dimension. More... | |
int64_t | rowdim () const |
Returns the row dimension of the matrix ... i.e., m for A(n,m) More... | |
int64_t | rowtile () const |
Returns the row tile size. More... | |
Protected Member Functions | |
DistributedMatrixDistribution (World &world, int64_t n, int64_t m, int64_t coltile, int64_t rowtile) | |
Constructs distribution and size info for a matrix (for use by factory functions only) More... | |
Protected Attributes | |
int64_t | idim |
int64_t | ihi |
Range of column indices on this processor. More... | |
int64_t | ilo |
int64_t | jdim |
Dimension of data on this processor. More... | |
int64_t | jhi |
Range of row indices on this processor. More... | |
int64_t | jlo |
int64_t | m |
Row dimension of A(n,m) More... | |
int64_t | n |
Column dimension of A(n,m) More... | |
int64_t | P |
No. of processors. More... | |
int64_t | Pcol |
Column of processor grid for this processor. More... | |
int64_t | Pcoldim |
Column dimension of processor grid. More... | |
int64_t | Prow |
Row of processor grid for this processor. More... | |
int64_t | Prowdim |
Row dimension of processor grid. More... | |
World * | pworld |
ProcessID | rank |
My processor rank. More... | |
int64_t | tilem |
Tile size for row. More... | |
int64_t | tilen |
Tile size for column. More... | |
Friends | |
DistributedMatrixDistribution | column_distributed_matrix_distribution (World &world, int64_t n, int64_t m, int64_t coltile) |
Generates distribution for an (n,m) matrix distributed by columns (row dimension is not distributed) More... | |
template<typename T > | |
class | DistributedMatrix |
DistributedMatrixDistribution | row_distributed_matrix_distribution (World &world, int64_t n, int64_t m, int64_t rowtile) |
Generates an (n,m) matrix distribution distributed by rows (column dimension is not distributed) More... | |
|
inlineprotected |
Constructs distribution and size info for a matrix (for use by factory functions only)
This routine is dumb and just copies the given arguments, hence it can easily make an invalid matrix. The smarts are in the factory functions, hence this constructor is not for general use.
The matrix is tiled over a grid of processes as specified by the tile sizes.
[in] | world | The world |
[in] | n | The matrix column dimension |
[in] | m | The matrix row dimension |
[in] | coltile | Tile size for the columns |
[in] | rowtile | Tile size for the rows |
|
inline |
Default constructor makes an invalid distribution.
|
inlinevirtual |
|
inline |
|
inline |
Returns the column dimension of the matrix ... i.e., n for A(n,m)
References n.
Referenced by madness::DistributedMatrix< T >::extract_columns().
|
inline |
Returns the column tile size.
References tilen.
Referenced by madness::DistributedMatrix< T >::extract_columns(), and owner().
|
inline |
Returns the distribution (aka *this)
Referenced by madness::SCF::kinetic_energy_matrix(), and madness::Kinetic< T, NDIM >::kinetic_energy_matrix().
|
inline |
Returns the inclusive range of column indices on processor p.
If is no data on processor p it returns ilow=0 and ihigh=-1
[in] | p | The processor p of interest |
[out] | ilow | The first column index on the processor |
[out] | ihigh | The last column index on the processor (-1 if none) |
References get_range(), and p().
|
inline |
Returns the inclusive ranges of column and row indicies on processor p.
If is no data on processor p it returns ilow=jlow=0 and ihigh=jhigh=-1
[in] | p | The processor p of interest |
[out] | ilow | The first column index on the processor |
[out] | ihigh | The last column index on the processor (-1 if none) |
[out] | jlow | The first row index on the processor |
[out] | jhigh | The last row index on the processor (-1 if none) |
References m, n, p(), pi, process_coldim(), process_rowdim(), Prowdim, tilem, and tilen.
Referenced by get_colrange(), and get_rowrange().
|
inline |
Returns the inclusive range of row indices on processor p.
If is no data on processor p it returns jlow=0 and jhigh=-1
[in] | p | The processor p of interest |
[out] | jlow | The first row index on the processor |
[out] | jhigh | The last row index on the processor (-1 if none) |
References get_range(), and p().
|
inline |
Returns the associated world.
References pworld.
Referenced by madness::DistributedMatrix< T >::copy_to_replicated(), and madness::DistributedMatrix< T >::copy_to_replicated_patch().
|
inline |
Returns true if the matrix is column distributed (i.e., row dimension not distributed)
References process_rowdim().
Referenced by madness::DistributedMatrix< T >::extract_columns().
|
inline |
Returns true if the matrix is row distributed (i.e., column dimension not distributed)
References process_coldim().
|
inline |
Returns the no. of column elements stored on this processor.
References idim.
|
inline |
|
inline |
Returns the last column index on this processor (-1 if no data present)
References ihi.
|
inline |
Returns the first column index on this processor (0 if no data present)
References ilo.
|
inline |
Returns the last row index on this processor (0 if no data present)
References jhi.
|
inline |
Returns the first row index on this processor (0 if no data present)
References jlo.
|
inline |
Returns the no. of row elements stored on this processor.
References jdim.
|
inline |
|
inline |
Returns the total no. of elements stored on this processor.
Referenced by madness::DistributedMatrix< T >::copy_from_replicated(), and madness::DistributedMatrix< T >::copy_to_replicated().
|
inline |
|
inline |
Returns the number of the process that owns element (i,j)
References coltile(), process_rowdim(), and rowtile().
|
inline |
Returns the no. of processors in the column dimension.
References Pcoldim.
Referenced by get_range(), and is_row_distributed().
|
inline |
Returns the no. of processors in the row dimension.
References Prowdim.
Referenced by get_range(), is_column_distributed(), and owner().
|
inline |
Returns the row dimension of the matrix ... i.e., m for A(n,m)
References m.
Referenced by madness::DistributedMatrix< T >::extract_columns().
|
inline |
|
friend |
Generates distribution for an (n,m) matrix distributed by columns (row dimension is not distributed)
Quietly forces an even column tile size for ease of use in the systolic matrix algorithms
[in] | world | The world |
[in] | n | The column (first) dimension |
[in] | m | The row (second) dimension |
[in] | coltile | Tile size for columns forced to be even (default is to use all processes) |
|
friend |
|
friend |
Generates an (n,m) matrix distribution distributed by rows (column dimension is not distributed)
[in] | world | The world |
[in] | n | The column (first) dimension |
[in] | m | The row (second) dimension |
[in] | rowtile | Tile size for row (default is to use all processes) |
|
protected |
Referenced by madness::DistributedMatrix< T >::DistributedMatrix(), clear(), local_coldim(), local_size(), and operator==().
|
protected |
Range of column indices on this processor.
Referenced by DistributedMatrixDistribution(), clear(), madness::DistributedMatrix< T >::copy_from_replicated(), madness::DistributedMatrix< T >::copy_from_replicated_patch(), madness::DistributedMatrix< T >::copy_to_replicated(), madness::DistributedMatrix< T >::copy_to_replicated_patch(), madness::DistributedMatrix< T >::extract_columns(), madness::DistributedMatrix< T >::fill(), local_colrange(), local_ihigh(), and operator==().
|
protected |
Referenced by DistributedMatrixDistribution(), clear(), madness::DistributedMatrix< T >::copy_from_replicated(), madness::DistributedMatrix< T >::copy_from_replicated_patch(), madness::DistributedMatrix< T >::copy_to_replicated(), madness::DistributedMatrix< T >::copy_to_replicated_patch(), madness::DistributedMatrix< T >::extract_columns(), madness::DistributedMatrix< T >::fill(), madness::DistributedMatrix< T >::get(), local_colrange(), local_ilow(), operator==(), and madness::DistributedMatrix< T >::set().
|
protected |
Dimension of data on this processor.
Referenced by madness::DistributedMatrix< T >::DistributedMatrix(), clear(), local_rowdim(), local_size(), and operator==().
|
protected |
Range of row indices on this processor.
Referenced by DistributedMatrixDistribution(), clear(), madness::DistributedMatrix< T >::copy_from_replicated(), madness::DistributedMatrix< T >::copy_from_replicated_patch(), madness::DistributedMatrix< T >::copy_to_replicated(), madness::DistributedMatrix< T >::copy_to_replicated_patch(), madness::DistributedMatrix< T >::extract_columns(), madness::DistributedMatrix< T >::fill(), madness::DistributedMatrix< T >::get(), local_jhigh(), local_rowrange(), operator==(), and madness::DistributedMatrix< T >::set().
|
protected |
Referenced by DistributedMatrixDistribution(), clear(), madness::DistributedMatrix< T >::copy_from_replicated(), madness::DistributedMatrix< T >::copy_from_replicated_patch(), madness::DistributedMatrix< T >::copy_to_replicated(), madness::DistributedMatrix< T >::copy_to_replicated_patch(), madness::DistributedMatrix< T >::extract_columns(), madness::DistributedMatrix< T >::fill(), madness::DistributedMatrix< T >::get(), local_jlow(), local_rowrange(), operator==(), and madness::DistributedMatrix< T >::set().
|
protected |
Row dimension of A(n,m)
Referenced by clear(), get_range(), operator==(), and rowdim().
|
protected |
Column dimension of A(n,m)
Referenced by clear(), coldim(), get_range(), and operator==().
|
protected |
No. of processors.
Referenced by clear(), and operator==().
|
protected |
Column of processor grid for this processor.
Referenced by clear(), and operator==().
|
protected |
Column dimension of processor grid.
Referenced by clear(), operator==(), and process_coldim().
|
protected |
Row of processor grid for this processor.
Referenced by clear(), and operator==().
|
protected |
Row dimension of processor grid.
Referenced by clear(), get_range(), operator==(), and process_rowdim().
|
protected |
Referenced by clear(), get_world(), and operator==().
|
protected |
My processor rank.
Referenced by clear(), and operator==().
|
protected |
Tile size for row.
Referenced by clear(), get_range(), operator==(), and rowtile().
|
protected |
Tile size for column.
Referenced by clear(), coltile(), get_range(), and operator==().