Skip to content

GroupTopology

#include <sbio/core/topology.hh>
template<IsStreamBroker BrokerType, hd_std::size_t MaxSegments = 128>
struct GroupTopology

Defined 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.

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
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

char group_name { 0 }

Defined in src/lib/sbio/core/topology.hh:125


char group_type { 0 }

Defined in src/lib/sbio/core/topology.hh:126


hd_std::array< BrokerType *, MaxSegments > stream_brokers { nullptr }

Defined in src/lib/sbio/core/topology.hh:128


hd_std::array< DataAccessPtn, MaxSegments > broker_access_ptns {}

Defined in src/lib/sbio/core/topology.hh:129


hd_std::size_t num_stream_brokers { 0 }

Defined in src/lib/sbio/core/topology.hh:130


hd_std::array< SegmentRef< BrokerType >, MaxSegments > segments {}

Defined in src/lib/sbio/core/topology.hh:132


hd_std::size_t num_segments { 0 }

Defined in src/lib/sbio/core/topology.hh:133

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() const

Defined in src/lib/sbio/core/topology.hh:135


SBIO_HD GroupTopology() = default

Defined in src/lib/sbio/core/topology.hh:139

Defaulted member function.


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


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.

The active StreamBroker - this may more may not correspond to the StreamBroker indicated by broker_no.

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.

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.

The DataAccessPtn for the active StreamBroker.

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.

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.

The ‘corrected’ step index, accounting for any StreamBroker activity cycling, and in a size_t integral format.

Parameter Type Description
step_idx hd_std::size_t The unadjusted step index.

const inline

inline SBIO_HD const SegmentRef< BrokerType > & segment(hd_std::size_t seg_no) const

Defined in src/lib/sbio/core/topology.hh:386


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


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


inline

inline SBIO_HD BrokerType * broker_for_segment(hd_std::size_t seg_no)

Defined in src/lib/sbio/core/topology.hh:400


inline

inline SBIO_HDDataAccessPtn & pattern_for_segment(hd_std::size_t seg_no)

Defined in src/lib/sbio/core/topology.hh:403


inline

inline SBIO_HD BrokerType * stream_broker(hd_std::size_t broker_no)

Defined in src/lib/sbio/core/topology.hh:407


const inline

inline SBIO_HD const DataAccessPtn & access_ptn(hd_std::size_t broker_no) const

Defined in src/lib/sbio/core/topology.hh:410

Return Name Description
constexpr StreamPartitioningStrategy strategy static constexpr

static constexpr

constexpr StreamPartitioningStrategy strategy {
DataFormat::PartitioningStrategy
}

Defined in src/lib/sbio/core/topology.hh:121

Return Name Description
SBIO_HDGroupTopology< BrokerType, MaxSegments > build_topology static inline Build the GroupTopology for the requested name.

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.)

The constructed GroupTopology which can be used to create a BrokerGroup.

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.
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.

using DataFormat = typename BrokerType::DataFormat

Defined in src/lib/sbio/core/topology.hh:106

The type of data being read.


using DataAccessPtn = typename DataFormat::DataAccessPtn

Defined in src/lib/sbio/core/topology.hh:111

The type of the enumerator used to specify access patterns used for the format.


using StepIdxType = typename DataFormat::StepIdxType

Defined 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.