Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
TransferValuesParallelOperation.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/* TransferValuesParallelOperation.h (C) 2000-2020 */
9/* */
10/* Value transfer across different processors. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_TRANSFERVALUESPARALLELOPERATION_H
13#define ARCANE_IMPL_TRANSFERVALUESPARALLELOPERATION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/ITransferValuesParallelOperation.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class ARCANE_IMPL_EXPORT TransferValuesParallelOperation
33{
34 public:
35
36 TransferValuesParallelOperation(IParallelMng* pm);
37
38 public:
39
41 virtual ~TransferValuesParallelOperation();
42
43 public:
44
45 virtual IParallelMng* parallelMng();
46
47 public:
48
49 virtual void setTransferRanks(Int32ConstArrayView ranks);
50 virtual void addArray(Int32ConstArrayView send_values, SharedArray<Int32> recv_value);
51 virtual void addArray(Int64ConstArrayView send_values, SharedArray<Int64> recv_values);
52 virtual void addArray(RealConstArrayView send_values, SharedArray<Real> recv_values);
53 virtual void transferValues();
54
55 private:
56
57 IParallelMng* m_parallel_mng;
58 Int32ConstArrayView m_ranks;
61 UniqueArray<RealConstArrayView> m_send_real_values;
62 UniqueArray<SharedArray<Int32>> m_recv32_values;
63 UniqueArray<SharedArray<Int64>> m_recv64_values;
64 UniqueArray<SharedArray<Real>> m_recv_real_values;
65
66 private:
67
68 template <typename U>
69 void _putArray(ISerializer* s,
70 Span<const Integer> z_indexes,
72 Array<U>& tmp_values);
73 template <typename U> void
74 _getArray(ISerializer* s, Integer nb,
76 Array<U>& tmp_values);
77};
78
79/*---------------------------------------------------------------------------*/
80/*---------------------------------------------------------------------------*/
81
82} // End namespace Arcane
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87#endif
Base class for 1D data vectors.
Constant view of an array of type T.
Interface of the parallelism manager for a subdomain.
Sends values across different processors.
1D vector of data with reference semantics.
View of an array of elements of type T.
Definition Span.h:635
virtual void transferValues()
Sends and receives values.
virtual void addArray(Int32ConstArrayView send_values, SharedArray< Int32 > recv_value)
Adds an array of Int32.
virtual IParallelMng * parallelMng()
Associated parallelism manager.
virtual void setTransferRanks(Int32ConstArrayView ranks)
Positions the array indicating who to send the values to.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:480
ConstArrayView< Real > RealConstArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:488