Thrill
0.1
|
This is the big answer to what happens when an MPI async request is signaled as complete: it unifies all possible async requests, including the reference counts they hold on the appropriate buffers, and dispatches the correct callbacks when done.
Definition at line 254 of file dispatcher.hpp.
Public Types | |
enum | Type { NONE, REQUEST, WRITE_BUFFER, READ_BUFFER, WRITE_BLOCK, READ_BYTE_BLOCK } |
Public Member Functions | |
MpiAsync () | |
default constructor for resize More... | |
MpiAsync (const AsyncRequestCallback &callback) | |
construct generic MPI async request More... | |
MpiAsync (net::Connection &conn, uint32_t seq, Buffer &&buffer, const AsyncWriteCallback &callback) | |
Construct AsyncWrite with Buffer. More... | |
MpiAsync (net::Connection &conn, uint32_t seq, size_t buffer_size, const AsyncReadBufferCallback &callback) | |
Construct AsyncRead with Buffer. More... | |
MpiAsync (net::Connection &conn, uint32_t seq, data::PinnedBlock &&block, const AsyncWriteCallback &callback) | |
Construct AsyncWrite with Block. More... | |
MpiAsync (net::Connection &conn, uint32_t seq, size_t size, data::PinnedByteBlockPtr &&block, const AsyncReadByteBlockCallback &callback) | |
Construct AsyncRead with ByteBuffer. More... | |
MpiAsync (const MpiAsync &ma)=default | |
MpiAsync (MpiAsync &&ma) | |
move-constructor: move item More... | |
~MpiAsync () | |
Connection * | connection () |
Return mpi Connection pointer. More... | |
void | DoCallback (MPI_Status &s) |
Dispatch done message to correct callback. More... | |
MpiAsync & | operator= (MpiAsync &&ma) noexcept |
move-assignment More... | |
Private Member Functions | |
void | Acquire (MpiAsync &&ma) noexcept |
assign myself the other object's content More... | |
Private Attributes | |
union { | |
AsyncRequest arequest_ | |
AsyncReadBuffer read_buffer_ | |
AsyncReadByteBlock read_byte_block_ | |
AsyncWriteBlock write_block_ | |
AsyncWriteBuffer write_buffer_ | |
}; | |
uint32_t | seq_ |
sequence id More... | |
Type | type_ |
type of this async More... | |
enum Type |
Enumerator | |
---|---|
NONE | |
REQUEST | |
WRITE_BUFFER | |
READ_BUFFER | |
WRITE_BLOCK | |
READ_BYTE_BLOCK |
Definition at line 257 of file dispatcher.hpp.
|
inline |
default constructor for resize
Definition at line 265 of file dispatcher.hpp.
|
inline |
construct generic MPI async request
Definition at line 268 of file dispatcher.hpp.
|
inline |
Construct AsyncWrite with Buffer.
Definition at line 273 of file dispatcher.hpp.
|
inline |
Construct AsyncRead with Buffer.
Definition at line 280 of file dispatcher.hpp.
|
inline |
Construct AsyncWrite with Block.
Definition at line 286 of file dispatcher.hpp.
|
inline |
Construct AsyncRead with ByteBuffer.
Definition at line 293 of file dispatcher.hpp.
copy-constructor: default (work as long as union members are default copyable)
move-constructor: move item
Definition at line 305 of file dispatcher.hpp.
References Dispatcher::MpiAsync::type_.
|
inline |
Definition at line 326 of file dispatcher.hpp.
|
inlineprivatenoexcept |
assign myself the other object's content
Definition at line 393 of file dispatcher.hpp.
References Dispatcher::MpiAsync::arequest_, AsyncRequest::AsyncRequest(), Dispatcher::MpiAsync::read_buffer_, Dispatcher::MpiAsync::read_byte_block_, Dispatcher::MpiAsync::seq_, Dispatcher::MpiAsync::type_, Dispatcher::MpiAsync::write_block_, and Dispatcher::MpiAsync::write_buffer_.
|
inline |
Return mpi Connection pointer.
Definition at line 361 of file dispatcher.hpp.
References die.
Referenced by Dispatcher::DispatchOne().
|
inline |
Dispatch done message to correct callback.
Definition at line 341 of file dispatcher.hpp.
move-assignment
Definition at line 312 of file dispatcher.hpp.
References Dispatcher::MpiAsync::type_.
union { ... } |
the big unification of async receivers. these also hold reference counts on the Buffer or Block objects.
AsyncRequest arequest_ |
Definition at line 385 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire().
AsyncReadBuffer read_buffer_ |
Definition at line 387 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire().
AsyncReadByteBlock read_byte_block_ |
Definition at line 389 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire().
|
private |
sequence id
Definition at line 380 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire().
|
private |
type of this async
Definition at line 377 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire(), Dispatcher::DispatchOne(), Dispatcher::MpiAsync::MpiAsync(), and Dispatcher::MpiAsync::operator=().
AsyncWriteBlock write_block_ |
Definition at line 388 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire().
AsyncWriteBuffer write_buffer_ |
Definition at line 386 of file dispatcher.hpp.
Referenced by Dispatcher::MpiAsync::Acquire().