Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ParallelTopology.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/* ParallelTopology.h (C) 2000-2011 */
9/* */
10/* Information on the topology for allocating computing cores. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_PARALLELTOPOLOGY_H
13#define ARCANE_IMPL_PARALLELTOPOLOGY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IParallelTopology.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IParallelMng;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
38class ARCANE_IMPL_EXPORT ParallelTopology
39: public IParallelTopology
40{
41 public:
42
43 ParallelTopology(IParallelMng* pm);
44 virtual ~ParallelTopology() {}
45
46 public:
47
49 virtual void initialize();
50
51 public:
52
53 virtual IParallelMng* parallelMng() const;
54 virtual bool isMasterMachine() const;
55 virtual Int32ConstArrayView machineRanks() const;
56 virtual Int32 machineRank() const;
57 virtual Int32ConstArrayView masterMachineRanks() const;
58 virtual bool isMasterProcess() const;
59 virtual Int32ConstArrayView processRanks() const;
60 virtual Int32 processRank() const;
61 virtual Int32ConstArrayView masterProcessRanks() const;
62
63 private:
64
65 IParallelMng* m_parallel_mng;
66 Int32UniqueArray m_machine_ranks;
67 Int32UniqueArray m_process_ranks;
68 Int32 m_machine_rank;
69 Int32 m_process_rank;
70 bool m_is_machine_master;
71 bool m_is_process_master;
72 Int32UniqueArray m_master_machine_ranks;
73 Int32UniqueArray m_master_process_ranks;
74
75 private:
76
77 void _init();
78};
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83} // namespace Arcane
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88#endif
Interface of the parallelism manager for a subdomain.
Information on the computing core allocation topology.
virtual ~ParallelTopology()
Frees resources.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
UniqueArray< Int32 > Int32UniqueArray
Dynamic 1D array of 32-bit integers.
Definition UtilsTypes.h:341
std::int32_t Int32
Signed integer type of 32 bits.