Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ProfileRegion.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* ProfileRegion.cc (C) 2000-2024 */
9/* */
10/* Région pour le profiling. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/accelerator/core/ProfileRegion.h"
15
16#include "arcane/accelerator/core/RunQueue.h"
17#include "arcane/accelerator/core/internal/IRunnerRuntime.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Accelerator
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
29ProfileRegion(const RunQueue& queue, const String& name)
30{
31 if (queue.isNull())
32 return;
33 m_runtime = queue._internalRuntime();
34 m_runtime->pushProfilerRange(name, -1);
35}
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
41ProfileRegion(const RunQueue& queue, const String& name, Int32 color_rgb)
42{
43 if (queue.isNull())
44 return;
45 m_runtime = queue._internalRuntime();
46 m_runtime->pushProfilerRange(name, color_rgb);
47}
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52ProfileRegion::
53~ProfileRegion()
54{
55 if (m_runtime)
56 m_runtime->popProfilerRange();
57}
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
61
62} // namespace Arcane::Accelerator::impl
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
ProfileRegion(const RunQueue &queue, const String &name)
Début une région de nom name.
File d'exécution pour un accélérateur.
bool isNull() const
Indique si la RunQueue est nulle.
Chaîne de caractères unicode.
Espace de nom pour l'utilisation des accélérateurs.