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

Class allowing the grouping of data from certain sub-domains onto other sub-domains. More...

#include <arcane/core/internal/GatherGroup.h>

Inheritance diagram for Arcane::GatherGroup:
Collaboration diagram for Arcane::GatherGroup:

Public Member Functions

 GatherGroup (GatherGroupInfo *gather_group_info)
 Constructor.
 GatherGroup ()
 Constructor. For the object to be usable, it is necessary to call setGatherGroupInfo().
bool isNeedGather () override
 Method allowing determination of whether the grouping needs to be performed or if the data can be written directly.
void gatherToMasterIO (Int64 sizeof_elem, Span< const Byte > in, Span< Byte > out) override
 Method allowing the grouping of data from multiple subdomains onto one or more subdomains.
void setGatherGroupInfo (GatherGroupInfo *gather_group_info)
 Method allowing the definition of grouping information.
template<class T>
void gatherToMasterIOT (Span< const T > in, Array< T > &out)
 Method allowing the grouping of data from several sub-domains onto one or more sub-domains.
template<class T>
void gatherToMasterIOT (Span2< const T > in, Array2< T > &out)
 Method allowing the grouping of data from several sub-domains onto one or more sub-domains.

Private Attributes

GatherGroupInfom_gather_group_info = nullptr

Detailed Description

Class allowing the grouping of data from certain sub-domains onto other sub-domains.

The writers will be the masterIO or the masterParallelIO if m_use_collective_io is true.

Definition at line 43 of file GatherGroup.h.

Constructor & Destructor Documentation

◆ GatherGroup()

Arcane::GatherGroup::GatherGroup ( GatherGroupInfo * gather_group_info)
explicit

Constructor.

Parameters
gather_group_infoThe grouping information. isComputed() must be true.

Definition at line 32 of file GatherGroup.cc.

References ARCANE_CHECK_POINTER, ARCANE_FATAL_IF, and Arcane::GatherGroupInfo::isComputed().

Referenced by GatherGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ gatherToMasterIO()

void Arcane::GatherGroup::gatherToMasterIO ( Int64 sizeof_elem,
Span< const Byte > in,
Span< Byte > out )
overridevirtual

Method allowing the grouping of data from multiple subdomains onto one or more subdomains.

Collective call.

Parameters
sizeof_elemThe size of an element.
inOur array that we wish to group.
outThe grouped array. If we are not a writer, there will be no modification.

Implements Arcane::IGatherGroup.

Definition at line 67 of file GatherGroup.cc.

References ARCANE_CHECK_POINTER, Arcane::IParallelMng::commRank(), Arcane::IParallelMng::commSize(), Arcane::SpanImpl< T, SizeType, Extent >::constSmallView(), Arcane::SpanImpl< T, SizeType, Extent >::copy(), Arcane::IParallelMng::isThreadImplementation(), Arcane::IParallelMng::recv(), Arcane::SpanImpl< T, SizeType, Extent >::size(), Arcane::Span< T, Extent >::subSpan(), and Arcane::IParallelMng::waitAllRequests().

Referenced by GatherGroup(), gatherToMasterIOT(), and gatherToMasterIOT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gatherToMasterIOT() [1/2]

template<class T>
void Arcane::GatherGroup::gatherToMasterIOT ( Span2< const T > in,
Array2< T > & out )

Method allowing the grouping of data from several sub-domains onto one or more sub-domains.

It is recommended to use this method rather than directly gatherToMasterIO().

Parameters
inOur array that we wish to group.
outThe grouped array. If we are not the writer, there will be no modification.

Definition at line 219 of file GatherGroup.h.

References Arcane::Span2Impl< T, SizeType, Extent1, Extent2 >::data(), Arccore::Span2Impl< T, SizeType, Extent1, Extent2 >::data(), Arcane::Span2Impl< T, SizeType, Extent1, Extent2 >::dim2Size(), gatherToMasterIO(), Arcane::Array2< DataType >::resizeNoInit(), and Arcane::Span2Impl< T, SizeType, Extent1, Extent2 >::totalNbElement().

Here is the call graph for this function:

◆ gatherToMasterIOT() [2/2]

template<class T>
void Arcane::GatherGroup::gatherToMasterIOT ( Span< const T > in,
Array< T > & out )

Method allowing the grouping of data from several sub-domains onto one or more sub-domains.

It is recommended to use this method rather than directly gatherToMasterIO().

Parameters
inOur array that we wish to group.
outThe grouped array. If we are not the writer, there will be no modification.

Definition at line 200 of file GatherGroup.h.

References Arcane::Array< T >::clear(), Arcane::Array< T >::data(), Arcane::SpanImpl< T, SizeType, Extent >::data(), gatherToMasterIO(), Arcane::Array< T >::resizeNoInit(), and Arcane::SpanImpl< T, SizeType, Extent >::sizeBytes().

Referenced by GatherGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNeedGather()

bool Arcane::GatherGroup::isNeedGather ( )
overridevirtual

Method allowing determination of whether the grouping needs to be performed or if the data can be written directly.

Non-collective call, but the returned value will be the same for all callers.

The call to gatherToMasterIO() can still be made; the array in will simply be copied into the array out.

Implements Arcane::IGatherGroup.

Definition at line 54 of file GatherGroup.cc.

References ARCANE_CHECK_POINTER, Arcane::IParallelMng::commSize(), and Arcane::IParallelMng::isThreadImplementation().

Referenced by GatherGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGatherGroupInfo()

void Arcane::GatherGroup::setGatherGroupInfo ( GatherGroupInfo * gather_group_info)

Method allowing the definition of grouping information.

This method can be used to replace the information already stored in the object.

Definition at line 110 of file GatherGroup.cc.

References ARCANE_CHECK_POINTER, ARCANE_FATAL_IF, and Arcane::GatherGroupInfo::isComputed().

Referenced by GatherGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_gather_group_info

GatherGroupInfo* Arcane::GatherGroup::m_gather_group_info = nullptr
private

Definition at line 110 of file GatherGroup.h.


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