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

Kokkos-compatible real-attribute packing functor. More...

#include "parmove.hpp"

Public Member Functions

void operator() (const int i) const
 Pack one outgoing marker record.
 
 PackSendBufferFunctor (Kokkos::View< Real * > arr_, Kokkos::View< int * > iphole_, Kokkos::View< int * > sdispl_, Kokkos::View< Real * > sbuf_, int natts_, int npmax_)
 Construct an attribute-major packing operation.
 
 PackSendBufferFunctor (Kokkos::View< Real **, Kokkos::LayoutStride > arr_, Kokkos::View< int * > iphole_, Kokkos::View< int * > sdispl_, Kokkos::View< Real * > sbuf_, int natts_, int npmax_)
 Construct a marker-major packing operation.
 

Public Attributes

Kokkos::View< Real **, Kokkos::LayoutStride > arr
 Marker-major source.
 
Kokkos::View< Real * > arr_flat
 Attribute-major source.
 
Kokkos::View< int * > iphole
 Local indices to pack.
 
int natts
 Attributes per marker.
 
int npmax
 Marker stride for flattened storage.
 
Kokkos::View< Real * > sbuf
 Packed output records.
 
Kokkos::View< int * > sdispl
 Destination offsets (retained compatibility data).
 
bool use_flat = false
 Select flattened storage.
 

Detailed Description

Kokkos-compatible real-attribute packing functor.

Note
The current MPI execution path performs equivalent packing on host.

Constructor & Destructor Documentation

◆ PackSendBufferFunctor() [1/2]

orb5x::PackSendBufferFunctor::PackSendBufferFunctor ( Kokkos::View< Real **, Kokkos::LayoutStride >  arr_,
Kokkos::View< int * >  iphole_,
Kokkos::View< int * >  sdispl_,
Kokkos::View< Real * >  sbuf_,
int  natts_,
int  npmax_ 
)
inline

Construct a marker-major packing operation.

Parameters
[in]arr_Source matrix indexed as [marker][attribute].
[in]iphole_Ordered local marker indices to send.
[in]sdispl_Destination displacements retained by the migration plan.
[out]sbuf_Contiguous packed send buffer.
[in]natts_Number of attributes per marker.
[in]npmax_Allocated particle stride (unused for marker-major storage).

◆ PackSendBufferFunctor() [2/2]

orb5x::PackSendBufferFunctor::PackSendBufferFunctor ( Kokkos::View< Real * >  arr_,
Kokkos::View< int * >  iphole_,
Kokkos::View< int * >  sdispl_,
Kokkos::View< Real * >  sbuf_,
int  natts_,
int  npmax_ 
)
inline

Construct an attribute-major packing operation.

Parameters
[in]arr_Flattened source indexed as attribute*npmax + marker.
[in]iphole_Ordered local marker indices to send.
[in]sdispl_Destination displacements retained by the migration plan.
[out]sbuf_Contiguous packed send buffer.
[in]natts_Number of attributes per marker.
[in]npmax_Allocated particle stride in the flattened source.

Member Function Documentation

◆ operator()()

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

Pack one outgoing marker record.

Parameters
[in]iIndex in the ordered hole list.

References arr, arr_flat, iphole, natts, npmax, sbuf, and use_flat.

Member Data Documentation

◆ arr

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

Marker-major source.

Referenced by operator()().

◆ arr_flat

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

Attribute-major source.

Referenced by operator()().

◆ iphole

Kokkos::View<int*> orb5x::PackSendBufferFunctor::iphole

Local indices to pack.

Referenced by operator()().

◆ natts

int orb5x::PackSendBufferFunctor::natts

Attributes per marker.

Referenced by operator()().

◆ npmax

int orb5x::PackSendBufferFunctor::npmax

Marker stride for flattened storage.

Referenced by operator()().

◆ sbuf

Kokkos::View<Real*> orb5x::PackSendBufferFunctor::sbuf

Packed output records.

Referenced by operator()().

◆ sdispl

Kokkos::View<int*> orb5x::PackSendBufferFunctor::sdispl

Destination offsets (retained compatibility data).

◆ use_flat

bool orb5x::PackSendBufferFunctor::use_flat = false

Select flattened storage.

Referenced by operator()().


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