43 #ifndef __Panzer_KokkosThyraConversion_hpp__ 44 #define __Panzer_KokkosThyraConversion_hpp__ 46 #include "Kokkos_Core.hpp" 49 #include "Teuchos_Ptr.hpp" 51 #include "Thyra_VectorBase.hpp" 52 #include "Thyra_DefaultSpmdVector.hpp" 54 #include "Epetra_Vector.h" 57 namespace kokkos_utils {
68 typedef Kokkos::View<double*,Kokkos::HostSpace ,Kokkos::MemoryTraits<Kokkos::Unmanaged > >
View;
75 typedef Kokkos::View<const double*,Kokkos::HostSpace ,Kokkos::MemoryTraits<Kokkos::Unmanaged > >
View;
79 template <
typename VectorType>
89 auto values = Teuchos::ptr_dynamic_cast<Thyra::DefaultSpmdVector<double> >(Teuchos::ptrFromRef(v))->getRCPtr();
101 auto values = Teuchos::ptr_dynamic_cast<
const Thyra::DefaultSpmdVector<double> >(Teuchos::ptrFromRef(v))->getRCPtr();
VectorToViewTraits< VectorType >::View getView(typename VectorToViewTraits< VectorType >::ThyraVector &v)
VectorToViewTraits< const Epetra_Vector >::View getView< const Epetra_Vector >(typename VectorToViewTraits< const Epetra_Vector >::ThyraVector &v)
VectorToViewTraits< Epetra_Vector >::View getView< Epetra_Vector >(typename VectorToViewTraits< Epetra_Vector >::ThyraVector &v)
const Thyra::VectorBase< double > ThyraVector
Thyra::VectorBase< double > ThyraVector
Kokkos::View< double *, Kokkos::HostSpace,Kokkos::MemoryTraits< Kokkos::Unmanaged > > View
Kokkos::View< const double *, Kokkos::HostSpace,Kokkos::MemoryTraits< Kokkos::Unmanaged > > View