template <
typename T,
unsigned Dim,
class... ViewArgs> \
T BareField<T, Dim, ViewArgs...>::name(
int nghost)
const { \
PAssert_LE(nghost, nghost_m); \
T temp = Kokkos::reduction_identity<T>::name(); \
using index_array_type = typename RangePolicy<Dim, execution_space>::index_array_type; \
ippl::parallel_reduce( \
"fun", getRangePolicy(dview_m, nghost_m - nghost), \
KOKKOS_CLASS_LAMBDA(
const index_array_type& args,
T& valL) { \
T myVal = apply(dview_m, args); \
op; \
}, \
KokkosCorrection::fun<T>(temp)); \
layout_m->comm.allreduce(temp, globaltemp, 1, MPI_Op<T>()); \
return globaltemp; \
}