Buffer for one synchronization element (send, receive, or comparison). More...
Public Member Functions | |
| MutableMemoryView | globalBuffer () const |
| Global buffer. | |
| void | setGlobalBuffer (MutableMemoryView v) |
| Positions the global buffer. | |
| MutableMemoryView | localBuffer (Int32 rank_index) const |
| Buffer for the index-th rank. | |
| MutableMemoryView | dataLocalBuffer (Int32 rank_index, Int32 data_index) const |
| Buffer for the index-th rank and the data_index-th data item. | |
| Int64 | displacement (Int32 rank_index) const |
| Displacement in globalBuffer() for the index-th rank. | |
| Int64 | localBufferSize (Int32 rank_index) const |
| Size (in bytes) of the local buffer for rank rank_index. | |
| Int64 | totalSize () const |
| Total size in bytes of the global buffer. | |
| ConstArrayView< Int32 > | localIds (Int32 index) const |
| Local IDs of entities for rank index. | |
| void | checkValid () const |
| void | initialize (ConstArrayView< Int32 > datatype_sizes, const DataSynchronizeBufferInfoList *buffer_info) |
| Initializes the buffer information. | |
Private Attributes | |
| MutableMemoryView | m_memory_view |
| View onto the memory area of the buffer. | |
| UniqueArray2< Int64 > | m_displacements |
| Offset (in bytes) in globalBuffer() for each data item. | |
| SmallArray< Int64 > | m_local_buffer_size |
| Size (in bytes) of each local buffer. | |
| ConstArrayView< Int32 > | m_datatype_sizes |
| Size (in bytes) of the type of each data item. | |
| Int64 | m_total_size = 0 |
| Total size (in bytes) of the buffer. | |
| const DataSynchronizeBufferInfoList * | m_buffer_info = nullptr |
Buffer for one synchronization element (send, receive, or comparison).
Definition at line 58 of file DataSynchronizeBuffer.h.
|
inline |
Definition at line 86 of file DataSynchronizeBuffer.h.
| MutableMemoryView Arcane::DataSynchronizeBufferBase::BufferInfo::dataLocalBuffer | ( | Int32 | rank_index, |
| Int32 | data_index ) const |
Buffer for the index-th rank and the data_index-th data item.
Definition at line 142 of file DataSynchronizeBuffer.cc.
References m_datatype_sizes, m_displacements, m_memory_view, and Arcane::makeMutableMemoryView().
Displacement in globalBuffer() for the index-th rank.
Definition at line 112 of file DataSynchronizeBuffer.cc.
References m_displacements.
|
inline |
| void Arcane::DataSynchronizeBufferBase::BufferInfo::initialize | ( | ConstArrayView< Int32 > | datatype_sizes, |
| const DataSynchronizeBufferInfoList * | buffer_info ) |
Initializes the buffer information.
Calculates the offset of each data item from each rank in the global buffer.
Definition at line 171 of file DataSynchronizeBuffer.cc.
References ARCANE_CHECK_POINTER, m_datatype_sizes, m_displacements, m_local_buffer_size, m_total_size, Arcane::DataSynchronizeBufferInfoList::nbItem(), and Arcane::ConstArrayView< T >::size().
| MutableMemoryView Arcane::DataSynchronizeBufferBase::BufferInfo::localBuffer | ( | Int32 | rank_index | ) | const |
Buffer for the index-th rank.
Definition at line 130 of file DataSynchronizeBuffer.cc.
References m_displacements, m_local_buffer_size, m_memory_view, and Arcane::makeMutableMemoryView().
Size (in bytes) of the local buffer for rank rank_index.
Definition at line 121 of file DataSynchronizeBuffer.cc.
References m_local_buffer_size.
| ConstArrayView< Int32 > Arcane::DataSynchronizeBufferBase::BufferInfo::localIds | ( | Int32 | index | ) | const |
Local IDs of entities for rank index.
Definition at line 154 of file DataSynchronizeBuffer.cc.
| void Arcane::DataSynchronizeBufferBase::BufferInfo::setGlobalBuffer | ( | MutableMemoryView | v | ) |
Positions the global buffer.
Definition at line 101 of file DataSynchronizeBuffer.cc.
References ARCANE_FATAL, Arcane::MutableMemoryView::datatypeSize(), and m_memory_view.
|
inline |
Total size in bytes of the global buffer.
Definition at line 81 of file DataSynchronizeBuffer.h.
References m_total_size.
|
private |
Definition at line 109 of file DataSynchronizeBuffer.h.
|
private |
Size (in bytes) of the type of each data item.
Definition at line 106 of file DataSynchronizeBuffer.h.
Referenced by dataLocalBuffer(), and initialize().
|
private |
Offset (in bytes) in globalBuffer() for each data item.
Definition at line 102 of file DataSynchronizeBuffer.h.
Referenced by dataLocalBuffer(), displacement(), initialize(), and localBuffer().
|
private |
Size (in bytes) of each local buffer.
Definition at line 104 of file DataSynchronizeBuffer.h.
Referenced by initialize(), localBuffer(), and localBufferSize().
|
private |
View onto the memory area of the buffer.
This variable is only valid after all buffers have been allocated.
Definition at line 100 of file DataSynchronizeBuffer.h.
Referenced by dataLocalBuffer(), globalBuffer(), localBuffer(), and setGlobalBuffer().
|
private |
Total size (in bytes) of the buffer.
Definition at line 108 of file DataSynchronizeBuffer.h.
Referenced by initialize(), and totalSize().