53class ARCANE_IMPL_EXPORT VariableSynchronizer
57 friend class VariableSynchronizerComputeList;
64 ~VariableSynchronizer()
override;
70 return m_parallel_mng;
75 void compute()
override;
79 void synchronize(
IVariable* var)
override;
93 void synchronizeData(
IData* data)
override;
97 return m_on_synchronized;
106 IParallelMng* m_parallel_mng =
nullptr;
107 ItemGroup m_item_group;
108 Ref<DataSynchronizeInfo> m_sync_info;
109 Timer* m_sync_timer =
nullptr;
110 bool m_is_verbose =
false;
111 bool m_allow_multi_sync =
true;
112 bool m_trace_sync =
false;
113 EventObservable<const VariableSynchronizerEventArgs&> m_on_synchronized;
114 Ref<IDataSynchronizeImplementationFactory> m_implementation_factory;
115 IVariableSynchronizerMng* m_variable_synchronizer_mng =
nullptr;
116 SyncMessage* m_default_message =
nullptr;
119 Ref<DataSynchronizeInfo> m_partial_sync_info;
120 Ref<SyncMessage> m_partial_message;
121 UniqueArray<Int32> m_partial_local_ids;
122 bool m_is_check_coherence =
false;
126 void _synchronize(IVariable* var, SyncMessage* message);
127 void _synchronizeMulti(
const VariableCollection& vars, SyncMessage* message);
128 bool _canSynchronizeMulti(
const VariableCollection& vars);
129 DataSynchronizeResult _synchronize(INumericDataInternal* data,
bool is_compare_sync);
130 SyncMessage* _buildMessage();
131 SyncMessage* _buildMessage(Ref<DataSynchronizeInfo>& sync_info);
132 void _rebuildMessage(Int32ConstArrayView local_ids);
133 void _sendBeginEvent(VariableSynchronizerEventArgs& args);
134 void _sendEndEvent(VariableSynchronizerEventArgs& args);
135 void _sendEvent(VariableSynchronizerEventArgs& args);
136 void _checkCreateTimer();
137 void _doSynchronize(SyncMessage* message);
138 void _setCurrentDevice();