![]() |
SG++-Doxygen-Documentation
|
Class to represent a DataMatrix which is distributed on a process grid. More...
#include <DataMatrixDistributed.hpp>
Public Types | |
enum class | DTYPE : int { DENSE = 1 , TRIDIAG_COEFFICIENT = 501 , TRIDIAG_RHS = 502 , OUT_OF_CORE = 602 } |
Enum for the datatypes of scalapack matrices, see http://netlib.org/scalapack/slug/node73.html. More... | |
enum class | TRIANGULAR { LOWER , UPPER } |
Enum that specifies the lower or upper triangular part of a matrix. More... | |
Public Member Functions | |
void | add (const DataMatrixDistributed &a) |
Adds the values from another DataMatrix to the current values. | |
void | copyFrom (const DataMatrixDistributed &other) |
Copies all values of another distributed data matrix to this object, resizes this object to the size of the other matrix. | |
DataMatrixDistributed () | |
Creates an empty DataMatrixDistributed object. | |
DataMatrixDistributed (double *input, std::shared_ptr< BlacsProcessGrid > grid, size_t globalRows, size_t globalColumns, size_t rowBlockSize, size_t columnBlockSize, DTYPE dtype=DTYPE::DENSE) | |
Creates an two-dimensional DataMatrixDistributed with the specified input. | |
DataMatrixDistributed (std::shared_ptr< BlacsProcessGrid > grid, size_t globalRows, size_t globalColumns, size_t rowBlockSize, size_t columnBlockSize, double value=0.0, DTYPE dtype=DTYPE::DENSE) | |
Creates an two-dimensional DataMatrixDistributed filled with a value. | |
void | distribute (const double *matrix, int masterRow=0, int masterCol=0) |
Distribute the matrix from the master on the process grid according to the 2d block cyclic scheme used in scalapack. | |
double | get (size_t row, size_t col) const |
Returns the value of the element at position [row,col]. | |
size_t | getColumnBlockSize () const |
int * | getDescriptor () |
const int * | getDescriptor () const |
size_t | getGlobalCols () const |
Returns the number of columns of the DataMatrix. | |
size_t | getGlobalRows () const |
Returns the number of rows of the DataMatrix. | |
size_t | getLocalColumns () const |
double * | getLocalPointer () |
const double * | getLocalPointer () const |
size_t | getLocalRows () const |
std::shared_ptr< BlacsProcessGrid > | getProcessGrid () const |
size_t | getRowBlockSize () const |
size_t | globalToColumnProcessIndex (size_t globalColumnIndex) const |
Calculates the column process index from the global column index. | |
size_t | globalToLocalColumnIndex (size_t globalColumnIndex) const |
Calculates the local column index from the globalColumnIndex. | |
size_t | globalToLocalRowIndex (size_t globalRowIndex) const |
Calculates the local row index from the globalRowIndex. | |
size_t | globalToRowProcessIndex (size_t globalRowIndex) const |
Calculates the row process index from the global row index. | |
bool | isProcessMapped () const |
size_t | localToGlobalColumnIndex (size_t localColumnIndex) const |
Calculates the global column index from the local column index. | |
size_t | localToGlobalRowIndex (size_t localRowIndex) const |
Calculates the global row index from the local row index. | |
void | mult (const DataMatrixDistributed &b, DataMatrixDistributed &c, bool transposeA=false, bool transposeB=false, double alpha=1.0, double beta=0.0) const |
Uses PBLAS to multiply this matrix with matrix B: | |
void | mult (const DataVectorDistributed &x, DataVectorDistributed &y, bool transpose=false, double alpha=1.0, double beta=0.0) const |
Multiplies the matrix with a vector x and stores the result in another vector y. | |
double | operator() (size_t row, size_t col) const |
Returns the value of the element at position [row,col]. | |
void | printMatrix () const |
Prints the matrix on stdout on process 0. | |
void | resize (size_t rows, size_t cols) |
Resizes the matrix to rows and cols, data is discarded. | |
void | set (size_t row, size_t col, double value) |
Sets the element at global position [row,col] to value. | |
void | setAll (double value) |
Set all entries of the matrix to one value. | |
void | sub (const DataMatrixDistributed &a) |
Subtracts the values from another DataMatrix of the current values. | |
DataMatrix | toLocalDataMatrix () const |
void | toLocalDataMatrix (DataMatrix &localMatrix) const |
DataMatrix | toLocalDataMatrixBroadcast () const |
void | toLocalDataMatrixBroadcast (DataMatrix &localMatrix) const |
DataVectorDistributed | toVector () const |
Convert this matrix to a vector. | |
DataMatrixDistributed | transpose () |
Transposes this matrix. | |
Static Public Member Functions | |
static void | add (DataMatrixDistributed &c, const DataMatrixDistributed &a, bool transposeA=false, double beta=1.0, double alpha=1.0) |
Calculates sub(C):=beta*sub(C) + alpha*op(sub(A)) | |
static DataMatrixDistributed | fromSharedData (const double *input, std::shared_ptr< BlacsProcessGrid > grid, size_t globalRows, size_t globalColumns, size_t rowBlockSize, size_t columnBlockSize, DTYPE dtype=DTYPE::DENSE) |
Creates a distributed data matrix from data which is already shared (mirrored) on each process. | |
static void | mult (const DataMatrixDistributed &a, const DataMatrixDistributed &b, DataMatrixDistributed &c, bool transposeA=false, bool transposeB=false, double alpha=1.0, double beta=0.0) |
Uses BLAS to multiply matrix A with matrix B: | |
static void | mult (const DataMatrixDistributed &a, const DataVectorDistributed &x, DataVectorDistributed &y, bool transpose=false, double alpha=1.0, double beta=0.0) |
Multiplies matrix A with a vector x and stores the result in another vector y. | |
static void | solveCholesky (const DataMatrixDistributed &l, DataVectorDistributed &b, TRIANGULAR uplo=TRIANGULAR::LOWER) |
Solves a linear system of equations Ax=b using a previously computed Cholesky decomposition A=LL^T. | |
static void | sub (DataMatrixDistributed &c, const DataMatrixDistributed &a, bool transposeA=false, double beta=1.0, double alpha=1.0) |
Calculates sub(C):=beta*sub(C) - alpha*op(sub(A)) | |
static void | transpose (const DataMatrixDistributed &a, DataMatrixDistributed &c, double alpha=1.0, double beta=0.0) |
Transposes matrix A and stores the result in C: sub(C):=beta*sub(C) + alpha*sub(A)'. | |
Class to represent a DataMatrix which is distributed on a process grid.
The class provides a wrapper for ScaLAPACK methods on the matrix. See http://netlib.org/scalapack/slug/node76.html for information regarding the distribution scheme.
|
strong |
Enum for the datatypes of scalapack matrices, see http://netlib.org/scalapack/slug/node73.html.
Enumerator | |
---|---|
DENSE | |
TRIDIAG_COEFFICIENT | |
TRIDIAG_RHS | |
OUT_OF_CORE |
|
strong |
sgpp::datadriven::DataMatrixDistributed::DataMatrixDistributed | ( | ) |
Creates an empty DataMatrixDistributed object.
Warning: This object cannot be used.
Referenced by transpose().
sgpp::datadriven::DataMatrixDistributed::DataMatrixDistributed | ( | std::shared_ptr< BlacsProcessGrid > | grid, |
size_t | globalRows, | ||
size_t | globalColumns, | ||
size_t | rowBlockSize, | ||
size_t | columnBlockSize, | ||
double | value = 0.0 , |
||
DataMatrixDistributed::DTYPE | dtype = DTYPE::DENSE |
||
) |
Creates an two-dimensional DataMatrixDistributed filled with a value.
grid | BLACS process grid this matrix will be distributed on |
globalRows | number of global rows of the matrix |
globalColumns | number of global columns of the matrix |
rowBlockSize | block size in the row dimension |
columnBlockSize | block size in the column dimension |
value | initial value for all elements of the matrix, default 0 |
dtype | datatype of the matrix, default DENSE |
References sgpp::datadriven::csrc_, sgpp::datadriven::ctxt_, sgpp::datadriven::dtype_, isProcessMapped(), sgpp::datadriven::lld_, sgpp::datadriven::m_, sgpp::datadriven::mb_, sgpp::datadriven::n_, sgpp::datadriven::nb_, and sgpp::datadriven::rsrc_.
sgpp::datadriven::DataMatrixDistributed::DataMatrixDistributed | ( | double * | input, |
std::shared_ptr< BlacsProcessGrid > | grid, | ||
size_t | globalRows, | ||
size_t | globalColumns, | ||
size_t | rowBlockSize, | ||
size_t | columnBlockSize, | ||
DataMatrixDistributed::DTYPE | dtype = DTYPE::DENSE |
||
) |
Creates an two-dimensional DataMatrixDistributed with the specified input.
Call this matrix on all processes in the grid to ensure proper initialization.
input | pointer to data that will be distributed |
grid | BLACS process grid this matrix will be distributed on |
globalRows | number of global rows of the matrix |
globalColumns | number of global columns of the matrix |
rowBlockSize | block size in the row dimension |
columnBlockSize | block size in the column dimension |
dtype | datatype of the matrix, default DENSE |
References distribute(), and isProcessMapped().
void sgpp::datadriven::DataMatrixDistributed::add | ( | const DataMatrixDistributed & | a | ) |
|
static |
Calculates sub(C):=beta*sub(C) + alpha*op(sub(A))
c | matrix C |
a | matrix A |
transposeA | transpose matrix A if true, default false |
beta | scalar factor for matrix C, default 1.0 |
alpha | scalar factor for matrix A, default 1.0 |
References alpha, getDescriptor(), getGlobalCols(), getGlobalRows(), getLocalPointer(), isProcessMapped(), sgpp::datadriven::pblasNoTranspose, and sgpp::datadriven::pblasTranspose.
void sgpp::datadriven::DataMatrixDistributed::copyFrom | ( | const DataMatrixDistributed & | other | ) |
Copies all values of another distributed data matrix to this object, resizes this object to the size of the other matrix.
References sgpp::datadriven::lld_, sgpp::datadriven::m_, and sgpp::datadriven::n_.
Referenced by sgpp::datadriven::DataVectorDistributed::copyFrom().
void sgpp::datadriven::DataMatrixDistributed::distribute | ( | const double * | matrix, |
int | masterRow = 0 , |
||
int | masterCol = 0 |
||
) |
Distribute the matrix from the master on the process grid according to the 2d block cyclic scheme used in scalapack.
More information: http://www.netlib.org/scalapack/slug/node76.html
matrix | Pointer to the local matrix, only relevant for the master process |
masterRow | row coordinate of the master process, default 0 |
masterCol | col coordinate of the master process, default 0 |
References getLocalPointer().
Referenced by DataMatrixDistributed(), sgpp::datadriven::DataVectorDistributed::distribute(), and sgpp::datadriven::DBMatDMSChol::solveParallel().
|
static |
Creates a distributed data matrix from data which is already shared (mirrored) on each process.
Avoids network transfers.
input | pointer to data that will be distributed |
grid | BLACS process grid this matrix will be distributed on |
globalRows | number of global rows of the matrix |
globalColumns | number of global columns of the matrix |
rowBlockSize | block size in the row dimension |
columnBlockSize | block size in the column dimension |
dtype | datatype of the matrix, default DENSE |
References getLocalPointer().
Referenced by sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOfflineChol::decomposeMatrixParallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::getUnmodifiedRDistributed(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), sgpp::datadriven::DBMatOffline::syncDistributedDecomposition(), sgpp::datadriven::DBMatOfflineOrthoAdapt::syncDistributedDecomposition(), sgpp::datadriven::DBMatOnlineDE_SMW::syncDistributedDecomposition(), sgpp::datadriven::DBMatOnlineDEOrthoAdapt::syncDistributedDecomposition(), sgpp::datadriven::DBMatOffline::syncDistributedInverse(), sgpp::datadriven::DBMatOfflineOrthoAdapt::updateRegularizationParallel(), and sgpp::datadriven::DBMatOnlineDE_SMW::updateSystemMatrixDecompositionParallel().
double sgpp::datadriven::DataMatrixDistributed::get | ( | size_t | row, |
size_t | col | ||
) | const |
Returns the value of the element at position [row,col].
row | Row |
col | Column |
References getLocalPointer(), and isProcessMapped().
Referenced by sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), sgpp::datadriven::DataVectorDistributed::get(), and operator()().
size_t sgpp::datadriven::DataMatrixDistributed::getColumnBlockSize | ( | ) | const |
Referenced by sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel().
int * sgpp::datadriven::DataMatrixDistributed::getDescriptor | ( | ) |
Referenced by add(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), sgpp::datadriven::DataVectorDistributed::getDescriptor(), sgpp::datadriven::DataVectorDistributed::getDescriptor(), mult(), mult(), python.uq.parameters.ParameterBuilder.GeneralParameterBuilder::new(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), solveCholesky(), and transpose().
const int * sgpp::datadriven::DataMatrixDistributed::getDescriptor | ( | ) | const |
Referenced by python.uq.parameters.ParameterBuilder.GeneralParameterBuilder::new().
size_t sgpp::datadriven::DataMatrixDistributed::getGlobalCols | ( | ) | const |
Returns the number of columns of the DataMatrix.
Referenced by add(), sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOnlineDE::computeWeightedBFromBatchParallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), sgpp::datadriven::DataVectorDistributed::getGlobalRows(), mult(), resize(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), sgpp::datadriven::DBMatDMS_SMW::solveParallel(), sgpp::datadriven::DBMatDMSOrthoAdapt::solveParallel(), and transpose().
size_t sgpp::datadriven::DataMatrixDistributed::getGlobalRows | ( | ) | const |
Returns the number of rows of the DataMatrix.
Referenced by add(), sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), mult(), mult(), resize(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), solveCholesky(), sgpp::datadriven::DBMatDMS_SMW::solveParallel(), sgpp::datadriven::DBMatDMSOrthoAdapt::solveParallel(), and transpose().
size_t sgpp::datadriven::DataMatrixDistributed::getLocalColumns | ( | ) | const |
Referenced by sgpp::datadriven::DataVectorDistributed::getLocalRows().
double * sgpp::datadriven::DataMatrixDistributed::getLocalPointer | ( | ) |
Referenced by add(), sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOfflineChol::decomposeMatrixParallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), distribute(), fromSharedData(), get(), sgpp::datadriven::DataVectorDistributed::getLocalPointer(), sgpp::datadriven::DataVectorDistributed::getLocalPointer(), mult(), mult(), set(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), solveCholesky(), and transpose().
const double * sgpp::datadriven::DataMatrixDistributed::getLocalPointer | ( | ) | const |
size_t sgpp::datadriven::DataMatrixDistributed::getLocalRows | ( | ) | const |
std::shared_ptr< BlacsProcessGrid > sgpp::datadriven::DataMatrixDistributed::getProcessGrid | ( | ) | const |
Referenced by sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), sgpp::datadriven::DataVectorDistributed::getProcessGrid(), and sgpp::datadriven::DBMatDMSChol::solveParallel().
size_t sgpp::datadriven::DataMatrixDistributed::getRowBlockSize | ( | ) | const |
Referenced by sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), and sgpp::datadriven::DataVectorDistributed::getBlockSize().
size_t sgpp::datadriven::DataMatrixDistributed::globalToColumnProcessIndex | ( | size_t | globalColumnIndex | ) | const |
Calculates the column process index from the global column index.
globalColumnIndex |
Referenced by sgpp::datadriven::DataVectorDistributed::globalToRowProcessIndex().
size_t sgpp::datadriven::DataMatrixDistributed::globalToLocalColumnIndex | ( | size_t | globalColumnIndex | ) | const |
Calculates the local column index from the globalColumnIndex.
globalColumnIndex |
Referenced by sgpp::datadriven::DataVectorDistributed::globalToLocalRowIndex().
size_t sgpp::datadriven::DataMatrixDistributed::globalToLocalRowIndex | ( | size_t | globalRowIndex | ) | const |
Calculates the local row index from the globalRowIndex.
globalRowIndex |
size_t sgpp::datadriven::DataMatrixDistributed::globalToRowProcessIndex | ( | size_t | globalRowIndex | ) | const |
Calculates the row process index from the global row index.
globalRowIndex |
bool sgpp::datadriven::DataMatrixDistributed::isProcessMapped | ( | ) | const |
Referenced by add(), DataMatrixDistributed(), DataMatrixDistributed(), get(), sgpp::datadriven::DataVectorDistributed::isProcessMapped(), mult(), mult(), resize(), setAll(), solveCholesky(), toLocalDataMatrix(), toLocalDataMatrix(), toLocalDataMatrixBroadcast(), toLocalDataMatrixBroadcast(), and transpose().
size_t sgpp::datadriven::DataMatrixDistributed::localToGlobalColumnIndex | ( | size_t | localColumnIndex | ) | const |
Calculates the global column index from the local column index.
localColumnIndex |
Referenced by sgpp::datadriven::DataVectorDistributed::localToGlobalRowIndex().
size_t sgpp::datadriven::DataMatrixDistributed::localToGlobalRowIndex | ( | size_t | localRowIndex | ) | const |
Calculates the global row index from the local row index.
localRowIndex |
|
static |
Uses BLAS to multiply matrix A with matrix B:
sub(C) := alpha*op(sub(A))*op(sub(B)) + beta*sub(C)
[in] | a | matrix A |
[in] | b | matrix B |
[in,out] | c | used as output matrix C, can also be added to the product using factor beta |
[in] | transposeA | Whether or not to transpose this matrix |
[in] | transposeB | Whether or not to transpose matrix B |
[in] | alpha | factor alpha, default 1.0 |
[in] | beta | factor beta, default 0.0 |
References alpha, getDescriptor(), getGlobalRows(), getLocalPointer(), isProcessMapped(), sgpp::datadriven::pblasNoTranspose, and sgpp::datadriven::pblasTranspose.
|
static |
Multiplies matrix A with a vector x and stores the result in another vector y.
sub(y) := alpha*sub(A)'*sub(x) + beta*sub(y)
[in] | a | matrix to be multiplied |
[in] | x | vector to be multiplied |
[in,out] | y | vector in which the result should be stored |
[in] | transpose | transpose if true, default false |
[in] | alpha | factor alpha, default 1.0 |
[in] | beta | factor beta, default 0.0 |
References getDescriptor(), sgpp::datadriven::DataVectorDistributed::getDescriptor(), getGlobalCols(), getGlobalRows(), getLocalPointer(), sgpp::datadriven::DataVectorDistributed::getLocalPointer(), isProcessMapped(), sgpp::datadriven::DataVectorDistributed::isProcessMapped(), sgpp::datadriven::pblasNoTranspose, sgpp::datadriven::pblasTranspose, and transpose().
void sgpp::datadriven::DataMatrixDistributed::mult | ( | const DataMatrixDistributed & | b, |
DataMatrixDistributed & | c, | ||
bool | transposeA = false , |
||
bool | transposeB = false , |
||
double | alpha = 1.0 , |
||
double | beta = 0.0 |
||
) | const |
Uses PBLAS to multiply this matrix with matrix B:
sub(C) := alpha*op(sub(this))*op(sub(B)) + beta*sub(C)
[in] | b | matrix B |
[in,out] | c | used as output matrix C, can also be added to the product using factor beta |
[in] | transposeA | Whether or not to transpose this matrix |
[in] | transposeB | Whether or not to transpose matrix B |
[in] | alpha | factor alpha, default 1.0 |
[in] | beta | factor beta, default 0.0 |
void sgpp::datadriven::DataMatrixDistributed::mult | ( | const DataVectorDistributed & | x, |
DataVectorDistributed & | y, | ||
bool | transpose = false , |
||
double | alpha = 1.0 , |
||
double | beta = 0.0 |
||
) | const |
Multiplies the matrix with a vector x and stores the result in another vector y.
sub(y) := alpha*sub(this)'*sub(x) + beta*sub(y)
[in] | x | vector to be multiplied |
[in,out] | y | vector in which the result should be stored |
[in] | transpose | transpose if true, default false |
[in] | alpha | factor alpha, default 1.0 |
[in] | beta | factor beta, default 0.0 |
References alpha, mult(), and transpose().
Referenced by sgpp::datadriven::DBMatOfflineOrthoAdapt::compute_inverse_parallel(), sgpp::datadriven::ModelFittingDensityEstimationOnOffParallel::computeResidual(), mult(), mult(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), sgpp::datadriven::DBMatDMS_SMW::solveParallel(), and sgpp::datadriven::DBMatDMSOrthoAdapt::solveParallel().
double sgpp::datadriven::DataMatrixDistributed::operator() | ( | size_t | row, |
size_t | col | ||
) | const |
Returns the value of the element at position [row,col].
Only a const version exists as setting an element is not necessarily done in local memory.
row | Row |
col | Column |
References get().
void sgpp::datadriven::DataMatrixDistributed::printMatrix | ( | ) | const |
Prints the matrix on stdout on process 0.
References toLocalDataMatrix(), and sgpp::base::DataMatrix::toString().
void sgpp::datadriven::DataMatrixDistributed::resize | ( | size_t | rows, |
size_t | cols | ||
) |
Resizes the matrix to rows and cols, data is discarded.
rows | |
cols |
References getGlobalCols(), getGlobalRows(), isProcessMapped(), sgpp::datadriven::lld_, sgpp::datadriven::m_, and sgpp::datadriven::n_.
Referenced by sgpp::datadriven::DataVectorDistributed::resize().
void sgpp::datadriven::DataMatrixDistributed::set | ( | size_t | row, |
size_t | col, | ||
double | value | ||
) |
Sets the element at global position [row,col] to value.
row | Global row |
col | Global column |
value | New value for element |
References getLocalPointer().
Referenced by sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), sgpp::datadriven::DataVectorDistributed::set(), and sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel().
void sgpp::datadriven::DataMatrixDistributed::setAll | ( | double | value | ) |
Set all entries of the matrix to one value.
value |
References isProcessMapped().
Referenced by sgpp::datadriven::DataVectorDistributed::setAll().
|
static |
Solves a linear system of equations Ax=b using a previously computed Cholesky decomposition A=LL^T.
[in] | l | lower triangular matrix L of the Cholesky decomposition |
[in,out] | b | vector b of the linear system, is overwritten with solution x |
[in] | uplo | storage format of the triangular matrix, either upper or lower triangular |
References getDescriptor(), getGlobalRows(), getLocalPointer(), isProcessMapped(), LOWER, sgpp::datadriven::lowerTriangular, and sgpp::datadriven::upperTriangular.
Referenced by sgpp::datadriven::DBMatDMSChol::solveParallel().
void sgpp::datadriven::DataMatrixDistributed::sub | ( | const DataMatrixDistributed & | a | ) |
Subtracts the values from another DataMatrix of the current values.
Modifies the current values.
a | The DataMatrix which is subtracted from the current values |
References sub().
Referenced by sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), and sub().
|
static |
DataMatrix sgpp::datadriven::DataMatrixDistributed::toLocalDataMatrix | ( | ) | const |
References isProcessMapped().
Referenced by sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), printMatrix(), sgpp::datadriven::DBMatDMSChol::solveParallel(), sgpp::datadriven::DataVectorDistributed::toLocalDataVector(), sgpp::datadriven::DataVectorDistributed::toLocalDataVector(), and toVector().
void sgpp::datadriven::DataMatrixDistributed::toLocalDataMatrix | ( | DataMatrix & | localMatrix | ) | const |
[out] | localMatrix | the gathered DataMatrix as a normal, not distributed, DataMatrix. Result can only be used on the master process. |
References isProcessMapped().
DataMatrix sgpp::datadriven::DataMatrixDistributed::toLocalDataMatrixBroadcast | ( | ) | const |
References isProcessMapped().
Referenced by sgpp::datadriven::DBMatOfflineChol::decomposeMatrixParallel(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), sgpp::datadriven::DataVectorDistributed::toLocalDataVectorBroadcast(), and sgpp::datadriven::DataVectorDistributed::toLocalDataVectorBroadcast().
void sgpp::datadriven::DataMatrixDistributed::toLocalDataMatrixBroadcast | ( | DataMatrix & | localMatrix | ) | const |
[out] | localMatrix | the whole DataMatrix is broadcasted to all processes in the grid |
References isProcessMapped().
DataVectorDistributed sgpp::datadriven::DataMatrixDistributed::toVector | ( | ) | const |
Convert this matrix to a vector.
This operation is only possible if either globalRows or globalColumns equals one.
References toLocalDataMatrix().
DataMatrixDistributed sgpp::datadriven::DataMatrixDistributed::transpose | ( | ) |
Transposes this matrix.
References DataMatrixDistributed(), and transpose().
Referenced by sgpp::datadriven::DBMatOfflineChol::compute_inverse_parallel(), sgpp::datadriven::DBMatOfflineChol::decomposeMatrixParallel(), sgpp::datadriven::DBMatOfflineOrthoAdapt::decomposeMatrixParallel(), mult(), mult(), sgpp::datadriven::DBMatOnlineDE_SMW::smw_adapt_parallel(), and transpose().
|
static |
Transposes matrix A and stores the result in C: sub(C):=beta*sub(C) + alpha*sub(A)'.
[in] | a | matrix A to transpose |
[out] | c | result matrix C |
[in] | alpha | factor for matrix A, default 1.0 |
[in] | beta | factor for matrix C, default 0.0 |
References alpha, getDescriptor(), getGlobalCols(), getGlobalRows(), getLocalPointer(), and isProcessMapped().