Bridge++
Version 1.5.4
|
Channel class for asynchronous communication. More...
#include <channel.h>
Public Types | |
typedef char | element_type |
data transfer is byte-wise. More... | |
typedef std::valarray < element_type > | container_type |
typedef char | element_type |
data transfer is byte-wise. More... | |
Public Member Functions | |
Channel () | |
constructor. More... | |
Channel (const int count) | |
constructor with buffer size (count bytes) More... | |
virtual | ~Channel () |
destructor More... | |
int | start () |
start asynchronous communication More... | |
int | wait () |
wait for completion More... | |
element_type & | operator[] (unsigned int idx) |
accessor to buffer More... | |
element_type | operator[] (unsigned int idx) const |
accessor to buffer More... | |
const element_type * | ptr () |
accessor to buffer; returns pointer to the first element. More... | |
Channel () | |
constructor. More... | |
Channel (const int count) | |
constructor with buffer size (count bytes) More... | |
Channel (void *buf) | |
constructor with buffer More... | |
virtual | ~Channel () |
destructor More... | |
int | start () |
start asynchronous communication More... | |
int | wait () |
wait for completion More... | |
element_type & | operator[] (unsigned int idx) |
accessor to buffer More... | |
element_type | operator[] (unsigned int idx) const |
accessor to buffer More... | |
const element_type * | ptr () |
accessor to buffer; returns pointer to the first element. More... | |
Private Attributes | |
container_type | m_buf |
buffer More... | |
MPI_Request | m_request |
handler to MPI persistent communication More... | |
MPI_Status | m_status |
handler to MPI status information More... | |
element_type * | m_buf |
buffer More... | |
bool | m_my_buf |
whether buffer is owned by this instance. More... | |
Friends | |
class | Communicator_impl |
class | ChannelSet |
class | Communicator |
Channel class for asynchronous communication.
Channel class defines communication channel between sender and receiver for asynchronous data transfer. It actually provides a half-channel of sender part or receiver part. This class wraps MPI persistent communication, as well as send/receive buffer.
An instance of channel class is generated through Communicator send_int() and recv_init() methods. To access the buffer, operator[] is provided as if it is an ordinary container or array.
start() method to start async data transfer, and wait() method to wait for the completion of operation. the channel instance will be re-used repeatedly for the same communication channel once it is created.
Channel class for single process. This implementation acts similarly to the Channel class with MPI, while practically copys data through the buffer.
Channel class defines communication channel between sender and receiver for asynchronous data transfer. It actually provides a half-channel of sender part or receiver part. Original version of Channel class wraps MPI persistent communication, as well as send/receive buffer.
An instance of channel class is generated through Communicator send_int() and recv_init() methods. To access the buffer, operator[] is provided as if it is an ordinary container or array.
In single process version, start() method copys data to buffer, and wait() method does nothing. [01 Sep 2017 H.Matsufuru]
typedef std::valarray<element_type> Channel::container_type |
typedef char Channel::element_type |
typedef char Channel::element_type |
Channel::Channel | ( | ) |
constructor.
Definition at line 95 of file channel.cpp.
Channel::Channel | ( | const int | count | ) |
constructor with buffer size (count bytes)
Definition at line 101 of file channel.cpp.
|
virtual |
destructor
Definition at line 107 of file channel.cpp.
Channel::Channel | ( | ) |
constructor.
Channel::Channel | ( | const int | count | ) |
constructor with buffer size (count bytes)
Channel::Channel | ( | void * | buf | ) |
constructor with buffer
Definition at line 93 of file channel.cpp.
|
virtual |
destructor
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int Channel::start | ( | ) |
start asynchronous communication
Definition at line 114 of file channel.cpp.
int Channel::start | ( | ) |
start asynchronous communication
int Channel::wait | ( | ) |
wait for completion
Definition at line 122 of file channel.cpp.
int Channel::wait | ( | ) |
wait for completion
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |