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