PayloadOffsetCache
PayloadOffsetCache
Section titled “PayloadOffsetCache”#include <sbio/core/state_handle.hh>struct PayloadOffsetCacheDefined in src/lib/sbio/core/state_handle.hh:169
A cache of field offsets within fetched DataUnits.
The cache is intended to live on the SegmentCursor which can be constructed in a safe manner per each EPolicy (defined via SegmentState). Usage in this manner allows safe writes to the cache without synchronization.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
SBIO_HD bool |
find const inline |
Look up the cached offset of a field. |
SBIO_HD void |
store inline |
Cache the offset at which a field was found. |
const inline
inline SBIO_HD bool find(hd_std::uint32_t field_id, hd_std::uint32_t & offset) constDefined in src/lib/sbio/core/state_handle.hh:180
Look up the cached offset of a field.
Returns
Section titled “Returns”true if the field has a cached offset.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
field_id |
hd_std::uint32_t |
The field’s position in the MetadataInventory. |
offset |
hd_std::uint32_t & |
The cached offset, if found. |
inline
inline SBIO_HD void store(hd_std::uint32_t field_id, hd_std::uint32_t offset)Defined in src/lib/sbio/core/state_handle.hh:196
Cache the offset at which a field was found.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
field_id |
hd_std::uint32_t |
The field’s position in the MetadataInventory. |
offset |
hd_std::uint32_t |
The offset of the field within the DataUnit. |
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr hd_std::size_t |
NumSlots static constexpr |
|
constexpr hd_std::uint32_t |
NoField static constexpr |
NumSlots
Section titled “NumSlots”static constexpr
constexpr hd_std::size_t NumSlots { 8 }Defined in src/lib/sbio/core/state_handle.hh:170
NoField
Section titled “NoField”static constexpr
constexpr hd_std::uint32_t NoField { 0xFFFFFFFFu }Defined in src/lib/sbio/core/state_handle.hh:171
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
hd_std::array< Slot, NumSlots > |
m_slots |
m_slots
Section titled “m_slots”hd_std::array< Slot, NumSlots > m_slots {}Type: hd_std::array< Slot, NumSlots >
Defined in src/lib/sbio/core/state_handle.hh:206