42 #ifndef THYRA_TPETRA_EUCLIDEAN_SCALAR_PROD_DEF_HPP
43 #define THYRA_TPETRA_EUCLIDEAN_SCALAR_PROD_DEF_HPP
53 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
55 const MultiVectorBase<Scalar>& X,
56 const MultiVectorBase<Scalar>& Y,
60 typedef Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> TMV;
71 X_tpetra->dot(*Y_tpetra, scalarProds_out);
74 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
76 Teuchos::rcp_const_cast<TMV>(X_tpetra)->
template sync<Kokkos::HostSpace>();
78 Teuchos::rcp_const_cast<TMV>(Y_tpetra)->
template sync<Kokkos::HostSpace>();
81 Teuchos::rcp_const_cast<TMV>(X_tpetra)->sync_host ();
83 Teuchos::rcp_const_cast<TMV>(Y_tpetra)->sync_host ();
86 EuclideanScalarProd<Scalar>::scalarProdsImpl(X, Y, scalarProds_out);
91 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
96 using Teuchos::rcp_dynamic_cast;
102 return tmv->getConstTpetraMultiVector();
107 return tv->getConstTpetraVector();
117 #endif // THYRA_EUCLIDEAN_SCALAR_PROD_DEF_HPP
Concrete implementation of Thyra::MultiVector in terms of Tpetra::MultiVector.
Concrete Thyra::SpmdVectorBase using Tpetra::Vector.
bool nonnull(const boost::shared_ptr< T > &p)
virtual void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const
If X and Y are both Tpetra wrappers, computes the pair-wise scalar products directly with Tpetra call...
Teuchos::RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getConstTpetraMultiVector(const RCP< const MultiVectorBase< Scalar > > &mv) const