Skip to content

CompositeDataResult

#include <sbio/core/result.hh>
template<typename MemTag = ncarray::HostTag>
struct CompositeDataResult

Defined in src/lib/sbio/core/result.hh:87

An organized result returned from a BrokerGroup managing one or more brokers.

The BrokerGroup will return an organized data set that may contain data from multiple segment references, which may be managed by multiple StreamBrokers. If reading in batch, the final composite result may also have an access that corresponds to the number of steps in the batch.

  • MemTag Identifier for the location of the underlying memory (CPU or GPU).
Return Name Description
const void ** data Pointer table of SegmentRef results.
hd_std::size_t num_segments The number of SegmentRef’s in the result.
hd_std::size_t batch_count The number of individaul steps/events.
hd_std::uint16_t segment_rank The rank of the DataResult returned by a StreamBroker.
hd_std::array< hd_std::uint32_t, SBIO_MAX_NDIM > segment_shape Shape of an individual result from a StreamBroker.
ncarray::DType dtype
bool batched Whether the result has a batch axis.

const void ** data { nullptr }

Defined in src/lib/sbio/core/result.hh:88

Pointer table of SegmentRef results.


hd_std::size_t num_segments { 0 }

Defined in src/lib/sbio/core/result.hh:89

The number of SegmentRef’s in the result.


hd_std::size_t batch_count { 1 }

Defined in src/lib/sbio/core/result.hh:90

The number of individaul steps/events.


hd_std::uint16_t segment_rank { 0 }

Defined in src/lib/sbio/core/result.hh:98

The rank of the DataResult returned by a StreamBroker.

When organizing the composite result into an array, the final rank will have 1 (or 2, if using batched reads) more dimensions.


hd_std::array< hd_std::uint32_t, SBIO_MAX_NDIM > segment_shape {}

Type: hd_std::array< hd_std::uint32_t, SBIO_MAX_NDIM >

Defined in src/lib/sbio/core/result.hh:102

Shape of an individual result from a StreamBroker.


ncarray::DType dtype { ncarray::DType::uint8 }

Defined in src/lib/sbio/core/result.hh:103


bool batched { false }

Defined in src/lib/sbio/core/result.hh:112

Whether the result has a batch axis.

Batched reads (e.g get_multi_data) always return a batch axis, even if it is of dimension 1. This is because the choice to use the batch API was explicit, and a “squeezed” result can be retrieved by just using the non-batch API when dealing with batch sizes of 1.

Return Name Description
SBIO_HD ncarray::SOViewFor< MemTag > to_array const inline

const inline

inline SBIO_HD ncarray::SOViewFor< MemTag > to_array() const

Defined in src/lib/sbio/core/result.hh:114