42 #ifndef COOM_PARTITION_OP_H
43 #define COOM_PARTITION_OP_H
45 #include "AbstractLinAlgPack_COOMatrixTmplOp.hpp"
47 namespace AbstractLinAlgPack {
64 template <
class T_Indice,
class T_Value>
65 inline void Mp_StM( DMatrixSlice* gms_lhs, value_type alpha
66 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs
69 Mp_StCOOM(gms_lhs, alpha, coom_rhs, trans_rhs);
84 template <
class T_Indice,
class T_Value>
85 inline void Vp_StMtV( DVectorSlice* vs_lhs, value_type alpha
86 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs1
89 Vp_StCOOMtV(vs_lhs, alpha, coom_rhs1, trans_rhs1, vs_rhs2);
93 template <
class T_Indice,
class T_Value>
94 inline void Vp_StMtV( DVectorSlice* vs_lhs, value_type alpha
95 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs1
96 ,
BLAS_Cpp::Transp trans_rhs1,
const DVectorSlice& vs_rhs2, value_type beta )
105 Vp_StCOOMtV(vs_lhs, alpha, coom_rhs1, trans_rhs1, vs_rhs2);
116 template <
class T_Indice,
class T_Value>
117 inline void Mp_StMtM( DMatrixSlice* gms_lhs, value_type alpha
118 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs1
121 Mp_StCOOMtM(gms_lhs, alpha, coom_rhs1, trans_rhs1, gms_rhs2, trans_rhs2);
125 template <
class T_Indice,
class T_Value>
126 inline void Mp_StMtM( DMatrixSlice* gms_lhs, value_type alpha,
const DMatrixSlice& gms_rhs1
128 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs2
131 Mp_StMtCOOM(gms_lhs, alpha, gms_rhs1, trans_rhs1, coom_rhs2, trans_rhs2);
138 template <
class T_Indice,
class T_Value,
class M2>
140 void Mp_StMtM(DMatrixSlice* gms_lhs, value_type alpha
141 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs1
146 , coom_rhs1.rows(), coom_rhs1.cols(), trans_rhs1
147 , M2_rhs2.rows(), M2_rhs2.cols(), trans_rhs2 );
155 Mp_StMtM(gms_lhs,alpha,coom_rhs1,trans_rhs1,M2_rhs2,trans_rhs2);
162 template <
class M1,
class T_Indice,
class T_Value>
164 void Mp_StMtM(DMatrixSlice* gms_lhs, value_type alpha,
const M1& M1_rhs1
166 ,
const COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& coom_rhs2
170 , M1_rhs1.rows(), M1_rhs1.cols(), trans_rhs1
171 , coom_rhs2.rows(), coom_rhs2.cols(), trans_rhs2 );
179 Mp_StMtM(gms_lhs,alpha,M1_rhs1,trans_rhs1,coom_rhs2,trans_rhs2);
201 template <
class T_Indice,
class T_Value>
202 inline void Mp_StM( DMatrixSlice* gms_lhs, value_type alpha
203 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs
206 Mp_StCOOM(gms_lhs, alpha, coom_rhs, trans_rhs);
221 template <
class T_Indice,
class T_Value>
222 inline void Vp_StMtV( DVectorSlice* vs_lhs, value_type alpha
223 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs1
226 Vp_StCOOMtV(vs_lhs, alpha, coom_rhs1, trans_rhs1, vs_rhs2);
230 template <
class T_Indice,
class T_Value>
231 inline void Vp_StMtV( DVectorSlice* vs_lhs, value_type alpha
232 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs1
233 ,
BLAS_Cpp::Transp trans_rhs1,
const DVectorSlice& vs_rhs2, value_type beta )
242 Vp_StCOOMtV(vs_lhs, alpha, coom_rhs1, trans_rhs1, vs_rhs2);
253 template <
class T_Indice,
class T_Value>
254 inline void Mp_StMtM( DMatrixSlice* gms_lhs, value_type alpha
255 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs1
258 Mp_StCOOMtM(gms_lhs, alpha, coom_rhs1, trans_rhs1, gms_rhs2, trans_rhs2);
262 template <
class T_Indice,
class T_Value>
263 inline void Mp_StMtM( DMatrixSlice* gms_lhs, value_type alpha,
const DMatrixSlice& gms_rhs1
265 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs2
268 Mp_StMtCOOM(gms_lhs, alpha, gms_rhs1, trans_rhs1, coom_rhs2, trans_rhs2);
275 template <
class T_Indice,
class T_Value,
class M2>
277 void Mp_StMtM(DMatrixSlice* gms_lhs, value_type alpha
278 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs1
283 , coom_rhs1.rows(), coom_rhs1.cols(), trans_rhs1
284 , M2_rhs2.rows(), M2_rhs2.cols(), trans_rhs2 );
292 Mp_StMtM(gms_lhs,alpha,coom_rhs1,trans_rhs1,M2_rhs2,trans_rhs2);
299 template <
class M1,
class T_Indice,
class T_Value>
301 void Mp_StMtM(DMatrixSlice* gms_lhs, value_type alpha,
const M1& M1_rhs1
303 ,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>& coom_rhs2
307 , M1_rhs1.rows(), M1_rhs1.cols(), trans_rhs1
308 , coom_rhs2.rows(), coom_rhs2.cols(), trans_rhs2 );
316 Mp_StMtM(gms_lhs,alpha,M1_rhs1,trans_rhs1,coom_rhs2,trans_rhs2);
325 #endif // COOM_PARTITION_OP_H
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=1.0)
mwo_lhs = alpha * op(mwo_rhs1) * op(mwo_rhs2) + beta * mwo_lhs (right) (xGEMM).
void Vt_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs *= alpha
void Mp_StMtCOOM(DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const T_COOM &coom_rhs2, BLAS_Cpp::Transp trans_rhs2)
gms_lhs += alpha * op(gms_rhs1) * op(coom_rhs2) (left) (BLAS xGEMM)
void Mp_StCOOMtM(DMatrixSlice *gms_lhs, value_type alpha, const T_COOM &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2)
gms_lhs += alpha * op(coom_rhs1) * op(gms_rhs2) (right) (BLAS xGEMM)
void Mp_StM(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
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)
void Mp_StCOOM(DMatrixSlice *gms_lhs, value_type alpha, const T_COOM &coom_rhs, BLAS_Cpp::Transp trans_rhs)
gms_lhs += alpha * op(coom_rhs) (time = O(coom_rhs.nz(), space = O(1))
void Mt_S(MatrixOp *mwo_lhs, value_type alpha)
void Vp_StCOOMtV(DVectorSlice *vs_lhs, value_type alpha, const T_COOM &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz(), space = O(1)) ...