Skip to content

ZippedGroupRange

#include <sbio/core/iteration.hh>
template<class DS, class... Groups>
class ZippedGroupRange

Defined in src/lib/sbio/core/iteration.hh:480

Iterate the steps of a DataSource with fetches over a set of BrokerGroups.

Comapred to the straight iteration/ranges on the DataSource direclty, zipping provides the opportunity to optimize the IO fetches. As the set of BrokerGroups, and therefore, the underlying StreamBrokers corresponding to their SegmentRefs, is known up front, fetches can be performed once per zipped-group. I.e., when BrokerGroup’s share StreamBrokers, the fetches on the shared StreamBrokers is only performed once, as opposed to iterating separately with the two BrokerGroups independently.

Each parallel executing unit (e.g. a thread or rank, etc.) iterating will setup its own range-based for loop (for (auto step : zip(ds, bg1, bg2)) {}).

Return Name Description
SBIO_HD ZippedGroupRange inline
ZippedGroupRange Deleted constructor.
ZippedGroupRange & operator= Deleted assignment operator.
SBIO_HDConstIterator begin const inline Return an iterator at the first step for this unit, with its data fetched.
SBIO_HDConstIterator end const inline
SBIO_HDConstIterator cbegin const inline
SBIO_HDConstIterator cend const inline
SBIO_HD hd_std::size_t num_fetches const inline The number of distinct fetches performed per step.

inline

inline SBIO_HD ZippedGroupRange(DS & ds, const Groups &... groups)

Defined in src/lib/sbio/core/iteration.hh:489


ZippedGroupRange(const ZippedGroupRange &) = delete

Defined in src/lib/sbio/core/iteration.hh:494

Deleted constructor.


ZippedGroupRange & operator=(const ZippedGroupRange &) = delete

Defined in src/lib/sbio/core/iteration.hh:495

Deleted assignment operator.


const inline

inline SBIO_HDConstIterator begin() const

Defined in src/lib/sbio/core/iteration.hh:554

Return an iterator at the first step for this unit, with its data fetched.


const inline

inline SBIO_HDConstIterator end() const

Defined in src/lib/sbio/core/iteration.hh:557


const inline

inline SBIO_HDConstIterator cbegin() const

Defined in src/lib/sbio/core/iteration.hh:561


const inline

inline SBIO_HDConstIterator cend() const

Defined in src/lib/sbio/core/iteration.hh:562


const inline

inline SBIO_HD hd_std::size_t num_fetches() const

Defined in src/lib/sbio/core/iteration.hh:567

The number of distinct fetches performed per step.

Name Description
StepIdxType
FTraits
ExecutionPolicy
StepRange
StepIt
FetchPlan
Iterator
ConstIterator

using StepIdxType = typename hd_std::remove_const_t< DS >::StepIdxType

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


using FTraits = typename hd_std::remove_const_t< DS >::DataFormat

Defined in src/lib/sbio/core/iteration.hh:483


using ExecutionPolicy = typename hd_std::remove_const_t< DS >::ExecutionPolicy

Defined in src/lib/sbio/core/iteration.hh:484


using StepRange = decltype(hd_std::declval< DS & >().steps())

Defined in src/lib/sbio/core/iteration.hh:485


using StepIt = decltype(hd_std::declval< const StepRange & >().begin())

Type: decltype(hd_std::declval< const StepRange & >().begin())

Defined in src/lib/sbio/core/iteration.hh:486


using FetchPlan = impl::ZipFetchPlan< ExecutionPolicy, FTraits, Groups... >

Type: impl::ZipFetchPlan< ExecutionPolicy, FTraits, Groups… >

Defined in src/lib/sbio/core/iteration.hh:487


using Iterator = IteratorImpl< FetchPlan >

Type: IteratorImpl< FetchPlan >

Defined in src/lib/sbio/core/iteration.hh:546


using ConstIterator = IteratorImpl< const FetchPlan >

Type: IteratorImpl< const FetchPlan >

Defined in src/lib/sbio/core/iteration.hh:547

Return Name Description
StepRange m_steps
FetchPlan m_plan

StepRange m_steps

Type: StepRange

Defined in src/lib/sbio/core/iteration.hh:570


FetchPlan m_plan

Type: FetchPlan

Defined in src/lib/sbio/core/iteration.hh:571