ZippedGroupRange
ZippedGroupRange
Section titled “ZippedGroupRange”#include <sbio/core/iteration.hh>template<class DS, class... Groups>class ZippedGroupRangeDefined 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)) {}).
Template Parameters
Section titled “Template Parameters”-
DSThe DataSource type (const or non-const). -
GroupsThe BrokerGroup types, all created from the DataSource.
Public Methods
Section titled “Public Methods”| 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. |
ZippedGroupRange
Section titled “ZippedGroupRange”inline
inline SBIO_HD ZippedGroupRange(DS & ds, const Groups &... groups)Defined in src/lib/sbio/core/iteration.hh:489
ZippedGroupRange
Section titled “ZippedGroupRange”ZippedGroupRange(const ZippedGroupRange &) = deleteDefined in src/lib/sbio/core/iteration.hh:494
Deleted constructor.
operator=
Section titled “operator=”ZippedGroupRange & operator=(const ZippedGroupRange &) = deleteDefined in src/lib/sbio/core/iteration.hh:495
Deleted assignment operator.
const inline
inline SBIO_HDConstIterator begin() constDefined 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() constDefined in src/lib/sbio/core/iteration.hh:557
cbegin
Section titled “cbegin”const inline
inline SBIO_HDConstIterator cbegin() constDefined in src/lib/sbio/core/iteration.hh:561
const inline
inline SBIO_HDConstIterator cend() constDefined in src/lib/sbio/core/iteration.hh:562
num_fetches
Section titled “num_fetches”const inline
inline SBIO_HD hd_std::size_t num_fetches() constDefined in src/lib/sbio/core/iteration.hh:567
The number of distinct fetches performed per step.
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
StepIdxType |
|
FTraits |
|
ExecutionPolicy |
|
StepRange |
|
StepIt |
|
FetchPlan |
|
Iterator |
|
ConstIterator |
StepIdxType
Section titled “StepIdxType”using StepIdxType = typename hd_std::remove_const_t< DS >::StepIdxTypeDefined in src/lib/sbio/core/iteration.hh:482
FTraits
Section titled “FTraits”using FTraits = typename hd_std::remove_const_t< DS >::DataFormatDefined in src/lib/sbio/core/iteration.hh:483
ExecutionPolicy
Section titled “ExecutionPolicy”using ExecutionPolicy = typename hd_std::remove_const_t< DS >::ExecutionPolicyDefined in src/lib/sbio/core/iteration.hh:484
StepRange
Section titled “StepRange”using StepRange = decltype(hd_std::declval< DS & >().steps())Defined in src/lib/sbio/core/iteration.hh:485
StepIt
Section titled “StepIt”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
FetchPlan
Section titled “FetchPlan”using FetchPlan = impl::ZipFetchPlan< ExecutionPolicy, FTraits, Groups... >Type: impl::ZipFetchPlan< ExecutionPolicy, FTraits, Groups… >
Defined in src/lib/sbio/core/iteration.hh:487
Iterator
Section titled “Iterator”using Iterator = IteratorImpl< FetchPlan >Type: IteratorImpl< FetchPlan >
Defined in src/lib/sbio/core/iteration.hh:546
ConstIterator
Section titled “ConstIterator”using ConstIterator = IteratorImpl< const FetchPlan >Type: IteratorImpl< const FetchPlan >
Defined in src/lib/sbio/core/iteration.hh:547
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
StepRange |
m_steps |
|
FetchPlan |
m_plan |
m_steps
Section titled “m_steps”StepRange m_stepsType: StepRange
Defined in src/lib/sbio/core/iteration.hh:570
m_plan
Section titled “m_plan”FetchPlan m_planType: FetchPlan
Defined in src/lib/sbio/core/iteration.hh:571