235 const Matrix& A,
bool transposeA,
236 const Matrix& P,
bool transposeP,
238 bool call_FillComplete_on_result =
true,
239 bool doOptimizeStorage =
true,
240 const std::string & label = std::string(),
244 Exceptions::RuntimeError,
"XpetraExt::TripleMatrixMultiply::MultiplyRAP: row map of Ac is not same as row map of R");
246 Exceptions::RuntimeError,
"XpetraExt::TripleMatrixMultiply::MultiplyRAP: row map of Ac is not same as domain map of R");
252 bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage;
257#ifdef HAVE_XPETRA_TPETRA
258# if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
259 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
263 if(helpers::isTpetraCrs(R) && helpers::isTpetraCrs(A) && helpers::isTpetraCrs(P) && helpers::isTpetraCrs(Ac)) {
272 Tpetra::TripleMatrixMultiply::MultiplyRAP(tpR, transposeR, tpA, transposeA, tpP, transposeP, tpAc, haveMultiplyDoFillComplete, label, params);
274 else if (helpers::isTpetraBlockCrs(R) && helpers::isTpetraBlockCrs(A) && helpers::isTpetraBlockCrs(P)) {
279 std::cout<<
"WARNING: Using inefficient BlockCrs Multiply Placeholder"<<std::endl;
286 using CRS=Tpetra::CrsMatrix<SC,LO,GO,NO>;
294 const bool do_fill_complete=
true;
295 Tpetra::TripleMatrixMultiply::MultiplyRAP(*Rcrs, transposeR, *Acrs, transposeA, *Pcrs, transposeP, *Accrs, do_fill_complete, label, params);
304 Ac_w->replaceCrsMatrix(Ac_p);
315 if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) {
317 fillParams->set(
"Optimize Storage", doOptimizeStorage);
327 const std::string stridedViewLabel(
"stridedMaps");
328 const size_t blkSize = 1;
329 std::vector<size_t> stridingInfo(1, blkSize);
332 if (R.
IsView(stridedViewLabel)) {
333 rangeMap = transposeR ? R.
getColMap(stridedViewLabel) : R.
getRowMap(stridedViewLabel);
339 if (P.
IsView(stridedViewLabel)) {
340 domainMap = transposeP ? P.
getRowMap(stridedViewLabel) : P.
getColMap(stridedViewLabel);
345 Ac.
CreateView(stridedViewLabel, rangeMap, domainMap);