Class allowing the grouping of data from certain sub-domains onto other sub-domains. More...
#include <arcane/core/internal/GatherGroup.h>
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 | |
| GatherGroupInfo * | m_gather_group_info = nullptr |
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.
|
explicit |
Constructor.
| gather_group_info | The 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().
|
overridevirtual |
Method allowing the grouping of data from multiple subdomains onto one or more subdomains.
Collective call.
| sizeof_elem | The size of an element. |
| in | Our array that we wish to group. |
| out | The 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().
| 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().
| in | Our array that we wish to group. |
| out | The 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().
| 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().
| in | Our array that we wish to group. |
| out | The 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().
|
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().
| 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().
|
private |
Definition at line 110 of file GatherGroup.h.