Thrill
0.1
|
Block header is sent before a sequence of blocks it indicates the number of elements and their boundaries.
Provides a serializer and two partial deserializers. A StreamMultiplexerHeader with size = 0 marks the end of a stream.
Definition at line 80 of file multiplexer_header.hpp.
#include <multiplexer_header.hpp>
Public Member Functions | |
StreamMultiplexerHeader ()=default | |
StreamMultiplexerHeader (MagicByte m, const PinnedBlock &b) | |
size_t | CalcHostRank (size_t workers_per_host) const |
Calculate the sender host_rank from sender_worker and workers_per_host. More... | |
bool | IsAllWorkers () const |
Indicates if this message is for all local workers. More... | |
bool | IsEnd () const |
Indicates if this is the end-of-line block header. More... | |
void | Serialize (net::BufferBuilder &bb) const |
Serializes the whole block struct into a buffer. More... | |
Public Member Functions inherited from MultiplexerHeader | |
MultiplexerHeader ()=default | |
MultiplexerHeader (MagicByte m, const PinnedBlock &b) | |
Static Public Member Functions | |
static StreamMultiplexerHeader | Parse (net::BufferReader &br) |
Reads the stream id and the number of elements in this block. More... | |
Public Attributes | |
uint32_t | receiver_local_worker = 0 |
uint32_t | sender_worker = 0 |
global worker rank of sender More... | |
uint32_t | seq = 0 |
sequence number in Stream More... | |
size_t | stream_id = 0 |
Public Attributes inherited from MultiplexerHeader | |
uint32_t | first_item: 30 |
uint32_t | is_last_block: 1 |
is last block piggybacked indicator More... | |
MagicByte | magic = MagicByte::Invalid |
uint32_t | num_items = 0 |
uint32_t | size = 0 |
uint32_t | typecode_verify: 1 |
typecode self verify More... | |
Static Public Attributes | |
static const uint32_t | all_workers = uint32_t(-1) |
virtual worker which receives all-close messages More... | |
static const uint32_t | final_seq = uint32_t(-1) |
final sequence number More... | |
Static Public Attributes inherited from MultiplexerHeader | |
static constexpr size_t | header_size |
static constexpr bool | self_verify = common::g_self_verify |
static constexpr size_t | total_size |
|
default |
|
inlineexplicit |
Definition at line 97 of file multiplexer_header.hpp.
|
inline |
Calculate the sender host_rank from sender_worker and workers_per_host.
Definition at line 123 of file multiplexer_header.hpp.
References thrill::data::TLX_ATTRIBUTE_PACKED, and MultiplexerHeader::total_size.
|
inline |
Indicates if this message is for all local workers.
Definition at line 118 of file multiplexer_header.hpp.
Referenced by Multiplexer::OnMultiplexerHeader().
|
inline |
Indicates if this is the end-of-line block header.
Definition at line 113 of file multiplexer_header.hpp.
Referenced by Multiplexer::OnMultiplexerHeader().
|
inlinestatic |
Reads the stream id and the number of elements in this block.
Definition at line 108 of file multiplexer_header.hpp.
References BufferReader::Get().
Referenced by Multiplexer::OnMultiplexerHeader().
|
inline |
Serializes the whole block struct into a buffer.
Definition at line 102 of file multiplexer_header.hpp.
References BufferBuilder::Put(), BufferBuilder::Reserve(), and MultiplexerHeader::total_size.
Referenced by StreamSet< StreamData >::OnWriterClosed().
|
static |
virtual worker which receives all-close messages
Definition at line 91 of file multiplexer_header.hpp.
Referenced by StreamSet< StreamData >::OnWriterClosed().
|
static |
final sequence number
Definition at line 93 of file multiplexer_header.hpp.
Referenced by MixStreamData::OnStreamBlock(), CatStreamData::OnStreamBlock(), and StreamSet< StreamData >::OnWriterClosed().
uint32_t receiver_local_worker = 0 |
Definition at line 84 of file multiplexer_header.hpp.
Referenced by Multiplexer::OnMultiplexerHeader(), and StreamSet< StreamData >::OnWriterClosed().
uint32_t sender_worker = 0 |
global worker rank of sender
Definition at line 86 of file multiplexer_header.hpp.
Referenced by Multiplexer::OnCatStreamBlock(), Multiplexer::OnMixStreamBlock(), Multiplexer::OnMultiplexerHeader(), and StreamSet< StreamData >::OnWriterClosed().
uint32_t seq = 0 |
sequence number in Stream
Definition at line 88 of file multiplexer_header.hpp.
Referenced by Multiplexer::OnCatStreamBlock(), Multiplexer::OnMixStreamBlock(), Multiplexer::OnMultiplexerHeader(), and StreamSet< StreamData >::OnWriterClosed().
size_t stream_id = 0 |
Definition at line 83 of file multiplexer_header.hpp.
Referenced by Multiplexer::OnCatStreamBlock(), Multiplexer::OnMixStreamBlock(), Multiplexer::OnMultiplexerHeader(), and StreamSet< StreamData >::OnWriterClosed().