Skip to content

Commit

Permalink
add constexpr to for_each_init
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSinn committed Jan 23, 2024
1 parent d2ac286 commit aa4e9e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Base/AMReX_Reduce.H
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ namespace Reduce::detail {

template <std::size_t I, typename T, typename P>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void for_each_init (T& t)
constexpr void for_each_init (T& t)
{
P().init(amrex::get<I>(t));
}

template <std::size_t I, typename T, typename P, typename P1, typename... Ps>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void for_each_init (T& t)
constexpr void for_each_init (T& t)
{
P().init(amrex::get<I>(t));
for_each_init<I+1,T,P1,Ps...>(t);
Expand Down

0 comments on commit aa4e9e3

Please sign in to comment.