Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IItemEnumeratorTracer.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/* IItemEnumeratorTracer.h (C) 2000-2025 */
9/* */
10/* Interface for tracing calls to enumerators on entities. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IITEMENUMERATORTRACER_H
13#define ARCANE_CORE_IITEMENUMERATORTRACER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \internal
30 * \brief Interface for an enumerator tracer on entities.
31 *
32 * This interface provides methods that are called automatically
33 * when using the macros that allow iteration over entities
34 * such as ENUMERATE_CELL or ENUMERATE_SIMD_CELL. For performance reasons,
35 * these macros are only traced if the source file using them is
36 * compiled with the ARCANE_TRACE_ENUMERATOR macro.
37 *
38 * The singleton() method allows retrieving the current implementation.
39 *
40 */
41class ARCANE_CORE_EXPORT IItemEnumeratorTracer
42{
43 public:
44
45 static IItemEnumeratorTracer* singleton();
46
47 public:
48
49 virtual ~IItemEnumeratorTracer() = default;
50
51 public:
52
53 //! Method called before executing an ENUMERATE_
54 virtual void enterEnumerator(const ItemEnumerator& e, EnumeratorTraceInfo& eti) = 0;
55
56 //! Method called after executing an ENUMERATE_
57 virtual void exitEnumerator(const ItemEnumerator& e, EnumeratorTraceInfo& eti) = 0;
58
59 //! Method called before executing an ENUMERATE_SIMD_
61
62 //! Method called after executing an ENUMERATE_SIMD_
64
65 public:
66
67 virtual void dumpStats() = 0;
68 virtual IPerformanceCounterService* perfCounter() = 0;
69 virtual Ref<IPerformanceCounterService> perfCounterRef() = 0;
70
71 public:
72};
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77} // namespace Arcane
78
79/*---------------------------------------------------------------------------*/
80/*---------------------------------------------------------------------------*/
81
82#endif
Declarations of types on entities.
Information for an enumerator's traces.
virtual void enterEnumerator(const SimdItemEnumeratorBase &e, EnumeratorTraceInfo &eti)=0
Method called before executing an ENUMERATE_SIMD_.
virtual void enterEnumerator(const ItemEnumerator &e, EnumeratorTraceInfo &eti)=0
Method called before executing an ENUMERATE_.
virtual void exitEnumerator(const SimdItemEnumeratorBase &e, EnumeratorTraceInfo &eti)=0
Method called after executing an ENUMERATE_SIMD_.
virtual void exitEnumerator(const ItemEnumerator &e, EnumeratorTraceInfo &eti)=0
Method called after executing an ENUMERATE_.
Interface of a service for accessing performance counters.
Enumerator over a list of entities.
Reference to an instance.
Base class for enumerators over vectorial entities (SimdItem).
Definition SimdItem.h:433
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --