FleCSI Core API Version: 2.3.2
 
Loading...
Searching...
No Matches
buffers::ragged Struct Reference

Utility to transfer the contents of ragged rows via buffers. More...

Public Member Functions

template<class R >
bool operator() (const R &rag, std::size_t i, bool &sent)
 Operator to communicate field data.
 
 ragged (Buffer &b, bool first=false)
 Prepare an object for writing.
 

Static Public Member Functions

template<class M , class R >
static void read (const M &rag, const Buffer &b, R &&ghost)
 The method to read received data.
 

Detailed Description

Utility to transfer the contents of ragged rows via buffers.

Type ragged is used to create actual buffers for setting up the data to be sent. It includes setting up buffers for both send and receive data. Each iteration should start sending data from the beginning: operator() will ignore data that has already been sent.

Constructor & Destructor Documentation

◆ ragged()

ragged ( Buffer & b,
bool first = false )
explicit

Prepare an object for writing.

Parameters
bsend buffer (for destination color)
firstwhether this is the first round of communication

Member Function Documentation

◆ operator()()

template<class R >
bool operator() ( const R & rag,
std::size_t i,
bool & sent )
nodiscard

Operator to communicate field data.

Parameters
ragaccessor or mutator for the ragged field to be communicated
ithe index i over the topology index-space of the field, e.g., cell i for an unstructured topology specialization with cells.
sentset whenever any data is sent, indicating that another iteration of buffers_category::xfer is required to receive it
Returns
boolean indicating that row data can be fitted in the buffer.

◆ read()

template<class M , class R >
static void read ( const M & rag,
const Buffer & b,
R && ghost )
static

The method to read received data.

An appropriate subrange of ghost is used on each call.

Parameters
ragThe mutator to the ragged field
bThe buffer where the data is received
ghostrange of local (ghost) indices