Generic buffer for data synchronization. More...
#include <arcane/impl/IDataSynchronizeBuffer.h>
Public Member Functions | |
| virtual Int32 | nbRank () const =0 |
| Number of ranks. | |
| virtual Int32 | targetRank (Int32 index) const =0 |
| Target rank of the index-th rank. | |
| virtual bool | hasGlobalBuffer () const =0 |
| Indicates if the buffers are global. | |
| virtual MutableMemoryView | globalSendBuffer ()=0 |
| Send buffer. | |
| virtual MutableMemoryView | globalReceiveBuffer ()=0 |
| Receive buffer. | |
| virtual MutableMemoryView | sendBuffer (Int32 index)=0 |
| Send buffer for the index-th rank. | |
| virtual MutableMemoryView | receiveBuffer (Int32 index)=0 |
| Receive buffer for the index-th rank. | |
| virtual Int64 | sendDisplacement (Int32 index) const =0 |
| Displacement (in bytes) from the start of sendBuffer() for the index-th rank. | |
| virtual Int64 | receiveDisplacement (Int32 index) const =0 |
| Displacement (in bytes) from the start of receiveBuffer() for the index-th rank. | |
| virtual void | copyReceiveAsync (Int32 index)=0 |
| Copies into the data from the receive buffer of the index-th rank. | |
| virtual void | copyAllReceive () |
| Copies all data from the receive buffer. | |
| virtual void | copySendAsync (Int32 index)=0 |
| Copies the data of the index-th rank into the send buffer. | |
| virtual void | copyAllSend () |
| Copies all data into the send buffer. | |
| virtual Int64 | totalSendSize () const =0 |
| Total size to send in bytes. | |
| virtual Int64 | totalReceiveSize () const =0 |
| Total size to receive in bytes. | |
| virtual void | barrier ()=0 |
| Waits until the copies (copySendAsync() and copyReceiveAsync()) are finished. | |
Generic buffer for data synchronization.
This instance contains send and receive buffers and can be used regardless of the data type of the synchronization.
Each buffer is composed of nbRank() parts and each part is associated with a recipient (sendBuffer() or receiveBuffer()).
Before using the buffers, the data values must be copied. The copySendAsync() method allows copying the data values into the send buffer and copyReceiveAsync() allows copying the receive buffer into the data.
If hasGlobalBuffer() is true, then the buffers of each part come from a global buffer and it is possible to retrieve it via globalSendBuffer() for sending and globalReceiveBuffer() for receiving. It is also possible in this case to retrieve the displacement of each sub-part via the methods sendDisplacement() or receiveDisplacement().
Definition at line 53 of file IDataSynchronizeBuffer.h.
|
pure virtual |
Waits until the copies (copySendAsync() and copyReceiveAsync()) are finished.
Implemented in Arcane::DataSynchronizeBufferBase.
Referenced by copyAllReceive(), and copyAllSend().
|
virtual |
Copies all data from the receive buffer.
This call is equivalent to:
Definition at line 76 of file DataSynchronizeBuffer.cc.
References barrier(), copyReceiveAsync(), and nbRank().
Referenced by copyReceiveAsync().
|
virtual |
Copies all data into the send buffer.
Definition at line 64 of file DataSynchronizeBuffer.cc.
References barrier(), copySendAsync(), and nbRank().
Referenced by copySendAsync().
|
pure virtual |
Copies into the data from the receive buffer of the index-th rank.
Implemented in Arcane::MultiDataSynchronizeBuffer, and Arcane::SingleDataSynchronizeBuffer.
References copyAllReceive().
Referenced by copyAllReceive().
|
pure virtual |
Copies the data of the index-th rank into the send buffer.
This call is equivalent to:
Implemented in Arcane::MultiDataSynchronizeBuffer, and Arcane::SingleDataSynchronizeBuffer.
References copyAllSend().
Referenced by copyAllSend().
|
pure virtual |
Receive buffer.
Implemented in Arcane::DataSynchronizeBufferBase.
|
pure virtual |
Send buffer.
Implemented in Arcane::DataSynchronizeBufferBase.
|
pure virtual |
Indicates if the buffers are global.
Implemented in Arcane::DataSynchronizeBufferBase.
|
pure virtual |
Number of ranks.
Implemented in Arcane::DataSynchronizeBufferBase.
Referenced by copyAllReceive(), and copyAllSend().
|
pure virtual |
Receive buffer for the index-th rank.
Implemented in Arcane::DataSynchronizeBufferBase.
Displacement (in bytes) from the start of receiveBuffer() for the index-th rank.
This value is only meaningful if hasGlobalBuffer() is true.
Implemented in Arcane::DataSynchronizeBufferBase.
|
pure virtual |
Send buffer for the index-th rank.
Implemented in Arcane::DataSynchronizeBufferBase.
Displacement (in bytes) from the start of sendBuffer() for the index-th rank.
This value is only meaningful if hasGlobalBuffer() is true.
Implemented in Arcane::DataSynchronizeBufferBase.
Target rank of the index-th rank.
Implemented in Arcane::DataSynchronizeBufferBase.
|
pure virtual |
Total size to receive in bytes.
Implemented in Arcane::DataSynchronizeBufferBase.
|
pure virtual |
Total size to send in bytes.
Implemented in Arcane::DataSynchronizeBufferBase.