1 #ifndef ERF_ParFunctions_H
2 #define ERF_ParFunctions_H
9 std::unique_ptr<amrex::MultiFab>& mf)
11 amrex::MultiArray4<const amrex::Real>
const& ma = mf->const_arrays();
12 for (
int k = 0; k < v.size(); k++) {
13 v[k] = amrex::ParReduce(amrex::TypeList<amrex::ReduceOpMax>{},
14 amrex::TypeList<amrex::Real>{},
17 [=] AMREX_GPU_DEVICE (
int box_no,
int i,
int j,
int) noexcept
18 -> amrex::GpuTuple<amrex::Real>
20 return { ma[box_no](i,j,k) };
23 amrex::ParallelDescriptor::ReduceRealMax(v.data(), v.size());
AMREX_FORCE_INLINE void reduce_to_max_per_height(amrex::Vector< amrex::Real > &v, std::unique_ptr< amrex::MultiFab > &mf)
Definition: ERF_ParFunctions.H:8