Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
MachineInfo.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#pragma once
9
10#include <alien/utils/Precomp.h>
11
12namespace Alien {
13 class ALIEN_EXPORT MachineInfo
14 {
15 public :
16 MachineInfo(Arccore::MessagePassing::IMessagePassingMng* parellel_mng) ;
17
18 int nbAcceleratorsPerNode() const {
19 return m_nb_accelerators_per_node ;
20 }
21
22 int nbCoresPerNode() const {
23 return m_nb_cores_per_node ;
24 }
25
26 int maxNbThreads() const {
27 return m_max_nb_threads ;
28 }
29
30 int coreId() const {
31 return m_core_id ;
32 }
33
34 int deviceId() const {
35 return m_device_id ;
36 }
37 private :
38 Arccore::MessagePassing::IMessagePassingMng* m_parallel_mng = nullptr ;
39 int m_my_rank = 0 ;
40 int m_nb_procs = 1 ;
41 int m_nb_cores_per_node = 1 ;
42 int m_nb_accelerators_per_node = 0 ;
43 int m_max_nb_threads = 1 ;
44 int m_core_id = 0 ;
45 int m_device_id = -1 ;
46 };
47}
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17