ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
orb5x::UnpackReceiveBufferFunctor Struct Reference

Kokkos-compatible real-attribute receive-unpacking functor. More...

#include "parmove.hpp"

Public Member Functions

void operator() (const int i) const
 Append one received marker record.
 
 UnpackReceiveBufferFunctor (Kokkos::View< Real * > arr_, Kokkos::View< int * > rdispl_, Kokkos::View< Real * > rbuf_, int natts_, int npmax_, int np_new_)
 Construct an attribute-major unpacking operation.
 
 UnpackReceiveBufferFunctor (Kokkos::View< Real **, Kokkos::LayoutStride > arr_, Kokkos::View< int * > rdispl_, Kokkos::View< Real * > rbuf_, int natts_, int npmax_, int np_new_)
 Construct a marker-major unpacking operation.
 

Public Attributes

Kokkos::View< Real **, Kokkos::LayoutStride > arr
 Marker-major destination.
 
Kokkos::View< Real * > arr_flat
 Attribute-major destination.
 
int natts
 Attributes per marker.
 
int np_new
 First append position in local storage.
 
int npmax
 Marker stride for flattened storage.
 
Kokkos::View< Real * > rbuf
 Packed received records.
 
Kokkos::View< int * > rdispl
 Source offsets (retained compatibility data).
 
bool use_flat = false
 Select flattened storage.
 

Detailed Description

Kokkos-compatible real-attribute receive-unpacking functor.

Constructor & Destructor Documentation

◆ UnpackReceiveBufferFunctor() [1/2]

orb5x::UnpackReceiveBufferFunctor::UnpackReceiveBufferFunctor ( Kokkos::View< Real **, Kokkos::LayoutStride >  arr_,
Kokkos::View< int * >  rdispl_,
Kokkos::View< Real * >  rbuf_,
int  natts_,
int  npmax_,
int  np_new_ 
)
inline

Construct a marker-major unpacking operation.

Parameters
[out]arr_Destination matrix indexed as [marker][attribute].
[in]rdispl_Source displacements retained by the migration plan.
[in]rbuf_Contiguous received records.
[in]natts_Number of attributes per marker.
[in]npmax_Allocated particle stride (unused for marker-major storage).
[in]np_new_First destination row at which received records are appended.

◆ UnpackReceiveBufferFunctor() [2/2]

orb5x::UnpackReceiveBufferFunctor::UnpackReceiveBufferFunctor ( Kokkos::View< Real * >  arr_,
Kokkos::View< int * >  rdispl_,
Kokkos::View< Real * >  rbuf_,
int  natts_,
int  npmax_,
int  np_new_ 
)
inline

Construct an attribute-major unpacking operation.

Parameters
[out]arr_Flattened destination indexed as attribute*npmax + marker.
[in]rdispl_Source displacements retained by the migration plan.
[in]rbuf_Contiguous received records.
[in]natts_Number of attributes per marker.
[in]npmax_Allocated particle stride in the flattened destination.
[in]np_new_First destination marker at which records are appended.

Member Function Documentation

◆ operator()()

void orb5x::UnpackReceiveBufferFunctor::operator() ( const int  i) const
inline

Append one received marker record.

Parameters
[in]iZero-based index in the receive buffer.

References arr, arr_flat, natts, np_new, npmax, rbuf, and use_flat.

Member Data Documentation

◆ arr

Kokkos::View<Real**, Kokkos::LayoutStride> orb5x::UnpackReceiveBufferFunctor::arr

Marker-major destination.

Referenced by operator()().

◆ arr_flat

Kokkos::View<Real*> orb5x::UnpackReceiveBufferFunctor::arr_flat

Attribute-major destination.

Referenced by operator()().

◆ natts

int orb5x::UnpackReceiveBufferFunctor::natts

Attributes per marker.

Referenced by operator()().

◆ np_new

int orb5x::UnpackReceiveBufferFunctor::np_new

First append position in local storage.

Referenced by operator()().

◆ npmax

int orb5x::UnpackReceiveBufferFunctor::npmax

Marker stride for flattened storage.

Referenced by operator()().

◆ rbuf

Kokkos::View<Real*> orb5x::UnpackReceiveBufferFunctor::rbuf

Packed received records.

Referenced by operator()().

◆ rdispl

Kokkos::View<int*> orb5x::UnpackReceiveBufferFunctor::rdispl

Source offsets (retained compatibility data).

◆ use_flat

bool orb5x::UnpackReceiveBufferFunctor::use_flat = false

Select flattened storage.

Referenced by operator()().


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