44 #include "AbstractLinAlgPack_MultiVectorMutableDense.hpp"
45 #include "AbstractLinAlgPack_VectorMutableDense.hpp"
46 #include "AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp"
47 #include "AbstractLinAlgPack_SpVectorOp.hpp"
48 #include "AbstractLinAlgPack_LinAlgOpPackHack.hpp"
49 #include "DenseLinAlgPack_DMatrixOut.hpp"
50 #include "ReleaseResource_ref_count_ptr.hpp"
51 #include "Teuchos_Workspace.hpp"
52 #include "Teuchos_Assert.hpp"
54 namespace AbstractLinAlgPack {
80 namespace rcp = MemMngPack;
81 namespace rmp = MemMngPack;
88 new rmp::ReleaseResource_ref_count_ptr<DMatrix>(
151 return ROW_ACCESS | COL_ACCESS | DIAG_ACCESS;
159 namespace rcp = MemMngPack;
169 namespace rcp = MemMngPack;
179 namespace rcp = MemMngPack;
189 namespace rcp = MemMngPack;
258 sym_lhs == NULL, std::invalid_argument
259 ,
"MultiVectorMutableDense::syrk(...) : Error!" );
274 ,value_type beta )
const
285 ,value_type beta )
const
315 EApplyBy apply_by,
const RTOpPack::RTOp& primary_op
316 ,
const size_t num_multi_vecs,
const MultiVector** multi_vecs
319 ,
const index_type primary_first_ele ,
const index_type primary_sub_dim ,
const index_type primary_global_offset
320 ,
const index_type secondary_first_ele ,
const index_type secondary_sub_dim
324 apply_by, primary_op, num_multi_vecs, multi_vecs, num_targ_multi_vecs, targ_multi_vecs
326 ,primary_first_ele, primary_sub_dim, primary_global_offset, secondary_first_ele, secondary_sub_dim
331 EApplyBy apply_by,
const RTOpPack::RTOp& primary_op,
const RTOpPack::RTOp& secondary_op
332 ,
const size_t num_multi_vecs,
const MultiVector** multi_vecs
335 ,
const index_type primary_first_ele ,
const index_type primary_sub_dim ,
const index_type primary_global_offset
336 ,
const index_type secondary_first_ele ,
const index_type secondary_sub_dim
340 apply_by, primary_op, secondary_op, num_multi_vecs, multi_vecs, num_targ_multi_vecs, targ_multi_vecs
342 ,primary_first_ele, primary_sub_dim, primary_global_offset, secondary_first_ele, secondary_sub_dim
void apply_op(EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector **multi_vecs, const size_t num_targ_multi_vecs, MultiVectorMutable **targ_multi_vecs, RTOpPack::ReductTarget *reduct_objs[], const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim) const
std::ostream & output(std::ostream &out) const
DVector "Adaptor" subclass for DenseLinAlgPack::DVectorSlice or DenseLinAlgPack::DVector objects...
std::ostream & output(std::ostream &out) const
vec_mut_ptr_t diag(int k)
void initialize(const size_type rows, const size_type cols)
Call this->initialize(v,v_release) with an allocated DenseLinAlgPack::DVector object.
void Vp_StMtV(DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const
void free_gms_view(const DMatrixSlice *gms_view) const
multi_vec_mut_ptr_t mv_sub_view(const Range1D &row_rng, const Range1D &col_rng)
Teuchos::RCP< MultiVectorMutable > multi_vec_mut_ptr_t
void Mt_S(value_type alpha)
bool Mp_StM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
BLAS_Cpp::Transp gms_trans() const
Return if underlying matrix is being viewed as the transpose or non-transposed.
size_type rows(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
void assign(VectorMutable *v_lhs, const V &V_rhs)
v_lhs = V_rhs.
Abstract interface that allows the extraction of a non-const DenseLinAlgPack::DMatrixSliceSym view of...
access_by_t access_by() const
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
Interface adding operations specific for a symmetric matrix {abstract}.
Teuchos::RCP< const Vector > vec_ptr_t
DMatrixSlice set_gms()
Return the non-const dense matrix.
vec_mut_ptr_t row(index_type i)
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)
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
Provides a specialized implementation for mwo_rhs1 of type MatrixSymDiag.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
const DMatrixSlice get_gms() const
Return a const dense matrix.
Helper class type that simplifies the usage of the MatrixSymOpGetGMSSymMutable interface for clients...
void syrk(const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs)
Perform a rank-k update of a symmetric matrix of the form:
const DMatrixSlice get_gms_view() const
bool Mp_StM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
vec_mut_ptr_t col(index_type j)
void commit_gms_view(DMatrixSlice *gms_view)
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=1.0)
v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV)
Transp trans_trans(Transp _trans1, Transp _trans2)
Helper class type that simplifies the usage of the MatrixOpGetGMS interface for clients.
Base class for all matrices that support basic matrix operations.
Interface for a collection of non-mutable vectors (multi-vector, matrix).
void Mt_S(MatrixOp *mwo_lhs, value_type alpha)
MultiVectorMutableDense(const size_type rows=0, const size_type cols=0)
Calls this->initialize(rows,cols).
MatrixOp & operator=(const MatrixOp &mwo_rhs)
Interface for a collection of mutable vectors (multi-vector, matrix).
friend void apply_op(EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector *multi_vecs[], const size_t num_targ_multi_vecs, MultiVectorMutable *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[], const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim)
const DVectorSlice diag(difference_type k=0) const
bool syrk(BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs) const
size_type cols(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
void bind(DMatrixSlice gms)
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const release_resource_ptr_t & gms_release() const
Return a RCP<> pointer to the object that will release the associated resource.