1 #ifndef AMREX_PAR_REDUCE_H_
2 #define AMREX_PAR_REDUCE_H_
3 #include <AMReX_Config.H>
44 template <
typename... Ops,
typename... Ts,
typename FAB,
typename F,
45 typename foo = std::enable_if_t<IsBaseFab<FAB>::value> >
46 typename ReduceData<Ts...>::Type
53 reduce_op.eval(fa, nghost, reduce_data, std::forward<F>(
f));
54 return reduce_data.value(reduce_op);
94 template <
typename Op,
typename T,
typename FAB,
typename F,
95 typename foo = std::enable_if_t<IsBaseFab<FAB>::value> >
103 reduce_op.
eval(fa, nghost, reduce_data, std::forward<F>(
f));
104 auto const& hv = reduce_data.
value(reduce_op);
105 return amrex::get<0>(hv);
145 template <
typename... Ops,
typename... Ts,
typename FAB,
typename F,
146 typename foo = std::enable_if_t<IsBaseFab<FAB>::value> >
147 typename ReduceData<Ts...>::Type
154 reduce_op.eval(fa, nghost, ncomp, reduce_data, std::forward<F>(
f));
155 return reduce_data.value(reduce_op);
191 template <
typename Op,
typename T,
typename FAB,
typename F,
192 typename foo = std::enable_if_t<IsBaseFab<FAB>::value> >
200 reduce_op.
eval(fa, nghost, ncomp, reduce_data, std::forward<F>(
f));
201 auto const& hv = reduce_data.
value(reduce_op);
202 return amrex::get<0>(hv);
238 template <
typename... Ops,
typename... Ts,
typename FAB,
typename F,
239 typename foo = std::enable_if_t<IsBaseFab<FAB>::value> >
240 typename ReduceData<Ts...>::Type
282 template <
typename Op,
typename T,
typename FAB,
typename F,
283 typename foo = std::enable_if_t<IsBaseFab<FAB>::value> >
An Array of FortranArrayBox(FAB)-like Objects.
Definition: AMReX_FabArray.H:344
Definition: AMReX_Reduce.H:249
Type value()
Definition: AMReX_Reduce.H:281
Definition: AMReX_Reduce.H:364
std::enable_if_t< IsFabArray< MF >::value > eval(MF const &mf, IntVect const &nghost, D &reduce_data, F &&f)
Definition: AMReX_Reduce.H:441
@ FAB
Definition: AMReX_AmrvisConstants.H:86
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:44
Definition: AMReX_Amr.cpp:49
ReduceData< Ts... >::Type ParReduce(TypeList< Ops... > operation_list, TypeList< Ts... > type_list, FabArray< FAB > const &fa, IntVect const &nghost, F &&f)
Parallel reduce for MultiFab/FabArray.
Definition: AMReX_ParReduce.H:47
IntVectND< AMREX_SPACEDIM > IntVect
Definition: AMReX_BaseFwd.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ignore_unused(const Ts &...)
This shuts up the compiler about unused variables.
Definition: AMReX.H:111
Struct for holding types.
Definition: AMReX_TypeList.H:12