GroupTopology
GroupTopology
Section titled “GroupTopology”#include <sbio/core/topology.hh>template<IsStreamBroker BrokerType, hd_std::size_t MaxSegments = 128>struct GroupTopologyDefined in src/lib/sbio/core/topology.hh:102
The layout, post any sorting, of all segment references in a BrokerGroup.
The topology organization is established once during the DISCOVERY state transition when metadata is parsed.
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
group_name |
variable |
Declared here |
group_type |
variable |
Declared here |
stream_brokers |
variable |
Declared here |
broker_access_ptns |
variable |
Declared here |
num_stream_brokers |
variable |
Declared here |
segments |
variable |
Declared here |
num_segments |
variable |
Declared here |
empty |
function |
Declared here |
GroupTopology |
function |
Declared here |
GroupTopology |
function |
Declared here |
active_stream_broker |
function |
Declared here |
active_access_ptn |
function |
Declared here |
remap_step_idx |
function |
Declared here |
segment |
function |
Declared here |
set_segment |
function |
Declared here |
set_stream_broker |
function |
Declared here |
broker_for_segment |
function |
Declared here |
pattern_for_segment |
function |
Declared here |
stream_broker |
function |
Declared here |
access_ptn |
function |
Declared here |
strategy |
variable |
Declared here |
build_topology |
function |
Declared here |
DataFormat |
typedef |
Declared here |
DataAccessPtn |
typedef |
Declared here |
StepIdxType |
typedef |
Declared here |
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
char |
group_name |
|
char |
group_type |
|
hd_std::array< BrokerType *, MaxSegments > |
stream_brokers |
|
hd_std::array< DataAccessPtn, MaxSegments > |
broker_access_ptns |
|
hd_std::size_t |
num_stream_brokers |
|
hd_std::array< SegmentRef< BrokerType >, MaxSegments > |
segments |
|
hd_std::size_t |
num_segments |
group_name
Section titled “group_name”char group_name { 0 }Defined in src/lib/sbio/core/topology.hh:125
group_type
Section titled “group_type”char group_type { 0 }Defined in src/lib/sbio/core/topology.hh:126
stream_brokers
Section titled “stream_brokers”hd_std::array< BrokerType *, MaxSegments > stream_brokers { nullptr }Defined in src/lib/sbio/core/topology.hh:128
broker_access_ptns
Section titled “broker_access_ptns”hd_std::array< DataAccessPtn, MaxSegments > broker_access_ptns {}Defined in src/lib/sbio/core/topology.hh:129
num_stream_brokers
Section titled “num_stream_brokers”hd_std::size_t num_stream_brokers { 0 }Defined in src/lib/sbio/core/topology.hh:130
segments
Section titled “segments”hd_std::array< SegmentRef< BrokerType >, MaxSegments > segments {}Defined in src/lib/sbio/core/topology.hh:132
num_segments
Section titled “num_segments”hd_std::size_t num_segments { 0 }Defined in src/lib/sbio/core/topology.hh:133
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
SBIO_HD bool |
empty const inline |
|
SBIO_HD |
GroupTopology |
Defaulted member function. |
SBIO_HD |
GroupTopology inline |
|
SBIO_HD BrokerType * |
active_stream_broker inline |
Retrieve the correct, active, StreamBroker for a specified step. |
SBIO_HD const DataAccessPtn & |
active_access_ptn inline |
Retrieve the correct DataAccessPtn for the currently active StreamBroker. |
SBIO_HD const hd_std::size_t |
remap_step_idx inline |
Remap a specific step index to account for StreamBroker inactivity and types. |
SBIO_HD const SegmentRef< BrokerType > & |
segment const inline |
|
SBIO_HD void |
set_segment inline |
|
SBIO_HD void |
set_stream_broker inline |
|
SBIO_HD BrokerType * |
broker_for_segment inline |
|
SBIO_HDDataAccessPtn & |
pattern_for_segment inline |
|
SBIO_HD BrokerType * |
stream_broker inline |
|
SBIO_HD const DataAccessPtn & |
access_ptn const inline |
const inline
inline SBIO_HD bool empty() constDefined in src/lib/sbio/core/topology.hh:135
GroupTopology
Section titled “GroupTopology”SBIO_HD GroupTopology() = defaultDefined in src/lib/sbio/core/topology.hh:139
Defaulted member function.
GroupTopology
Section titled “GroupTopology”inline
inline SBIO_HD GroupTopology(const char * name, const char * type, hd_std::array< SegmentRef< BrokerType >, MaxSegments > segs, hd_std::size_t n_segs)Defined in src/lib/sbio/core/topology.hh:141
active_stream_broker
Section titled “active_stream_broker”inline
inline SBIO_HD BrokerType * active_stream_broker(hd_std::size_t step_idx, hd_std::size_t broker_no)Defined in src/lib/sbio/core/topology.hh:314
Retrieve the correct, active, StreamBroker for a specified step.
Depending on the data format and various traits and strategies, not all StreamBrokers may be active/available for every step. This function translates a request for a specific broker, for a specific step, into the correct active StreamBroker.
Returns
Section titled “Returns”The active StreamBroker - this may more may not correspond to the StreamBroker indicated by broker_no.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
step_idx |
hd_std::size_t |
The step for which the active broker is needed. |
broker_no |
hd_std::size_t |
The uncorrected index for the StreamBroker. |
active_access_ptn
Section titled “active_access_ptn”inline
inline SBIO_HD const DataAccessPtn & active_access_ptn(hd_std::size_t step_idx, hd_std::size_t broker_no)Defined in src/lib/sbio/core/topology.hh:339
Retrieve the correct DataAccessPtn for the currently active StreamBroker.
Depending on the data format and various traits and strategies, not all StreamBrokers may be active/available for every step. This function translates a request for a specific broker, for a specific step, into the correct active StreamBroker and returns its associated DataAccessPtn.
Returns
Section titled “Returns”The DataAccessPtn for the active StreamBroker.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
step_idx |
hd_std::size_t |
The step for which the active broker is needed. |
broker_no |
hd_std::size_t |
The uncorrected index for the StreamBroker. |
remap_step_idx
Section titled “remap_step_idx”inline
inline SBIO_HD const hd_std::size_t remap_step_idx(hd_std::size_t step_idx)Defined in src/lib/sbio/core/topology.hh:372
Remap a specific step index to account for StreamBroker inactivity and types.
Depending on the data format and various traits and strategies, not all StreamBrokers may be active/available for every step. As a result, the step indices may increment faster than the logical count of steps (because it is simultaneously counting steps, and cycling between active brokers). This function will appropriately remap an uncorrected step index to account for this.
Furthermore, all data formats are required to use a type (StepIdxType) that can be converted into a simple integral value (size_t). How this conversion is done is not explicitly specified - this function will convert the index to a size_t. Anything downstream of this can use size_t instead of the data format specific types.
Returns
Section titled “Returns”The ‘corrected’ step index, accounting for any StreamBroker activity cycling, and in a size_t integral format.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
step_idx |
hd_std::size_t |
The unadjusted step index. |
segment
Section titled “segment”const inline
inline SBIO_HD const SegmentRef< BrokerType > & segment(hd_std::size_t seg_no) constDefined in src/lib/sbio/core/topology.hh:386
set_segment
Section titled “set_segment”inline
inline SBIO_HD void set_segment(hd_std::size_t seg_no, SegmentRef< BrokerType > & seg)Defined in src/lib/sbio/core/topology.hh:389
set_stream_broker
Section titled “set_stream_broker”inline
inline SBIO_HD void set_stream_broker(hd_std::size_t broker_no, BrokerType * broker, DataAccessPtn ptn)Defined in src/lib/sbio/core/topology.hh:392
broker_for_segment
Section titled “broker_for_segment”inline
inline SBIO_HD BrokerType * broker_for_segment(hd_std::size_t seg_no)Defined in src/lib/sbio/core/topology.hh:400
pattern_for_segment
Section titled “pattern_for_segment”inline
inline SBIO_HDDataAccessPtn & pattern_for_segment(hd_std::size_t seg_no)Defined in src/lib/sbio/core/topology.hh:403
stream_broker
Section titled “stream_broker”inline
inline SBIO_HD BrokerType * stream_broker(hd_std::size_t broker_no)Defined in src/lib/sbio/core/topology.hh:407
access_ptn
Section titled “access_ptn”const inline
inline SBIO_HD const DataAccessPtn & access_ptn(hd_std::size_t broker_no) constDefined in src/lib/sbio/core/topology.hh:410
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr StreamPartitioningStrategy |
strategy static constexpr |
strategy
Section titled “strategy”static constexpr
constexpr StreamPartitioningStrategy strategy { DataFormat::PartitioningStrategy }Defined in src/lib/sbio/core/topology.hh:121
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
SBIO_HDGroupTopology< BrokerType, MaxSegments > |
build_topology static inline |
Build the GroupTopology for the requested name. |
build_topology
Section titled “build_topology”static inline
static inline SBIO_HDGroupTopology< BrokerType, MaxSegments > build_topology(const char * name, BrokerType * brokers, hd_std::size_t num_brokers)Defined in src/lib/sbio/core/topology.hh:181
Build the GroupTopology for the requested name.
The available StreamBrokers will have their metadata queried to test if they belong to the requested named group. (There is a wildcard placeholder which will incorporate all of the broker/segments into the group, but this is currently fragile as the various segments must actually have the same shape.)
Returns
Section titled “Returns”The constructed GroupTopology which can be used to create a BrokerGroup.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
const char * |
The name to build the topology for. |
brokers |
BrokerType * |
The available StreamBrokers to organize into the topology. |
num_brokers |
hd_std::size_t |
The number of available StreamBrokers. |
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
DataFormat |
The type of data being read. |
DataAccessPtn |
The type of the enumerator used to specify access patterns used for the format. |
StepIdxType |
The type used to request a specific step from the Stream. |
DataFormat
Section titled “DataFormat”using DataFormat = typename BrokerType::DataFormatDefined in src/lib/sbio/core/topology.hh:106
The type of data being read.
DataAccessPtn
Section titled “DataAccessPtn”using DataAccessPtn = typename DataFormat::DataAccessPtnDefined in src/lib/sbio/core/topology.hh:111
The type of the enumerator used to specify access patterns used for the format.
StepIdxType
Section titled “StepIdxType”using StepIdxType = typename DataFormat::StepIdxTypeDefined in src/lib/sbio/core/topology.hh:119
The type used to request a specific step from the Stream.
This type is required and guaranteed to be convertible std::size_t; however, different data format’s may use different underlying types.