Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::DataSynchronizeBufferBase::BufferInfo Class Reference

Buffer for one synchronization element (send, receive, or comparison). More...

Collaboration diagram for Arcane::DataSynchronizeBufferBase::BufferInfo:

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< Int32localIds (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< Int64m_displacements
 Offset (in bytes) in globalBuffer() for each data item.
SmallArray< Int64m_local_buffer_size
 Size (in bytes) of each local buffer.
ConstArrayView< Int32m_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 DataSynchronizeBufferInfoListm_buffer_info = nullptr

Detailed Description

Buffer for one synchronization element (send, receive, or comparison).

Definition at line 58 of file DataSynchronizeBuffer.h.

Member Function Documentation

◆ checkValid()

void Arcane::DataSynchronizeBufferBase::BufferInfo::checkValid ( ) const
inline

Definition at line 86 of file DataSynchronizeBuffer.h.

◆ dataLocalBuffer()

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().

Here is the call graph for this function:

◆ displacement()

Int64 Arcane::DataSynchronizeBufferBase::BufferInfo::displacement ( Int32 rank_index) const

Displacement in globalBuffer() for the index-th rank.

Definition at line 112 of file DataSynchronizeBuffer.cc.

References m_displacements.

◆ globalBuffer()

MutableMemoryView Arcane::DataSynchronizeBufferBase::BufferInfo::globalBuffer ( ) const
inline

Global buffer.

Definition at line 63 of file DataSynchronizeBuffer.h.

References m_memory_view.

◆ initialize()

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.

Note
datatype_sizes is kept as a view and should therefore not be modified and must remain valid during synchronization.

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().

Here is the call graph for this function:

◆ localBuffer()

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().

Here is the call graph for this function:

◆ localBufferSize()

Int64 Arcane::DataSynchronizeBufferBase::BufferInfo::localBufferSize ( Int32 rank_index) const

Size (in bytes) of the local buffer for rank rank_index.

Definition at line 121 of file DataSynchronizeBuffer.cc.

References m_local_buffer_size.

◆ localIds()

ConstArrayView< Int32 > Arcane::DataSynchronizeBufferBase::BufferInfo::localIds ( Int32 index) const

Local IDs of entities for rank index.

Definition at line 154 of file DataSynchronizeBuffer.cc.

◆ setGlobalBuffer()

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.

Here is the call graph for this function:

◆ totalSize()

Int64 Arcane::DataSynchronizeBufferBase::BufferInfo::totalSize ( ) const
inline

Total size in bytes of the global buffer.

Definition at line 81 of file DataSynchronizeBuffer.h.

References m_total_size.

Member Data Documentation

◆ m_buffer_info

const DataSynchronizeBufferInfoList* Arcane::DataSynchronizeBufferBase::BufferInfo::m_buffer_info = nullptr
private

Definition at line 109 of file DataSynchronizeBuffer.h.

◆ m_datatype_sizes

ConstArrayView<Int32> Arcane::DataSynchronizeBufferBase::BufferInfo::m_datatype_sizes
private

Size (in bytes) of the type of each data item.

Definition at line 106 of file DataSynchronizeBuffer.h.

Referenced by dataLocalBuffer(), and initialize().

◆ m_displacements

UniqueArray2<Int64> Arcane::DataSynchronizeBufferBase::BufferInfo::m_displacements
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().

◆ m_local_buffer_size

SmallArray<Int64> Arcane::DataSynchronizeBufferBase::BufferInfo::m_local_buffer_size
private

Size (in bytes) of each local buffer.

Definition at line 104 of file DataSynchronizeBuffer.h.

Referenced by initialize(), localBuffer(), and localBufferSize().

◆ m_memory_view

MutableMemoryView Arcane::DataSynchronizeBufferBase::BufferInfo::m_memory_view
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().

◆ m_total_size

Int64 Arcane::DataSynchronizeBufferBase::BufferInfo::m_total_size = 0
private

Total size (in bytes) of the buffer.

Definition at line 108 of file DataSynchronizeBuffer.h.

Referenced by initialize(), and totalSize().


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