![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Class that stores marshalled data for ghost communications. More...
#include <particle_packing.hpp>
Public Member Functions | |
| char * | data () |
| Returns a pointer to the non-bond storage. | |
| const char * | data () const |
| std::size_t | size () const |
| Returns the number of elements in the non-bond storage. | |
| void | resize (std::size_t new_size) |
| Resizes the underlying storage s.t. | |
| auto & | bonds () |
| Returns a reference to the bond storage. | |
| const auto & | bonds () const |
| auto | make_span () |
Class that stores marshalled data for ghost communications.
To store and retrieve data, use the adapter classes below.
Invariant: every byte in the non-bond buffer is written by the caller (pack_cells / MPI irecv) before it is read (unpack_cells / add_forces). The buffer therefore uses a default-init allocator so that resize()-on-grow does not zero-fill bytes that will be immediately overwritten, eliminating the __memset_avx2 overhead visible in perf profiles at large particle counts. The bond buffer is kept as a plain std::vector<char> because it is serialized via boost.mpi (which requires exact byte semantics) and is on the cold resort-only path.
Definition at line 91 of file particle_packing.hpp.
|
inline |
Returns a reference to the bond storage.
Definition at line 110 of file particle_packing.hpp.
Referenced by GhostComm::pack_cells(), GhostComm::anonymous_namespace{HaloExchange.cpp}::run_collective(), and GhostComm::unpack_cells().
|
inline |
Definition at line 111 of file particle_packing.hpp.
|
inline |
Returns a pointer to the non-bond storage.
Definition at line 96 of file particle_packing.hpp.
|
inline |
Definition at line 97 of file particle_packing.hpp.
|
inline |
Definition at line 113 of file particle_packing.hpp.
Referenced by GhostComm::add_dip_fld(), GhostComm::add_forces(), GhostComm::add_rattle(), GhostComm::local_cell_copy(), GhostComm::pack_cells(), and GhostComm::unpack_cells().
|
inline |
Resizes the underlying storage s.t.
the object is capable of holding new_size chars. Bytes added by growth are left uninitialized; the caller must write them (pack_cells / MPI irecv) before reading.
Definition at line 107 of file particle_packing.hpp.
Referenced by GhostComm::local_cell_copy(), GhostComm::pack_cells(), and GhostComm::anonymous_namespace{HaloExchange.cpp}::run_collective().
|
inline |
Returns the number of elements in the non-bond storage.
Definition at line 100 of file particle_packing.hpp.
Referenced by GhostComm::pack_cells(), GhostComm::anonymous_namespace{HaloExchange.cpp}::run_collective(), and GhostComm::unpack_cells().