Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_NodeType.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_KOKKOS_NODE_TYPE_HPP
12#define PANZER_KOKKOS_NODE_TYPE_HPP
13
14#include "Phalanx_KokkosDeviceTypes.hpp"
15#include <Tpetra_KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
16#include <type_traits>
17
18namespace panzer {
19
40 Tpetra::KokkosCompat::KokkosDeviceWrapperNode<PHX::ExecutionSpace,
41 PHX::MemorySpace>;
42
58 template <typename Node>
59 struct TpetraNodeIsInstantiated : std::false_type {};
60
61#if defined(HAVE_TPETRA_INST_SERIAL) && defined(KOKKOS_ENABLE_SERIAL)
62 template <>
63 struct TpetraNodeIsInstantiated<Tpetra::KokkosCompat::KokkosSerialWrapperNode>
64 : std::true_type {};
65#endif
66#if defined(HAVE_TPETRA_INST_OPENMP) && defined(KOKKOS_ENABLE_OPENMP)
67 template <>
68 struct TpetraNodeIsInstantiated<Tpetra::KokkosCompat::KokkosOpenMPWrapperNode>
69 : std::true_type {};
70#endif
71#if defined(HAVE_TPETRA_INST_PTHREAD) && defined(KOKKOS_ENABLE_THREADS)
72 template <>
73 struct TpetraNodeIsInstantiated<Tpetra::KokkosCompat::KokkosThreadsWrapperNode>
74 : std::true_type {};
75#endif
76#if defined(HAVE_TPETRA_INST_CUDA) && defined(KOKKOS_ENABLE_CUDA)
77 template <>
78 struct TpetraNodeIsInstantiated<Tpetra::KokkosCompat::KokkosCudaWrapperNode>
79 : std::true_type {};
80#endif
81#if defined(HAVE_TPETRA_INST_HIP) && defined(KOKKOS_ENABLE_HIP)
82 template <>
83 struct TpetraNodeIsInstantiated<Tpetra::KokkosCompat::KokkosHIPWrapperNode>
84 : std::true_type {};
85#endif
86#if defined(HAVE_TPETRA_INST_SYCL) && defined(KOKKOS_ENABLE_SYCL)
87 template <>
88 struct TpetraNodeIsInstantiated<Tpetra::KokkosCompat::KokkosSYCLWrapperNode>
89 : std::true_type {};
90#endif
91
93 "panzer: the Tpetra node type panzer derives from Phalanx' "
94 "execution and memory spaces is not one that Tpetra "
95 "instantiated, so every Tpetra object panzer creates would "
96 "fail to link. Either set the Tpetra_INST_<BACKEND> matching "
97 "Phalanx_DEFAULT_EXECUTION_SPACE -- note Tpetra_INST_HIP and "
98 "Tpetra_INST_SYCL are OFF by default, so a HIP or SYCL build "
99 "needs one set explicitly -- or make "
100 "Tpetra_ALLOCATE_IN_SHARED_SPACE agree with "
101 "Phalanx_ENABLE_SHARED_SPACE, since the two select the same "
102 "Kokkos::SharedSpace and enabling one alone changes the node's "
103 "memory space to one Tpetra did not instantiate.");
104
105}
106
107#endif
Tpetra::KokkosCompat::KokkosDeviceWrapperNode< PHX::ExecutionSpace, PHX::MemorySpace > TpetraNodeType
The Kokkos node type used to instantiate all Tpetra objects (Map, MultiVector, CrsGraph,...
Whether Tpetra explicitly instantiated its classes over Node.