CompositeDataResult
CompositeDataResult
Section titled “CompositeDataResult”#include <sbio/core/result.hh>template<typename MemTag = ncarray::HostTag>struct CompositeDataResultDefined 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.
Template Parameters
Section titled “Template Parameters”MemTagIdentifier for the location of the underlying memory (CPU or GPU).
Public Attributes
Section titled “Public Attributes”| 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.
num_segments
Section titled “num_segments”hd_std::size_t num_segments { 0 }Defined in src/lib/sbio/core/result.hh:89
The number of SegmentRef’s in the result.
batch_count
Section titled “batch_count”hd_std::size_t batch_count { 1 }Defined in src/lib/sbio/core/result.hh:90
The number of individaul steps/events.
segment_rank
Section titled “segment_rank”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.
segment_shape
Section titled “segment_shape”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
batched
Section titled “batched”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.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
SBIO_HD ncarray::SOViewFor< MemTag > |
to_array const inline |
to_array
Section titled “to_array”const inline
inline SBIO_HD ncarray::SOViewFor< MemTag > to_array() constDefined in src/lib/sbio/core/result.hh:114