Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IDataSynchronizeDispatcher.h
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/* DataSynchronizeDispatcher.h (C) 2000-2026 */
9/* */
10/* Management of synchronization for an 'IData' instance. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_IMPL_INTERNAL_VARIABLESYNCHRONIZERDISPATCHER_H
14#define ARCANE_IMPL_INTERNAL_VARIABLESYNCHRONIZERDISPATCHER_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
18#include "arcane/utils/UniqueArray.h"
19#include "arcane/utils/Ref.h"
21
24#include "arcane/core/VariableCollection.h"
25
26#include "arcane/impl/IDataSynchronizeImplementation.h"
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Arcane
32{
34}
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40namespace Arcane
41{
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46class MemoryBuffer;
48class IVariableSynchronizerDispatcher;
50class IBufferCopier;
51
52/*---------------------------------------------------------------------------*/
53/*---------------------------------------------------------------------------*/
54
58class ARCANE_IMPL_EXPORT DataSynchronizeDispatcherBuildInfo
59{
60 public:
61
62 DataSynchronizeDispatcherBuildInfo(IParallelMng* pm,
65 Ref<IBufferCopier> copier)
66 : m_parallel_mng(pm)
67 , m_synchronize_implementation(sync_impl)
68 , m_synchronize_info(sync_info)
69 , m_buffer_copier(copier)
70 {}
71
72 public:
73
74 IParallelMng* parallelMng() const { return m_parallel_mng; }
75 Ref<IDataSynchronizeImplementation> synchronizeImplementation() const { return m_synchronize_implementation; }
76 Ref<DataSynchronizeInfo> synchronizeInfo() const { return m_synchronize_info; }
77 Ref<IBufferCopier> bufferCopier() const { return m_buffer_copier; }
78
79 private:
80
81 IParallelMng* m_parallel_mng = nullptr;
82 Ref<IDataSynchronizeImplementation> m_synchronize_implementation;
83 Ref<DataSynchronizeInfo> m_synchronize_info;
84 Ref<IBufferCopier> m_buffer_copier;
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
100class ARCANE_IMPL_EXPORT IDataSynchronizeDispatcher
101{
103
104 protected:
105
106 virtual ~IDataSynchronizeDispatcher() = default;
107
108 public:
109
113 virtual void compute() = 0;
114
121 virtual void setSynchronizeBuffer(Ref<MemoryBuffer> buffer) = 0;
122
126 virtual void beginSynchronize(INumericDataInternal* data, bool is_compare_sync) = 0;
127
134
135 public:
136
138 create(const DataSynchronizeDispatcherBuildInfo& build_info);
139};
140
141/*---------------------------------------------------------------------------*/
142/*---------------------------------------------------------------------------*/
143
148class ARCANE_IMPL_EXPORT IDataSynchronizeMultiDispatcher
149{
150 public:
151
152 virtual ~IDataSynchronizeMultiDispatcher() = default;
153
154 public:
155
159 virtual void compute() = 0;
165 virtual void setSynchronizeBuffer(Ref<MemoryBuffer> buffer) = 0;
166 virtual void synchronize(ConstArrayView<IVariable*> vars) = 0;
167
168 public:
169
171};
172
173/*---------------------------------------------------------------------------*/
174/*---------------------------------------------------------------------------*/
175
176} // namespace Arcane
177
178/*---------------------------------------------------------------------------*/
179/*---------------------------------------------------------------------------*/
180
181#endif
Declarations of Arcane's general types.
File containing declarations concerning the message passing model.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_CLASS(class_name)
Macro to declare that a class uses a reference counter.
Constant view of an array of type T.
Info to build a DataSynchronizeDispatcher.
Information about the result of a synchronization.
Interface for copying elements between two regions with indexing.
Interface to manage the synchronization of a data item.
virtual void compute()=0
Recalculates the necessary information after an update to the DataSynchronizeInfo.
virtual void beginSynchronize(INumericDataInternal *data, bool is_compare_sync)=0
Starts the execution for synchronization for the data data.
virtual DataSynchronizeResult endSynchronize()=0
Ends the synchronization.
virtual void setSynchronizeBuffer(Ref< MemoryBuffer > buffer)=0
Positions the synchronization buffer.
Interface for synchronizing a list of variables.
virtual void setSynchronizeBuffer(Ref< MemoryBuffer > buffer)=0
Positions the synchronization buffer.
virtual void compute()=0
Recalculates the necessary information after an update to the DataSynchronizeInfo.
Interface for an 'IData' of a numeric type.
Interface of the parallelism manager for a subdomain.
Management of a memory buffer.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --