Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
MessagePassingMng.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/* MessagePassingMng.cc (C) 2000-2026 */
9/* */
10/* Message passing manager. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/message_passing/MessagePassingMng.h"
15
16#include "arccore/trace/ITraceMng.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27MessagePassingMng::
28MessagePassingMng(Int32 comm_rank, Int32 comm_size, IDispatchers* d)
29: m_comm_rank(comm_rank)
30, m_comm_size(comm_size)
31, m_dispatchers(d)
32{
33}
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38MessagePassingMng::
39~MessagePassingMng()
40{
41}
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49IDispatchers* MessagePassingMng::
50dispatchers()
51{
52 return m_dispatchers;
53}
54
55Communicator MessagePassingMng::
56communicator() const
57{
58 return m_communicator;
59}
60
61void MessagePassingMng::
62setCommunicator(Communicator c)
63{
64 m_communicator = c;
65}
66
67ITimeMetricCollector* MessagePassingMng::
68timeMetricCollector() const
69{
70 return m_time_metric_collector;
71}
72
73void MessagePassingMng::
74setTimeMetricCollector(ITimeMetricCollector* c)
75{
76 m_time_metric_collector = c;
77}
78
79void MessagePassingMng::
80setTraceMng(ITraceMng* tm)
81{
82 m_trace_mng = makeRef(tm);
83}
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88extern "C++" void ARCCORE_MESSAGEPASSING_EXPORT
90{
91 delete p;
92}
93
94/*---------------------------------------------------------------------------*/
95/*---------------------------------------------------------------------------*/
96
97Communicator IMessagePassingMng::
98communicator() const
99{
100 return {};
101}
102
103/*---------------------------------------------------------------------------*/
104/*---------------------------------------------------------------------------*/
105
106} // namespace Arcane::MessagePassing
107
108/*---------------------------------------------------------------------------*/
109/*---------------------------------------------------------------------------*/
110
111namespace Arccore
112{
114}
115
116/*---------------------------------------------------------------------------*/
117/*---------------------------------------------------------------------------*/
#define ARCCORE_DEFINE_REFERENCE_COUNTED_CLASS(class_name)
Macro to define methods and types for a class that uses a reference counter.
Interface managing statistics on execution.
Communicator for message exchange.
Interface of the dispatcher container.
Interface of the message passing manager.
friend void mpDelete(IMessagePassingMng *)
Destroys the message passing instance p.
Declarations of types and methods used by message exchange mechanisms.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.
std::int32_t Int32
Signed integer type of 32 bits.
Namespace of Arccore.