OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
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
 Implementations for FFT constructor/destructor and transforms.
 
namespace  ippl::detail
 

Macros

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

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; \
"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; \
}
KOKKOS_INLINE_FUNCTION constexpr decltype(auto) apply(const View &view, const Coords &coords)
RangePolicy< View::rank, typenameView::execution_space, PolicyArgs... >::policy_type getRangePolicy(const View &view, int shift=0)
void parallel_reduce(const std::string &name, const ExecPolicy &policy, const FunctorType &functor, ReducerArgument &&... reducer)
constexpr unsigned Dim

Definition at line 206 of file BareField.hpp.