Panzer  Version of the Day
Panzer_ViewFactory.hpp
Go to the documentation of this file.
1 #ifndef PANZER_VIEW_FACTORY_HPP
2 #define PANZER_VIEW_FACTORY_HPP
3 
4 #include "Kokkos_ViewFactory.hpp"
5 #include "Phalanx_KokkosDeviceTypes.hpp"
6 
7 namespace panzer {
8 
10  template<typename InputArray,typename ... DimensionPack>
11  Kokkos::DynRankView<typename InputArray::value_type,PHX::Device>
12  createDynRankView(const InputArray& a, const std::string& name, const DimensionPack... dims)
13  {
14  using return_type = Kokkos::DynRankView<typename InputArray::value_type,PHX::Device>;
15  return Kokkos::ViewFactory<InputArray>::template create_view<return_type>(a,name,dims...);
16  }
17 
18 }
19 
20 #endif
Kokkos::DynRankView< typename InputArray::value_type, PHX::Device > createDynRankView(const InputArray &a, const std::string &name, const DimensionPack... dims)
Wrapper to simplify Panzer use of Sacado ViewFactory.