49 #ifndef __Intrepid2_ArgExtractor_HPP__
50 #define __Intrepid2_ArgExtractor_HPP__
52 #include "Intrepid2_ConfigDefs.hpp"
57 #include "Kokkos_Core.hpp"
63 template<
class reference_type>
66 template<
class ViewType,
class ...IntArgs>
67 static KOKKOS_INLINE_FUNCTION reference_type
get(
const ViewType &view,
const IntArgs&... intArgs)
76 template<
class reference_type>
79 template<
class ViewType,
class ...IntArgs>
80 static KOKKOS_INLINE_FUNCTION reference_type
get(
const ViewType &view,
const IntArgs&... intArgs)
82 return view(intArgs...);
89 template<
class reference_type,
int whichArg>
92 template<
bool B,
class T = reference_type >
93 using enable_if_t =
typename std::enable_if<B,T>::type;
95 template<
class ViewType,
class int_type,
int M=whichArg>
96 static KOKKOS_INLINE_FUNCTION
98 get(
const ViewType &view,
const int_type &i0)
103 template<
class ViewType,
class int_type,
class ...IntArgs,
int M=whichArg>
104 static KOKKOS_INLINE_FUNCTION
106 get(
const ViewType &view,
const int_type &i0,
const IntArgs&... intArgs)
111 template<
class ViewType,
class int_type,
int M=whichArg>
112 static KOKKOS_INLINE_FUNCTION
114 get(
const ViewType &view,
const int_type &i0,
const int_type &i1)
119 template<
class ViewType,
class int_type,
class ...IntArgs,
int M=whichArg>
120 static KOKKOS_INLINE_FUNCTION
122 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const IntArgs&... intArgs)
127 template<
class ViewType,
class int_type,
int M=whichArg>
128 static KOKKOS_INLINE_FUNCTION
130 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2)
135 template<
class ViewType,
class int_type,
class ...IntArgs,
int M=whichArg>
136 static KOKKOS_INLINE_FUNCTION
138 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const IntArgs&... intArgs)
143 template<
class ViewType,
class int_type,
int M=whichArg>
144 static KOKKOS_INLINE_FUNCTION
146 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const int_type &i3)
151 template<
class ViewType,
class int_type,
class ...IntArgs,
int M=whichArg>
152 static KOKKOS_INLINE_FUNCTION
154 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const int_type &i3,
const IntArgs&... intArgs)
159 template<
class ViewType,
class int_type,
int M=whichArg>
160 static KOKKOS_INLINE_FUNCTION
162 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const int_type &i3,
const int_type &i4)
167 template<
class ViewType,
class int_type,
class ...IntArgs,
int M=whichArg>
168 static KOKKOS_INLINE_FUNCTION
170 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const int_type &i3,
const int_type &i4,
const IntArgs&... intArgs)
175 template<
class ViewType,
class int_type,
int M=whichArg>
176 static KOKKOS_INLINE_FUNCTION
178 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const int_type &i3,
const int_type &i4,
const int_type &i5)
183 template<
class ViewType,
class int_type,
class ...IntArgs,
int M=whichArg>
184 static KOKKOS_INLINE_FUNCTION
186 get(
const ViewType &view,
const int_type &i0,
const int_type &i1,
const int_type &i2,
const int_type &i3,
const int_type &i4,
const int_type &i5,
const IntArgs&... intArgs)
203 template<
class ViewType,
class ...IntArgs>
204 static KOKKOS_INLINE_FUNCTION
205 enable_if_t<whichArg >=
sizeof...(IntArgs), reference_type>
206 get(
const ViewType &view,
const IntArgs&... intArgs)
209 Kokkos::abort(
"Intrepid2::SingleArgExtractor: calling SingleArgExtractor with out-of-bounds argument\n");
#define INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE(test, x, msg)
Header function for Intrepid2::Util class and other utility functions.
Implementation of an assert that can safely be called from device code.
Contains definitions of custom data types in Intrepid2.