Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
RunnerInternal.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/* RunnerInternal.h (C) 2000-2026 */
9/* */
10/* Internal API of 'Runner' in Arcane. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_COMMON_ACCELERATOR_INTERNAL_RUNNERINTERNAL_H
13#define ARCCORE_COMMON_ACCELERATOR_INTERNAL_RUNNERINTERNAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/common/accelerator/CommonAcceleratorGlobal.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Accelerator
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class ARCCORE_COMMON_EXPORT RunnerInternal
29{
30 friend ::Arcane::Accelerator::Runner;
31 friend ::Arcane::Accelerator::Impl::RunnerImpl;
32
33 private:
34
35 explicit RunnerInternal(Impl::RunnerImpl* p)
36 : m_runner_impl(p)
37 {}
38
39 public:
40
42 static void stopAllProfiling();
43
49 static void finalize(ITraceMng* tm);
50
51 public:
52
53 // The following methods that manage profiling act on
54 // the runtime (CUDA, ROCM, ...) associated with the runner. For example, if we
55 // have two runners associated with CUDA, if we call startProfiling() for one
56 // then isProfilingActive() will be true for the second runner.
57
59 bool isProfilingActive();
61 void startProfiling();
63 void stopProfiling();
64
70 void printProfilingInfos(std::ostream& o);
71
72 private:
73
74 Impl::RunnerImpl* m_runner_impl = nullptr;
75};
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80} // namespace Arcane::Accelerator
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85#endif
static void finalize(ITraceMng *tm)
Finalizes execution.
Definition Runner.cc:518
void startProfiling()
Starts profiling for the associated runtime.
Definition Runner.cc:530
bool isProfilingActive()
Indicates whether profiling is active for the associated runtime.
Definition Runner.cc:548
static void stopAllProfiling()
Stops all profiling activities.
Definition Runner.cc:506
void stopProfiling()
Stops profiling for the associated runtime.
Definition Runner.cc:539
void printProfilingInfos(std::ostream &o)
Displays profiling information.
Definition Runner.cc:557