Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ParallelMngUtils.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ParallelMngUtils.cc (C) 2000-2026 */
9/* */
10/* Utility functions associated with 'IParallelMng'. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/core/ParallelMngUtils.h"
15
16#include "arcane/core/IParallelMng.h"
17#include "arcane/core/internal/IParallelMngUtilsFactory.h"
18#include "arcane/core/internal/IParallelMngInternal.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \brief 'friend' class of IParallelMng allowing access to
31 * IParallelMng::_internalUtilsFactory() const;
32 */
34{
35 public:
36
38 createGetVariablesValuesOperation(IParallelMng* pm)
39 {
41 auto f = pm->_internalUtilsFactory();
42 return f->createGetVariablesValuesOperation(pm);
43 }
44
46 createTransferValuesOperation(IParallelMng* pm)
47 {
49 auto f = pm->_internalUtilsFactory();
50 return f->createTransferValuesOperation(pm);
51 }
52
54 createExchanger(IParallelMng* pm)
55 {
57 auto f = pm->_internalUtilsFactory();
58 return f->createExchanger(pm);
59 }
60
62 createSynchronizer(IParallelMng* pm, IItemFamily* family)
63 {
65 auto f = pm->_internalUtilsFactory();
66 return f->createSynchronizer(pm, family);
67 }
68
70 createSynchronizer(IParallelMng* pm, const ItemGroup& group)
71 {
73 auto f = pm->_internalUtilsFactory();
74 return f->createSynchronizer(pm, group);
75 }
76
78 createTopology(IParallelMng* pm)
79 {
81 auto f = pm->_internalUtilsFactory();
82 return f->createTopology(pm);
83 }
84
86 createSubParallelMngRef(IParallelMng* pm, Int32 color, Int32 key)
87 {
89 return pm->_internalApi()->createSubParallelMngRef(color, key);
90 }
91
93 createSendSerializeMessageRef(IParallelMng* pm, Int32 rank)
94 {
96 auto f = pm->_internalUtilsFactory();
97 return f->createSendSerializeMessage(pm, rank);
98 }
99
101 createReceiveSerializeMessageRef(IParallelMng* pm, Int32 rank)
102 {
104 auto f = pm->_internalUtilsFactory();
105 return f->createReceiveSerializeMessage(pm, rank);
106 }
107};
108
109/*---------------------------------------------------------------------------*/
110/*---------------------------------------------------------------------------*/
111
112} // End namespace Arcane
113
114/*---------------------------------------------------------------------------*/
115/*---------------------------------------------------------------------------*/
116
118{
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
125{
126 return ParallelMngUtilsAccessor::createGetVariablesValuesOperation(pm);
127}
128
131{
132 return ParallelMngUtilsAccessor::createTransferValuesOperation(pm);
133}
134
137{
138 return ParallelMngUtilsAccessor::createExchanger(pm);
139}
140
143{
144 return ParallelMngUtilsAccessor::createSynchronizer(pm, family);
145}
146
149{
150 return ParallelMngUtilsAccessor::createSynchronizer(pm, group);
151}
152
155{
156 return ParallelMngUtilsAccessor::createTopology(pm);
157}
158
161{
162 return ParallelMngUtilsAccessor::createSubParallelMngRef(pm, color, key);
163}
164
166{
168 return pm->_internalApi()->isMachineShMemWinAvailable();
169}
170
171/*---------------------------------------------------------------------------*/
172/*---------------------------------------------------------------------------*/
173
174} // End namespace Arcane::ParallelMngUtils
175
176/*---------------------------------------------------------------------------*/
177/*---------------------------------------------------------------------------*/
#define ARCANE_CHECK_POINTER(ptr)
Macro returning the pointer ptr if it is not null or throwing an exception if it is null.
Interface of an entity family.
Definition IItemFamily.h:83
Interface of the parallelism manager for a subdomain.
virtual IParallelMngInternal * _internalApi()=0
Internal Arcane API.
Mesh entity group.
Definition ItemGroup.h:51
'friend' class of IParallelMng allowing access to IParallelMng::_internalUtilsFactory() const;
Reference to an instance.
Utility functions associated with IParallelMng.
Ref< IParallelMng > createSubParallelMngRef(IParallelMng *pm, Int32 color, Int32 key)
Creates a new parallelism manager for a subset of ranks.
Ref< IParallelExchanger > createExchangerRef(IParallelMng *pm)
Returns an interface to transfer messages between ranks.
Ref< IGetVariablesValuesParallelOperation > createGetVariablesValuesOperationRef(IParallelMng *pm)
Returns an operation to retrieve the values of a variable on the entities of another subdomain.
Ref< ITransferValuesParallelOperation > createTransferValuesOperationRef(IParallelMng *pm)
Returns an operation to transfer values between ranks.
Ref< IParallelTopology > createTopologyRef(IParallelMng *pm)
Creates an instance containing information about the rank topology of this manager.
bool isMachineShMemWinAvailable(IParallelMng *pm)
Function to determine if shared memory window mode is supported and if its use is possible.
Ref< IVariableSynchronizer > createSynchronizerRef(IParallelMng *pm, IItemFamily *family)
Returns an interface to synchronize variables on the group of the family family.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.