|
TrioCFD 1.9.9_beta
TrioCFD documentation
|
#include <Schema_Comm.h>
Public Member Functions | |
| Schema_Comm () | |
| Constructs a new communication schema. | |
| Schema_Comm (const Schema_Comm &) | |
| Copy constructor (new schema placed in RESET mode). | |
| ~Schema_Comm () | |
| Destructs a communication schema. | |
| void | set_group (const Comm_Group &group) |
| Obsolete method. The group associated with the schema is the current group at the time the schema is created. | |
| const Comm_Group & | get_group () const |
| Returns the group associated with the schema. | |
| const Schema_Comm & | operator= (const Schema_Comm &) |
| Copy operator: copies the list of communicating processors. | |
| void | set_send_recv_pe_list (const ArrOfInt &send_pe_list, const ArrOfInt &recv_pe_list, const int me_to_me=0) |
| Defines the list of processors to send data to and receive data from. | |
| void | begin_comm () const |
| Reserves communication buffers for a new communication. | |
| Sortie & | send_buffer (int num_PE) const |
| Returns the buffer corresponding to processor num_PE to stack data to send. | |
| void | echange_taille_et_messages () const |
| Launches the data exchange between all processors. | |
| void | echange_messages (const ArrOfInt &recv_size) const |
| Launches the data exchange. | |
| Entree & | recv_buffer (int num_PE) const |
| Returns the buffer corresponding to processor num_PE to read received data. | |
| void | end_comm () const |
| Clears the buffers and releases resources: reading of received data from buffers is complete. | |
| const ArrOfInt & | get_send_pe_list () const |
| const ArrOfInt & | get_recv_pe_list () const |
| void | set_all_to_allv_flag (int x) |
Protected Types | |
| enum | Static_Status { UNINITIALIZED , RESET , WRITING , EXCHANGED } |
Protected Member Functions | |
| void | echange_taille (const ArrOfInt &send_size, ArrOfInt &recv_size) const |
| Transmits the size of messages to send to the processors that will receive them. | |
| void | echange_messages (const ArrOfInt &send_size, const ArrOfInt &recv_size) const |
| Launches the data exchange between all processors. | |
| void | check_send_recv_pe_list () const |
| Verifies that send/recv_pe_list satisfy the property "you listen when I speak". | |
| OBS_PTR (Comm_Group) ref_group_ | |
Static Protected Member Functions | |
| static OutputCommBuffer & | obuffer (int pe) |
| Accessor to a member of the obuffers_ array (with verification). | |
| static InputCommBuffer & | ebuffer (int pe) |
| Accessor to a member of the ebuffers_ array (with verification). | |
Protected Attributes | |
| ArrOfInt | send_pe_list_ |
| ArrOfInt | recv_pe_list_ |
| int | me_to_me_ |
| int | use_all_to_allv_ |
Static Protected Attributes | |
| static Static_Status | status_ = UNINITIALIZED |
Definition at line 78 of file Schema_Comm.h.
|
protected |
| Enumerator | |
|---|---|
| UNINITIALIZED | |
| RESET | |
| WRITING | |
| EXCHANGED | |
Definition at line 115 of file Schema_Comm.h.
| Schema_Comm::Schema_Comm | ( | ) |
Constructs a new communication schema.
Definition at line 62 of file Schema_Comm.cpp.
| Schema_Comm::Schema_Comm | ( | const Schema_Comm & | schema | ) |
Copy constructor (new schema placed in RESET mode).
Warning: all members of the Comm_Group must execute this function simultaneously.
Definition at line 92 of file Schema_Comm.cpp.
| Schema_Comm::~Schema_Comm | ( | ) |
Destructs a communication schema.
Definition at line 83 of file Schema_Comm.cpp.
| void Schema_Comm::begin_comm | ( | ) | const |
Reserves communication buffers for a new communication.
The schema transitions from RESET to WRITING; send_buffer() may now be called. It is forbidden to call begin_comm() again on all communication objects before finishing this communication with end_comm().
Definition at line 167 of file Schema_Comm.cpp.
|
protected |
Verifies that send/recv_pe_list satisfy the property "you listen when I speak".
Definition at line 558 of file Schema_Comm.cpp.
|
inlinestaticprotected |
Accessor to a member of the ebuffers_ array (with verification).
| pe | Processor index. |
Definition at line 46 of file Schema_Comm.cpp.
| void Schema_Comm::echange_messages | ( | const ArrOfInt & | recv_size | ) | const |
Launches the data exchange.
The size in bytes of received messages is provided in recv_size (array of the same size as recv_pe_list). In check_enabled mode, verifies that the size is correct.
Definition at line 408 of file Schema_Comm.cpp.
|
protected |
Launches the data exchange between all processors.
The size of received messages must already be known. The schema transitions from WRITING to EXCHANGED.
Definition at line 315 of file Schema_Comm.cpp.
|
protected |
Transmits the size of messages to send to the processors that will receive them.
The size is the number of bytes of the obuffers. send_pe_list and recv_pe_list must be initialized. The schema must be in the WRITING state.
Definition at line 264 of file Schema_Comm.cpp.
| void Schema_Comm::echange_taille_et_messages | ( | ) | const |
Launches the data exchange between all processors.
The size of received messages does not need to be known a priori; it is transmitted. The schema transitions from WRITING to EXCHANGED.
Definition at line 383 of file Schema_Comm.cpp.
| void Schema_Comm::end_comm | ( | ) | const |
Clears the buffers and releases resources: reading of received data from buffers is complete.
The schema transitions from EXCHANGED to RESET.
Definition at line 436 of file Schema_Comm.cpp.
| const Comm_Group & Schema_Comm::get_group | ( | ) | const |
Returns the group associated with the schema.
Definition at line 134 of file Schema_Comm.cpp.
| const ArrOfInt & Schema_Comm::get_recv_pe_list | ( | ) | const |
Definition at line 523 of file Schema_Comm.cpp.
| const ArrOfInt & Schema_Comm::get_send_pe_list | ( | ) | const |
Definition at line 517 of file Schema_Comm.cpp.
|
protected |
|
inlinestaticprotected |
Accessor to a member of the obuffers_ array (with verification).
| pe | Processor index. |
Definition at line 35 of file Schema_Comm.cpp.
| const Schema_Comm & Schema_Comm::operator= | ( | const Schema_Comm & | schema | ) |
Copy operator: copies the list of communicating processors.
The new schema is placed in the RESET state. Note: all members of the Comm_Group must execute this function simultaneously.
Definition at line 105 of file Schema_Comm.cpp.
| Entree & Schema_Comm::recv_buffer | ( | int | num_PE | ) | const |
Returns the buffer corresponding to processor num_PE to read received data.
The schema must be in the EXCHANGED state.
Definition at line 504 of file Schema_Comm.cpp.
| Sortie & Schema_Comm::send_buffer | ( | int | num_PE | ) | const |
Returns the buffer corresponding to processor num_PE to stack data to send.
The schema must be in the WRITING state.
Definition at line 485 of file Schema_Comm.cpp.
|
inline |
Definition at line 103 of file Schema_Comm.h.
| void Schema_Comm::set_group | ( | const Comm_Group & | group | ) |
Obsolete method. The group associated with the schema is the current group at the time the schema is created.
This method is only valid with the same group as the original group. The method does nothing.
Definition at line 125 of file Schema_Comm.cpp.
| void Schema_Comm::set_send_recv_pe_list | ( | const ArrOfInt & | send_pe_list, |
| const ArrOfInt & | recv_pe_list, | ||
| const int | me_to_me = 0 ) |
Defines the list of processors to send data to and receive data from.
If me_to_me is non-zero, messages to oneself are allowed; otherwise not (optional argument: default me_to_me=0).
Definition at line 146 of file Schema_Comm.cpp.
|
protected |
Definition at line 122 of file Schema_Comm.h.
|
protected |
Definition at line 121 of file Schema_Comm.h.
|
protected |
Definition at line 120 of file Schema_Comm.h.
|
staticprotected |
Definition at line 116 of file Schema_Comm.h.
|
protected |
Definition at line 125 of file Schema_Comm.h.