IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
BareField.hpp File Reference
#include "Ippl.h"
#include <Kokkos_ReductionIdentity.hpp>
#include <cstdlib>
#include <limits>
#include <map>
#include <utility>
#include "Communicate/DataTypes.h"
#include "Utility/Inform.h"
#include "Utility/IpplInfo.h"
Include dependency graph for BareField.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Kokkos::reduction_identity< ippl::Vector< T, Dim > >
struct  KokkosCorrection::Max< Scalar, Space >
struct  KokkosCorrection::Min< Scalar, Space >
struct  KokkosCorrection::Sum< Scalar, Space >
struct  KokkosCorrection::Prod< Scalar, Space >
struct  ippl::detail::isExpression< BareField< T, Dim, ViewArgs... > >

Namespaces

namespace  Kokkos
namespace  KokkosCorrection
namespace  ippl
namespace  ippl::detail

Macros

#define DefineReduction(fun, name, op, MPI_Op)

Functions

 ippl::DefineReduction (Sum, sum, valL+=myVal, std::plus) DefineReduction(Max
std::greater ippl::DefineReduction (Min, min, using Kokkos::min;valL=min(valL, myVal), std::less) DefineReduction(Prod

Variables

 ippl::max
 ippl::valL = max(valL, myVal)
std::greater ippl::prod

Macro Definition Documentation

◆ DefineReduction

#define DefineReduction ( fun,
name,
op,
MPI_Op )
Value:
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)); \
T globaltemp = 0.0; \
layout_m->comm.allreduce(temp, globaltemp, 1, MPI_Op<T>()); \
return globaltemp; \
}
constexpr unsigned Dim

Definition at line 206 of file BareField.hpp.