1 #ifndef AMREX_TYPELIST_H_
2 #define AMREX_TYPELIST_H_
3 #include <AMReX_Config.H>
10 template <
class... Ts>
14 static constexpr std::size_t
size () noexcept {
return sizeof...(Ts); }
20 template <std::size_t I,
typename Head,
typename... Tail>
24 template <
typename Head,
typename... Tail>
31 template <std::
size_t I,
typename T>
36 template <
typename TL,
typename F, std::size_t...N>
42 template <
typename TL,
typename F, std::size_t...N>
76 template <
typename... Ts,
typename F>
81 (std::forward<F>(
f), std::make_index_sequence<
sizeof...(Ts)>());
113 template <
typename... Ts,
typename F>
118 (std::forward<F>(
f), std::make_index_sequence<
sizeof...(Ts)>());
122 template <
typename... As,
typename... Bs>
127 template <
typename... Ls,
typename A>
132 template <
typename LLs,
typename... As>
149 template <
typename... Ls>
156 template <
class T, std::
size_t N>
158 if constexpr (N == 0) {
160 }
else if constexpr (N == 1) {
162 }
else if constexpr (N % 2 == 0) {
171 template <
class T, std::
size_t N>
173 return SingleTypeMultiplier_impl<T, N>();
183 template <
template <
class...>
class TParam,
class... Args>
196 template <
template <
class...>
class TParam,
class... Types>
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:44
constexpr bool for_each_until_impl(F const &f, std::index_sequence< N... >)
Definition: AMReX_TypeList.H:43
constexpr auto TApply(TypeList< Args... >)
Definition: AMReX_TypeList.H:184
constexpr auto SingleTypeMultiplier_impl()
Definition: AMReX_TypeList.H:157
constexpr auto SingleTypeMultiplier(const T(&)[N])
Definition: AMReX_TypeList.H:172
constexpr void for_each_impl(F const &f, std::index_sequence< N... >)
Definition: AMReX_TypeList.H:37
Definition: AMReX_Amr.cpp:49
typename detail::TypeListGet< I, T >::type TypeAt
Type at position I of a TypeList.
Definition: AMReX_TypeList.H:32
constexpr auto CartesianProduct(Ls...)
Cartesian Product of TypeLists.
Definition: AMReX_TypeList.H:150
constexpr auto single_product(TypeList< Ls... >, A)
Definition: AMReX_TypeList.H:128
constexpr void ForEach(TypeList< Ts... >, F &&f)
For each type t in TypeList, call f(t)
Definition: AMReX_TypeList.H:78
constexpr bool ForEachUntil(TypeList< Ts... >, F &&f)
For each type t in TypeList, call f(t) until true is returned.
Definition: AMReX_TypeList.H:115
TypeAt< 0, decltype(detail::TApply< TParam >((TypeList<>{}+...+detail::SingleTypeMultiplier(Types{}))))> TypeMultiplier
Return the first template argument with the later arguments applied to it. Types of the form T[N] are...
Definition: AMReX_TypeList.H:199
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > operator+(const GpuComplex< T > &a_x)
Identity operation on a complex number.
Definition: AMReX_GpuComplex.H:166
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > operator*(const GpuComplex< T > &a_x, const GpuComplex< T > &a_y) noexcept
Multiply two complex numbers.
Definition: AMReX_GpuComplex.H:252
Definition: AMReX_FabArrayCommI.H:841
Struct for holding types.
Definition: AMReX_TypeList.H:12
static constexpr std::size_t size() noexcept
Number of types in the TypeList.
Definition: AMReX_TypeList.H:14
Head type
Definition: AMReX_TypeList.H:26
Definition: AMReX_TypeList.H:18