MOOCHO (Single Doxygen Collection)
Version of the Day
|
Base class for all matrices implemented in a shared memory address space. More...
#include <AbstractLinAlgPack_MatrixOpSerial.hpp>
Private Attributes | |
VectorSpaceSerial | space_cols_ |
VectorSpaceSerial | space_rows_ |
Level-1 BLAS | |
virtual void | Mp_StM (DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const |
gms_lhs += alpha * op(M_rhs) (BLAS xAXPY) More... | |
virtual void | Mp_StMtP (DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans) const |
gms_lhs += alpha * op(M_rhs) * op(P_rhs) More... | |
virtual void | Mp_StPtM (DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, BLAS_Cpp::Transp M_trans) const |
gms_lhs += alpha * op(P) * op(M_rhs) More... | |
virtual void | Mp_StPtMtP (DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans) const |
gms_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2) More... | |
Level-2 BLAS | |
virtual void | Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const =0 |
vs_lhs = alpha * op(M_rhs1) * vs_rhs2 + beta * vs_lhs (BLAS xGEMV) More... | |
virtual void | Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta) const |
vs_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * vs_lhs (BLAS xGEMV) More... | |
virtual void | Vp_StPtMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const DVectorSlice &vs_rhs3, value_type beta) const |
vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * vs_rhs3 + beta * vs_rhs More... | |
virtual void | Vp_StPtMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta) const |
vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * vs_rhs More... | |
virtual value_type | transVtMtV (const DVectorSlice &vs_rhs1, BLAS_Cpp::Transp trans_rhs2, const DVectorSlice &vs_rhs3) const |
result = vs_rhs1' * op(M_rhs2) * vs_rhs3 More... | |
virtual void | syr2k (BLAS_Cpp::Transp M_trans, value_type alpha, const GenPermMatrixSlice &P1, BLAS_Cpp::Transp P1_trans, const GenPermMatrixSlice &P2, BLAS_Cpp::Transp P2_trans, value_type beta, DMatrixSliceSym *sym_lhs) const |
Perform a specialized rank-2k update of a dense symmetric matrix of the form: More... | |
Level-3 BLAS | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(M_rhs1) * op(gms_rhs2) + beta * gms_lhs (right) (xGEMM) More... | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(gms_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xGEMM) More... | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(M_rhs1) * op(mwo_rhs2) + beta * gms_lhs (right) (xGEMM) More... | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DMatrixSliceSym &sym_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(M_rhs1) * op(sym_rhs2) + beta * gms_lhs (right) (xSYMM) More... | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSliceSym &sym_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(sym_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xSYMM) More... | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DMatrixSliceTri &tri_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(M_rhs1) * op(tri_rhs2) + beta * gms_lhs (right) (xTRMM) More... | |
virtual void | Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSliceTri &tri_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
gms_lhs = alpha * op(tri_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xTRMM) More... | |
virtual void | syrk (BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, DMatrixSliceSym *sym_lhs) const |
Perform a rank-k update of a dense symmetric matrix of the form: More... | |
Additional Inherited Members | |
Public Types inherited from AbstractLinAlgPack::MatrixOp | |
enum | EMatNormType { MAT_NORM_INF, MAT_NORM_2, MAT_NORM_1, MAT_NORM_FORB } |
Type of matrix norm. More... | |
Public Member Functions inherited from AbstractLinAlgPack::MatrixOp | |
virtual void | zero_out () |
M_lhs = 0 : Zero out the matrix. More... | |
virtual void | Mt_S (value_type alpha) |
M_lhs *= alpha : Multiply a matrix by a scalar. More... | |
virtual MatrixOp & | operator= (const MatrixOp &mwo_rhs) |
M_lhs = mwo_rhs : Virtual assignment operator. More... | |
virtual mat_mut_ptr_t | clone () |
Clone the non-const matrix object (if supported). More... | |
virtual mat_ptr_t | clone () const |
Clone the const matrix object (if supported). More... | |
const MatNorm | calc_norm (EMatNormType requested_norm_type=MAT_NORM_1, bool allow_replacement=false) const |
Compute a norm of this matrix. More... | |
virtual mat_ptr_t | sub_view (const Range1D &row_rng, const Range1D &col_rng) const |
Create a transient constant sub-matrix view of this matrix (if supported). More... | |
mat_ptr_t | sub_view (const index_type &rl, const index_type &ru, const index_type &cl, const index_type &cu) const |
Inlined implementation calls this->sub_view(Range1D(rl,ru),Range1D(cl,cu)) . More... | |
virtual mat_ptr_t | perm_view (const Permutation *P_row, const index_type row_part[], int num_row_part, const Permutation *P_col, const index_type col_part[], int num_col_part) const |
Create a permuted view: M_perm = P_row' * M * P_col . More... | |
virtual mat_ptr_t | perm_view_update (const Permutation *P_row, const index_type row_part[], int num_row_part, const Permutation *P_col, const index_type col_part[], int num_col_part, const mat_ptr_t &perm_view) const |
Reinitialize a permuted view: M_perm = P_row' * M * P_col . More... | |
Public Member Functions inherited from AbstractLinAlgPack::MatrixBase | |
virtual | ~MatrixBase () |
Virtual destructor. More... | |
virtual size_type | rows () const |
Return the number of rows in the matrix. More... | |
virtual size_type | cols () const |
Return the number of columns in the matrix. More... | |
virtual size_type | nz () const |
Return the number of nonzero elements in the matrix. More... | |
Protected Member Functions inherited from AbstractLinAlgPack::MatrixOp | |
virtual bool | Mp_StM (value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs) |
M_lhs += alpha * op(mwo_rhs) (BLAS xAXPY). More... | |
virtual bool | Mp_StMtP (value_type alpha, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans) |
M_lhs += alpha * op(mwo_rhs) * op(P_rhs). More... | |
virtual bool | Mp_StPtM (value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans) |
M_lhs += alpha * op(P_rhs) * op(mwo_rhs). More... | |
virtual bool | Mp_StPtMtP (value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans) |
M_lhs += alpha * op(P_rhs1) * op(mwo_rhs) * op(P_rhs2). More... | |
virtual bool | Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
mwo_lhs = alpha * op(mwo_rhs1) * op(M_rhs2) + beta * mwo_lhs (right) (xGEMM) More... | |
virtual bool | Mp_StMtM (value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) |
M_lhs = alpha * op(mwo_rhs1) * op(mwo_rhs2) + beta * mwo_lhs (left) (xGEMM) More... | |
virtual bool | syrk (const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta) |
Perform a rank-k update of a symmetric matrix of the form: More... | |
Base class for all matrices implemented in a shared memory address space.
This base class inherites from AbstractLinAlgPack::MatrixOp
and provides a means of transition from purely abstract (i.e. parallel, out-of-core) linear algebra to serial linear algebra (with explicit dense vectors and matrices.
This matrix subclass simply uses dynamic_cast<>
to map from the abstract interfaces AbstractLinAlgPack::Vector
, AbstractLinAlgPack::VectorMutable
, AbstractLinAlgPack::MatrixOp
to a concreate types using a few standarized serial interfaces VectorGetSparse
, VectorMutableDense
... If these interfaces are not supported by the vector and matrix arguments, then exceptions may be thrown.
Note that every method from MatrixOp
is not overridden here. Specifically, the methods MatrixOp::zero_out()
and MatrixOp::sub_view()
are not overridden. These methods have default implementations that should be sufficient for most uses but subclasses may want to provide specialized implementations anyway.
These methods should not be called directly but instead through a set of provided nonmember functions.
ToDo: Finish documentation!
Definition at line 77 of file AbstractLinAlgPack_MatrixOpSerial.hpp.
|
virtual |
gms_lhs += alpha * op(M_rhs) (BLAS xAXPY)
Definition at line 72 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs += alpha * op(M_rhs) * op(P_rhs)
Definition at line 92 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs += alpha * op(P) * op(M_rhs)
Definition at line 101 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2)
Definition at line 110 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
pure virtual |
vs_lhs = alpha * op(M_rhs1) * vs_rhs2 + beta * vs_lhs (BLAS xGEMV)
Implemented in AbstractLinAlgPack::MultiVectorMutableDense, and AbstractLinAlgPack::MatrixSymDiagSparse.
|
virtual |
vs_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * vs_lhs (BLAS xGEMV)
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense.
Definition at line 122 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * vs_rhs3 + beta * vs_rhs
Definition at line 145 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * vs_rhs
Definition at line 159 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
result = vs_rhs1' * op(M_rhs2) * vs_rhs3
Definition at line 173 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Perform a specialized rank-2k update of a dense symmetric matrix of the form:
#sym_lhs += alpha*op(P1')*op(M)*op(P2) + alpha*op(P2')*op(M')*op(P1) + beta*sym_lhs#
The reason that this operation is being classified as a level-2 operation is that the total flops should be of O(n^2) and not O(n^2*k).
The default implementation is based on Mp_StMtP(...)# and Mp_StPtM(...)#. Of course in situations where this default implemention is inefficient the subclass should override this method.
Definition at line 200 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(M_rhs1) * op(gms_rhs2) + beta * gms_lhs (right) (xGEMM)
Definition at line 297 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(gms_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xGEMM)
Definition at line 315 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(M_rhs1) * op(mwo_rhs2) + beta * gms_lhs (right) (xGEMM)
Definition at line 333 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(M_rhs1) * op(sym_rhs2) + beta * gms_lhs (right) (xSYMM)
Definition at line 357 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(sym_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xSYMM)
Definition at line 364 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(M_rhs1) * op(tri_rhs2) + beta * gms_lhs (right) (xTRMM)
Definition at line 370 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
gms_lhs = alpha * op(tri_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xTRMM)
Definition at line 377 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Perform a rank-k update of a dense symmetric matrix of the form:
#sym_lhs += op(M)*op(M') + beta*sym_lhs#
The default implementation is based on Vp_StMtV(...)#. Of course in situations where this default implemention is inefficient the subclass should override this method.
Definition at line 383 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Implements AbstractLinAlgPack::MatrixBase.
Definition at line 439 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Implements AbstractLinAlgPack::MatrixBase.
Reimplemented in AbstractLinAlgPack::MatrixSymOpSerial.
Definition at line 447 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense, ConstrainedOptPack::MatrixSymIdentitySerial, and AbstractLinAlgPack::MatrixSymDiagSparse.
Definition at line 455 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense.
Definition at line 461 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 474 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 488 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 502 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Implements AbstractLinAlgPack::MatrixOp.
Definition at line 517 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 526 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 534 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 545 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 555 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 182 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 564 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense.
Definition at line 582 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Reimplemented in AbstractLinAlgPack::MultiVectorMutableDense.
Definition at line 615 of file AbstractLinAlgPack_MatrixOpSerial.cpp.
|
mutableprivate |
Definition at line 304 of file AbstractLinAlgPack_MatrixOpSerial.hpp.
|
mutableprivate |
Definition at line 305 of file AbstractLinAlgPack_MatrixOpSerial.hpp.