Bridge++  Ver. 2.0.2
Channel_communicator Class Reference

Channel class for asynchronous communication. More...

#include <channel.h>

Public Types

typedef char element_type
 
typedef char element_type
 
typedef char element_type
 

Public Member Functions

 Channel_communicator ()
 constructor. More...
 
virtual ~Channel_communicator ()
 destructor More...
 
int start ()
 start asynchronous communication More...
 
int wait ()
 wait for completion More...
 
int send_init (int count, int idir, int ipm, void *buf)
 
int recv_init (int count, int idir, int ipm, void *buf)
 
MPI_Request & get_request ()
 accessor to MPI_Request More...
 
 Channel_communicator ()
 constructor. More...
 
virtual ~Channel_communicator ()
 destructor More...
 
int start ()
 start asynchronous communication More...
 
int wait ()
 wait for completion More...
 
int send_init (int count, int idir, int ipm, void *buf)
 
int recv_init (int count, int idir, int ipm, void *buf)
 
MPI_Request & get_request ()
 accessor to MPI_Request More...
 
 Channel_communicator ()
 constructor. More...
 
virtual ~Channel_communicator ()
 destructor More...
 
int start ()
 start asynchronous communication More...
 
int wait ()
 wait for completion More...
 
int send_init (int count, int idir, int ipm, void *buf)
 
int recv_init (int count, int idir, int ipm, void *buf)
 

Static Public Attributes

static constexpr int max_dimension = 8
 

Private Attributes

MPI_Request m_request
 handler to MPI persistent communication More...
 
MPI_Status m_status
 handler to MPI status information More...
 

Static Private Attributes

static int send_num [8] = { 0, 0, 0, 0, 0, 0, 0, 0 }
 
static int recv_num [8] = { 0, 0, 0, 0, 0, 0, 0, 0 }
 
static constexpr int tag_offset = 1000
 

Friends

class Communicator_impl
 

Detailed Description

Channel class for asynchronous communication.

Channel_impl 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. The template free communicator part is defined in Communicator_channel class.

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_impl 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. The template free communicator part is defined in Channel_communicator class.

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.

Definition at line 51 of file channel.h.

Member Typedef Documentation

◆ element_type [1/3]

Definition at line 51 of file channel.h.

◆ element_type [2/3]

Definition at line 51 of file channel.h.

◆ element_type [3/3]

Definition at line 53 of file channel.h.

Constructor & Destructor Documentation

◆ Channel_communicator() [1/3]

Channel_communicator::Channel_communicator ( )

constructor.

Definition at line 90 of file channel.cpp.

◆ ~Channel_communicator() [1/3]

Channel_communicator::~Channel_communicator ( )
virtual

destructor

Definition at line 97 of file channel.cpp.

◆ Channel_communicator() [2/3]

Channel_communicator::Channel_communicator ( )

constructor.

◆ ~Channel_communicator() [2/3]

virtual Channel_communicator::~Channel_communicator ( )
virtual

destructor

◆ Channel_communicator() [3/3]

Channel_communicator::Channel_communicator ( )

constructor.

◆ ~Channel_communicator() [3/3]

virtual Channel_communicator::~Channel_communicator ( )
virtual

destructor

Member Function Documentation

◆ get_request() [1/2]

MPI_Request& Channel_communicator::get_request ( )
inline

accessor to MPI_Request

Definition at line 65 of file channel.h.

◆ get_request() [2/2]

MPI_Request& Channel_communicator::get_request ( )
inline

accessor to MPI_Request

Definition at line 67 of file channel.h.

◆ recv_init() [1/3]

int Channel_communicator::recv_init ( int  count,
int  idir,
int  ipm,
void *  buf 
)

◆ recv_init() [2/3]

int Channel_communicator::recv_init ( int  count,
int  idir,
int  ipm,
void *  buf 
)

◆ recv_init() [3/3]

int Channel_communicator::recv_init ( int  count,
int  idir,
int  ipm,
void *  buf 
)

recv_init() method creates a channel instance that wraps persistent communication object to receive data from neighbour node located at upward or downward (specified by ipm) in the direction idir. count represents size of buffer by number of elements (bytes).

Definition at line 67 of file channel.cpp.

◆ send_init() [1/3]

int Channel_communicator::send_init ( int  count,
int  idir,
int  ipm,
void *  buf 
)

◆ send_init() [2/3]

int Channel_communicator::send_init ( int  count,
int  idir,
int  ipm,
void *  buf 
)

◆ send_init() [3/3]

int Channel_communicator::send_init ( int  count,
int  idir,
int  ipm,
void *  buf 
)

send_init() method creates a channel instance that wraps persistent communication object to send data to neighbour node located at upward or downward (specified by ipm) in the direction idir. count represents size of buffer by number of elements (bytes).

Definition at line 37 of file channel.cpp.

◆ start() [1/3]

int Channel_communicator::start ( )

start asynchronous communication

◆ start() [2/3]

int Channel_communicator::start ( )

start asynchronous communication

◆ start() [3/3]

int Channel_communicator::start ( )

start asynchronous communication

Definition at line 105 of file channel.cpp.

◆ wait() [1/3]

int Channel_communicator::wait ( )

wait for completion

◆ wait() [2/3]

int Channel_communicator::wait ( )

wait for completion

◆ wait() [3/3]

int Channel_communicator::wait ( )

wait for completion

Definition at line 113 of file channel.cpp.

Friends And Related Function Documentation

◆ Communicator_impl

Definition at line 80 of file channel.h.

Member Data Documentation

◆ m_request

MPI_Request Channel_communicator::m_request
private

handler to MPI persistent communication

Definition at line 71 of file channel.h.

◆ m_status

MPI_Status Channel_communicator::m_status
private

handler to MPI status information

Definition at line 72 of file channel.h.

◆ max_dimension

static constexpr int Channel_communicator::max_dimension = 8
staticconstexpr

Definition at line 54 of file channel.h.

◆ recv_num

int Channel_communicator::recv_num = { 0, 0, 0, 0, 0, 0, 0, 0 }
staticprivate

Definition at line 76 of file channel.h.

◆ send_num

int Channel_communicator::send_num = { 0, 0, 0, 0, 0, 0, 0, 0 }
staticprivate

Definition at line 75 of file channel.h.

◆ tag_offset

constexpr int Channel_communicator::tag_offset = 1000
staticconstexprprivate

Definition at line 78 of file channel.h.


The documentation for this class was generated from the following files: