Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
StandaloneAcceleratorMng.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2023 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/* StandaloneStandaloneAcceleratorMng.cc (C) 2000-2023 */
9/* */
10/* Implémentation autonome (sans IApplication) de 'IAcceleratorMng.h'. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/launcher/StandaloneAcceleratorMng.h"
15
16#include "arcane/utils/Ref.h"
17#include "arcane/utils/ITraceMng.h"
18
19#include "arcane/impl/MainFactory.h"
20
21#include "arcane/accelerator/core/IAcceleratorMng.h"
22
23#include "arcane/AcceleratorRuntimeInitialisationInfo.h"
24
25#include "arcane/launcher/ArcaneLauncher.h"
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30namespace Arcane
31{
32
34{
35 public:
36 Impl()
37 {
38 MainFactory main_factory;
39 m_trace_mng = makeRef<ITraceMng>(main_factory.createTraceMng());
40 m_accelerator_mng = main_factory.createAcceleratorMngRef(m_trace_mng.get());
41 }
42 public:
43 Ref<ITraceMng> m_trace_mng;
44 Ref<IAcceleratorMng> m_accelerator_mng;
45};
46
47/*---------------------------------------------------------------------------*/
48/*---------------------------------------------------------------------------*/
49
50StandaloneAcceleratorMng::
51StandaloneAcceleratorMng()
52: m_p(makeRef(new Impl()))
53{
54 m_p->m_accelerator_mng->initialize(ArcaneLauncher::acceleratorRuntimeInitialisationInfo());
55}
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
59
62{
63 return m_p->m_trace_mng.get();
64}
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
71{
72 return m_p->m_accelerator_mng.get();
73}
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78} // End namespace Arcane
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
Interface du gestionnaire des accélérateurs.
static AcceleratorRuntimeInitialisationInfo & acceleratorRuntimeInitialisationInfo()
Informations pour l'initialisation des accélerateurs.
ITraceMng * traceMng()
Gestionnaire de trace associé.
IAcceleratorMng * acceleratorMng()
Gestionnaire des accélérateurs associé.
Interface du gestionnaire de traces.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-