42 #ifndef SPARSE_LINALG_PACK_MATRIX_WITH_OP_SERIAL_H
43 #define SPARSE_LINALG_PACK_MATRIX_WITH_OP_SERIAL_H
47 #include "AbstractLinAlgPack_Types.hpp"
48 #include "AbstractLinAlgPack_MatrixOp.hpp"
49 #include "AbstractLinAlgPack_VectorSpaceSerial.hpp"
51 namespace AbstractLinAlgPack {
128 ,
const DVectorSlice& vs_rhs2, value_type beta)
const = 0;
227 std::ostream&
output(std::ostream& out)
const;
255 ,
const Vector& v_rhs2, value_type beta)
const;
265 ,
const Vector& v_rhs3, value_type beta)
const;
275 ,
const Vector& v_rhs3)
const;
291 ,value_type beta )
const;
326 M_rhs.
Mp_StM(gms_lhs,alpha,trans_rhs);
335 M_rhs.
Mp_StMtP(gms_lhs,alpha,M_trans,P_rhs,P_rhs_trans);
344 M_rhs.
Mp_StPtM(gms_lhs,alpha,P_rhs,P_rhs_trans,M_trans);
354 M_rhs.
Mp_StPtMtP(gms_lhs,alpha,P_rhs1,P_rhs1_trans,trans_rhs,P_rhs2,P_rhs2_trans);
366 M_rhs1.
Vp_StMtV(vs_lhs,alpha,trans_rhs1,vs_rhs2,beta);
373 M_rhs1.
Vp_StMtV(vs_lhs,alpha,trans_rhs1,sv_rhs2,beta);
382 M_rhs2.
Vp_StPtMtV(vs_lhs,alpha,P_rhs1,P_rhs1_trans,M_rhs2_trans,vs_rhs3,beta);
391 M_rhs2.
Vp_StPtMtV(vs_lhs,alpha,P_rhs1,P_rhs1_trans,M_rhs2_trans,sv_rhs3,beta);
398 return M_rhs2.
transVtMtV(vs_rhs1,trans_rhs2,vs_rhs3);
405 return M_rhs2.
transVtMtV(sv_rhs1,trans_rhs2,sv_rhs3);
418 M_rhs1.
Mp_StMtM(gms_lhs,alpha,trans_rhs1,gms_rhs2,trans_rhs2,beta);
424 , value_type beta = 1.0)
426 M_rhs2.
Mp_StMtM(gms_lhs,alpha,gms_rhs1,trans_rhs1,trans_rhs2,beta);
434 mwo_rhs1.
Mp_StMtM(gms_lhs,alpha,trans_rhs1,gms_rhs2,trans_rhs2,beta);
442 M_rhs1.
Mp_StMtM(gms_lhs,alpha,trans_rhs1,sym_rhs2,trans_rhs2,beta);
448 , value_type beta = 1.0)
450 M_rhs2.
Mp_StMtM(gms_lhs,alpha,sym_rhs1,trans_rhs1,trans_rhs2,beta);
456 , value_type beta = 1.0)
458 M_rhs1.
Mp_StMtM(gms_lhs,alpha,trans_rhs1,tri_rhs2,trans_rhs2,beta);
464 , value_type beta = 1.0)
466 M_rhs2.
Mp_StMtM(gms_lhs,alpha,tri_rhs1,trans_rhs1,trans_rhs2,beta);
475 #endif // SPARSE_LINALG_PACK_MATRIX_WITH_OP_SERIAL_H
void Mp_StMtM(DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSliceTri &tri_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
gms_lhs = alpha * op(tri_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xTRMM)
std::ostream & output(std::ostream &out) const
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
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)
void Vp_StMtV(DVectorSlice *vs_lhs, value_type alpha, const MatrixOpSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta=1.0)
vs_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * vs_lhs (BLAS xGEMV)
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)
void Mp_StM(DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp trans_rhs)
gms_lhs += alpha * op(M_rhs) (BLAS xAXPY)
const VectorSpace & space_cols() const
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:
friend void Mp_StPtMtP(MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans)
Base class for all matrices implemented in a shared memory address space.
virtual void Mp_StM(DMatrixSlice *gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
gms_lhs += alpha * op(M_rhs) (BLAS xAXPY)
Interface adding operations specific for a symmetric matrix {abstract}.
void Mp_StMtP(DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans)
gms_lhs += alpha * op(M_rhs) * op(P_rhs)
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
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)
Abstract interface for objects that represent a space for mutable coordinate vectors.
void Vp_StPtMtV(DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta=1.0)
vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * vs_rhs
friend void Mp_StMtM(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta)
friend void Mp_StM(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
Base class for all matrices that support basic matrix operations.
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:
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
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)
friend void Mp_StMtP(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans)
void Mp_StPtMtP(DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp trans_rhs, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans)
gms_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2)
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)
Abstract interface for mutable coordinate vectors {abstract}.
Subclass for serial vector space objects that create VectorMutableDense vector and MultiVectorMutable...
friend void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta)
value_type transVtMtV(const SpVectorSlice &sv_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3)
result = sv_rhs1' * op(M_rhs2) * sv_rhs3
void Mp_StPtM(DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp M_trans)
gms_lhs += alpha * op(P) * op(M_rhs)
Concrete matrix type to represent general permutation (mapping) matrices.
friend void Mp_StPtM(MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOp &M_rhs, BLAS_Cpp::Transp M_trans)
const VectorSpace & space_rows() const