|
ElfPSP_AntColony
Protein Structure Prediction using Ant Colony Optimization
|
Encapsulates interprocess communication among MPI nodes. More...
Public Member Functions | |
| InterProcess (int numDirections) | |
| Default constructor. More... | |
| ~InterProcess () | |
| Deletes internal buffers. More... | |
| void | send_solution (const vector< char > &directions, int contacts, int destIdx) |
| Sends a solution to another MPI node. More... | |
| void | recv_solution (vector< char > &directions, int &contacts, int srcIdx) |
| Received a solution from another MPI node. More... | |
Private Member Functions | |
| void | serialize_solution (const vector< char > &directions, int nContacts) |
| Serializes the given data within the internal send buffer. More... | |
| vector< char > | deserialize_solution (int &nContacts) |
| Deserializes data from the internal receive buffer. More... | |
Private Attributes | |
| int | dBufSize |
| Size, in bytes, of recv and send buffers. More... | |
| void * | dSendBuffer |
| Send buffer. More... | |
| void * | dRecvBuffer |
| Receive buffer. More... | |
Encapsulates interprocess communication among MPI nodes.
This class's best contribution is to hold buffers than can be reused throughout many communications. A strong assumption here is that the machines are homogeneous, so we can pass raw bytes between them.
|
inline |
Default constructor.
| numDirections | number of relative directions that each protein solution holds. This is used to calculate the internal buffer sizes. |
|
inline |
Deletes internal buffers.
|
inlineprivate |
Deserializes data from the internal receive buffer.
| nContacts | Deserialized number of contacts is returned in this variable. |
|
inline |
Received a solution from another MPI node.
| directions | |
| contacts | |
| srcIdx | Identifier for the MPI node from which we should receive the data. |
|
inline |
Sends a solution to another MPI node.
| directions | |
| contacts | |
| destIdx | Identifier for the MPI node that should receive the data. |
|
inlineprivate |
Serializes the given data within the internal send buffer.
|
private |
Size, in bytes, of recv and send buffers.
|
private |
Receive buffer.
|
private |
Send buffer.
1.8.13