ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
GhostComm::GhostExchange Struct Reference

Opaque handle for one in-flight halo exchange. More...

#include <HaloExchange.hpp>

+ Collaboration diagram for GhostComm::GhostExchange:

Public Attributes

ExchangeOp op {}
 
unsigned data_parts = 0u
 
BoxGeometry const * box = nullptr
 
HaloPlan const * plan = nullptr
 
std::unique_ptr< ExchangeBuffersowned
 Non-null only when the no-pool overload allocated the buffer pool.
 
ExchangeBuffersbufs = nullptr
 Non-owning pointer to the active buffer pool (caller's or owned).
 

Detailed Description

Opaque handle for one in-flight halo exchange.

Records the per-call metadata (op, data parts, geometry, plan) and holds a pointer to the ExchangeBuffers that back the in-flight messages. When a persistent ExchangeBuffers is supplied by the caller (via the pool overload), owned is null and bufs points to the caller's pool (no ownership). When the no-pool convenience overload is used, owned holds the heap-allocated pool and bufs == owned.get(); the pool is freed automatically when the handle is destroyed — on every exit path, including the GHOSTTRANS_NONE early return in halo_exchange_finish.

Created by halo_exchange_start and consumed exactly once by halo_exchange_finish.

Definition at line 109 of file HaloExchange.hpp.

Member Data Documentation

◆ box

BoxGeometry const* GhostComm::GhostExchange::box = nullptr

◆ bufs

ExchangeBuffers* GhostComm::GhostExchange::bufs = nullptr

Non-owning pointer to the active buffer pool (caller's or owned).

Definition at line 121 of file HaloExchange.hpp.

Referenced by GhostComm::halo_exchange_finish(), and GhostComm::halo_exchange_start().

◆ data_parts

unsigned GhostComm::GhostExchange::data_parts = 0u

◆ op

ExchangeOp GhostComm::GhostExchange::op {}

◆ owned

std::unique_ptr<ExchangeBuffers> GhostComm::GhostExchange::owned

Non-null only when the no-pool overload allocated the buffer pool.

Destroyed (and the pool freed) when the GhostExchange goes out of scope, guaranteeing cleanup on every exit path.

Definition at line 119 of file HaloExchange.hpp.

◆ plan

HaloPlan const* GhostComm::GhostExchange::plan = nullptr

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