1#ifndef AMREX_PAR_REDUCE_H_
2#define AMREX_PAR_REDUCE_H_
3#include <AMReX_Config.H>
46template <
typename... Ops,
typename... Ts, BaseFabType FAB,
typename F>
47typename ReduceData<Ts...>::Type
54 reduce_op.eval(fa, nghost, reduce_data, std::forward<F>(f));
55 return reduce_data.value(reduce_op);
96template <
typename Op,
typename T, BaseFabType FAB,
typename F>
104 reduce_op.
eval(fa, nghost, reduce_data, std::forward<F>(f));
105 auto const& hv = reduce_data.
value(reduce_op);
106 return amrex::get<0>(hv);
147template <
typename... Ops,
typename... Ts, BaseFabType FAB,
typename F>
148typename ReduceData<Ts...>::Type
155 reduce_op.eval(fa, nghost, ncomp, reduce_data, std::forward<F>(f));
156 return reduce_data.value(reduce_op);
194template <
typename Op,
typename T, BaseFabType FAB,
typename F>
202 reduce_op.
eval(fa, nghost, ncomp, reduce_data, std::forward<F>(f));
203 auto const& hv = reduce_data.
value(reduce_op);
204 return amrex::get<0>(hv);
241template <
typename... Ops,
typename... Ts, BaseFabType FAB,
typename F>
242typename ReduceData<Ts...>::Type
246 return ParReduce(operation_list, type_list, fa,
IntVect(0), std::forward<F>(f));
285template <
typename Op,
typename T, BaseFabType FAB,
typename F>
290 return ParReduce(operation_list, type_list, fa,
IntVect(0), std::forward<F>(f));
An Array of FortranArrayBox(FAB)-like Objects.
Definition AMReX_FabArray.H:344
Definition AMReX_Reduce.H:438
Type value()
Definition AMReX_Reduce.H:473
Definition AMReX_Reduce.H:597
void eval(MF const &mf, IntVect const &nghost, D &reduce_data, F &&f)
Definition AMReX_Reduce.H:731
Definition AMReX_Amr.cpp:50
__host__ __device__ void ignore_unused(const Ts &...)
This shuts up the compiler about unused variables.
Definition AMReX.H:139
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. The reduce result is local and it's the user's responsibility ...
Definition AMReX_ParReduce.H:48
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:33
Struct for holding types.
Definition AMReX_TypeList.H:13