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

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.

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
StepMapping step_mapping
DataAccessPtn align_ptn Pattern whose steps define the group’s steps when AlignTo is used.

char group_name[256]

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


char group_type[256]

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


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

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


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

Type: hd_std::array< DataAccessPtn, MaxSegments >

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


hd_std::size_t num_stream_brokers { 0 }

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


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

Type: hd_std::array< SegmentRef< BrokerType >, MaxSegments >

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


hd_std::size_t num_segments { 0 }

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


StepMapping step_mapping { StepMapping::PerKind }

Type: StepMapping

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


DataAccessPtn align_ptn {}

Type: DataAccessPtn

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

Pattern whose steps define the group’s steps when AlignTo is used.

Return Name Description
SBIO_HD bool empty const inline
SBIO_HD GroupTopology Defaulted member function.
SBIO_HD GroupTopology inline
SBIO_HDIOStatus map_step inline Translate the group’s (already remapped) step index into the ordinal to fetch.
SBIO_HD const SegmentRef< BrokerType > & active_segment const inline Retrieve the correct, active, StreamBroker for a specified step.
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:160


SBIO_HD GroupTopology() = default

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

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


inline

inline SBIO_HDIOStatus map_step(const SegmentRef< BrokerType > & seg, hd_std::size_t step_idx, hd_std::size_t & ordinal)

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

Translate the group’s (already remapped) step index into the ordinal to fetch.

Whether the remap translation was successful.

Parameter Type Description
seg const SegmentRef< BrokerType > & The SegmentRef to fetch the orginal for.
step_idx hd_std::size_t The already properly remapped step index.
ordinal hd_std::size_t & The ordinal to fetch.

const inline

inline SBIO_HD const SegmentRef< BrokerType > & active_segment(hd_std::size_t step_idx, hd_std::size_t broker_no) const

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

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 BrokerType * active_stream_broker(hd_std::size_t step_idx, hd_std::size_t broker_no)

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

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

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

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


inline

inline SBIO_HD void set_segment(hd_std::size_t seg_no, SegmentRef< BrokerType > & seg)

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


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


inline

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

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


inline

inline SBIO_HDDataAccessPtn & pattern_for_segment(hd_std::size_t seg_no)

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


inline

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

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


const inline

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

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

Return Name Description
constexpr StreamPartitioningStrategy strategy static constexpr

static constexpr

constexpr StreamPartitioningStrategy strategy {
DataFormat::PartitioningStrategy
}

Type: constexpr StreamPartitioningStrategy

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

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

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

The type of data being read.


using DataAccessPtn = typename DataFormat::DataAccessPtn

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

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

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.