Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ViewFactory.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
11#ifndef PANZER_VIEW_FACTORY_HPP
12#define PANZER_VIEW_FACTORY_HPP
13
14#include "Kokkos_ViewFactory.hpp"
15#include "Phalanx_KokkosDeviceTypes.hpp"
16
17namespace panzer {
18
20 template<typename InputArray,typename ... DimensionPack>
21 Kokkos::DynRankView<typename InputArray::value_type,PHX::Device>
22 createDynRankView(const InputArray& a, const std::string& name, const DimensionPack... dims)
23 {
24 using return_type = Kokkos::DynRankView<typename InputArray::value_type,PHX::Device>;
25 return PHX::ViewFactory<InputArray>::template create_view<return_type>(a,name,dims...);
26 }
27
28}
29
30#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.