ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
orb5x::ParticleParallelFunctor< Functor > Struct Template Reference

Adapt an arbitrary particle operation to a Kokkos range kernel. More...

#include "part.hpp"

Public Member Functions

void operator() (const int ip) const
 Invoke the wrapped operation for one zero-based marker index.
 
 ParticleParallelFunctor (Kokkos::View< Real ** > pic1_, Kokkos::View< Real ** > pic2_, int npart_, Functor func_)
 Bind particle arrays, active count, and operation.
 

Public Attributes

Functor func
 Device-callable operation receiving both arrays and indices.
 
int npart
 Number of active leading rows.
 
Kokkos::View< Real ** > pic1
 Evolving marker properties.
 
Kokkos::View< Real ** > pic2
 Invariant marker properties.
 

Detailed Description

template<typename Functor>
struct orb5x::ParticleParallelFunctor< Functor >

Adapt an arbitrary particle operation to a Kokkos range kernel.

Constructor & Destructor Documentation

◆ ParticleParallelFunctor()

template<typename Functor >
orb5x::ParticleParallelFunctor< Functor >::ParticleParallelFunctor ( Kokkos::View< Real ** >  pic1_,
Kokkos::View< Real ** >  pic2_,
int  npart_,
Functor  func_ 
)
inline

Bind particle arrays, active count, and operation.

Parameters
[in]pic1_Evolving marker-property view.
[in]pic2_Invariant marker-property view.
[in]npart_Number of active leading marker rows.
[in]func_Device-callable operation to invoke for every marker.

Member Function Documentation

◆ operator()()

template<typename Functor >
void orb5x::ParticleParallelFunctor< Functor >::operator() ( const int  ip) const
inline

Invoke the wrapped operation for one zero-based marker index.

Parameters
[in]ipLocal marker index in [0,npart).

References orb5x::ParticleParallelFunctor< Functor >::func, orb5x::ParticleParallelFunctor< Functor >::npart, orb5x::ParticleParallelFunctor< Functor >::pic1, and orb5x::ParticleParallelFunctor< Functor >::pic2.

Member Data Documentation

◆ func

template<typename Functor >
Functor orb5x::ParticleParallelFunctor< Functor >::func

Device-callable operation receiving both arrays and indices.

Referenced by orb5x::ParticleParallelFunctor< Functor >::operator()().

◆ npart

template<typename Functor >
int orb5x::ParticleParallelFunctor< Functor >::npart

Number of active leading rows.

Referenced by orb5x::ParticleParallelFunctor< Functor >::operator()().

◆ pic1

template<typename Functor >
Kokkos::View<Real**> orb5x::ParticleParallelFunctor< Functor >::pic1

Evolving marker properties.

Referenced by orb5x::ParticleParallelFunctor< Functor >::operator()().

◆ pic2

template<typename Functor >
Kokkos::View<Real**> orb5x::ParticleParallelFunctor< Functor >::pic2

Invariant marker properties.

Referenced by orb5x::ParticleParallelFunctor< Functor >::operator()().


The documentation for this struct was generated from the following file: