|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Describes one rank's window into a globally-distributed dataset. More...
#include <SerializerBase.hpp>
Public Member Functions | |
| ArrayGlobalOffset (index __size, index __offset) | |
| Construct with explicit local size and global offset. | |
| index | size () const |
| Local size this rank owns (in element units of the caller's choosing). | |
| index | offset () const |
| Global offset of this rank's data (or a sentinel value, see Offset_Parts etc.). | |
| ArrayGlobalOffset | operator* (index R) const |
Scale the descriptor's element count by R (and the offset too if it is a real offset, not a sentinel). Used for byte-level offsets: elemOffset * sizeof(T). | |
| ArrayGlobalOffset | operator/ (index R) const |
| Inverse of operator*. Real-offset descriptors scale both size and offset; sentinel descriptors only scale the size. | |
| void | CheckMultipleOf (index R) const |
Assert that both size and offset are multiples of R. | |
| bool | operator== (const ArrayGlobalOffset &other) const |
Equality: sentinel offsets compare only by offset, real-offset descriptors compare by the full (size, offset) pair. | |
| operator std::string () const | |
| Pretty-printed representation for logging. | |
| bool | isDist () const |
| Whether this descriptor carries a real distributed offset (rather than a sentinel like Offset_Parts). | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const ArrayGlobalOffset &v) |
Describes one rank's window into a globally-distributed dataset.
Stores a (localSize, globalOffset) pair. The offset is overloaded to carry the special sentinels Offset_Parts / Offset_One / Offset_EvenSplit / Offset_Unknown (negative values). Multiplication / division are defined so that byte offsets can be derived from element offsets (offset * sizeof(T)) with overflow guards.
Definition at line 32 of file SerializerBase.hpp.
Construct with explicit local size and global offset.
Definition at line 40 of file SerializerBase.hpp.
|
inline |
Assert that both size and offset are multiples of R.
Used when translating between element and byte offsets.
Definition at line 77 of file SerializerBase.hpp.
|
inline |
Whether this descriptor carries a real distributed offset (rather than a sentinel like Offset_Parts).
Definition at line 104 of file SerializerBase.hpp.
|
inline |
Global offset of this rank's data (or a sentinel value, see Offset_Parts etc.).
Definition at line 46 of file SerializerBase.hpp.
|
inline |
Pretty-printed representation for logging.
Definition at line 97 of file SerializerBase.hpp.
|
inline |
Scale the descriptor's element count by R (and the offset too if it is a real offset, not a sentinel). Used for byte-level offsets: elemOffset * sizeof(T).
Definition at line 51 of file SerializerBase.hpp.
|
inline |
Inverse of operator*. Real-offset descriptors scale both size and offset; sentinel descriptors only scale the size.
Definition at line 67 of file SerializerBase.hpp.
|
inline |
Equality: sentinel offsets compare only by offset, real-offset descriptors compare by the full (size, offset) pair.
Definition at line 88 of file SerializerBase.hpp.
|
inline |
Local size this rank owns (in element units of the caller's choosing).
Definition at line 43 of file SerializerBase.hpp.
|
friend |
Definition at line 109 of file SerializerBase.hpp.