IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ParticleAttrib.hpp File Reference
#include "Ippl.h"
#include "Communicate/DataTypes.h"
#include "Utility/IpplTimings.h"
Include dependency graph for ParticleAttrib.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ippl

Macros

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

Functions

template<typename Attrib1, typename Field, typename Attrib2, typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::scatter (const Attrib1 &attrib, Field &f, const Attrib2 &pp)
 Non-class interface for scattering particle attribute data onto a field.
template<typename Attrib1, typename Field, typename Attrib2, typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::scatter (const Attrib1 &attrib, Field &f, const Attrib2 &pp, policy_type iteration_policy, typename Attrib1::hash_type hash_array={})
 Non-class interface for scattering with a custom iteration policy and optional index array.
template<typename Attrib1, typename Field, typename Attrib2>
void ippl::gather (Attrib1 &attrib, Field &f, const Attrib2 &pp, const bool addToAttribute=false)
 Non-class interface for gathering field data into a particle attribute.
 ippl::DefineParticleReduction (Sum, sum, valL+=myVal, std::plus) DefineParticleReduction(Max
 ippl::if (myVal > valL) valL
std::greater ippl::DefineParticleReduction (Min, min, if(myVal< valL) valL=myVal, std::less) DefineParticleReduction(Prod

Macro Definition Documentation

◆ DefineParticleReduction

#define DefineParticleReduction ( fun,
name,
op,
MPI_Op )
Value:
template <typename T, class... Properties> \
T temp = 0.0; \
using policy_type = Kokkos::RangePolicy<execution_space>; \
Kokkos::parallel_reduce( \
"fun", policy_type(0, *(this->localNum_mp)), \
KOKKOS_CLASS_LAMBDA(const size_t i, T& valL) { \
T myVal = dview_m(i); \
op; \
}, \
Kokkos::fun<T>(temp)); \
T globaltemp = 0.0; \
Comm->allreduce(temp, globaltemp, 1, MPI_Op<T>()); \
return globaltemp; \
}
ippl::ParticleAttrib< T > ParticleAttrib
Definition datatypes.h:35

Definition at line 332 of file ParticleAttrib.hpp.