Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
EnumeratorTracer.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/* EnumeratorTracer.h (C) 2000-2022 */
9/* */
10/* Tracing of enumerators on components. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MATERIALS_ENUMERATORTRACER_H
13#define ARCANE_MATERIALS_ENUMERATORTRACER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/Ref.h"
19#include "arcane/utils/IPerformanceCounterService.h"
20
21#include "arcane/core/materials/IEnumeratorTracer.h"
22
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane::Materials
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34class ARCANE_MATERIALS_EXPORT EnumeratorTracer
35: public TraceAccessor
36, public IEnumeratorTracer
37{
38 public:
39
40 EnumeratorTracer(ITraceMng* tm, Ref<IPerformanceCounterService> perf_service);
41 ~EnumeratorTracer();
42
43 public:
44
45 void enterEnumerator(const ComponentEnumerator& e, EnumeratorTraceInfo& eti) override;
46 void exitEnumerator(const ComponentEnumerator& e, EnumeratorTraceInfo& eti) override;
47
48 void enterEnumerator(const MatEnumerator& e, EnumeratorTraceInfo& eti) override;
49 void exitEnumerator(const MatEnumerator& e, EnumeratorTraceInfo& eti) override;
50
51 void enterEnumerator(const EnvEnumerator& e, EnumeratorTraceInfo& eti) override;
52 void exitEnumerator(const EnvEnumerator& e, EnumeratorTraceInfo& eti) override;
53
54 void enterEnumerator(const ComponentCellEnumerator& e, EnumeratorTraceInfo& eti) override;
55 void exitEnumerator(const ComponentCellEnumerator& e, EnumeratorTraceInfo& eti) override;
56
57 void enterEnumerator(const AllEnvCellEnumerator& e, EnumeratorTraceInfo& eti) override;
58 void exitEnumerator(const AllEnvCellEnumerator& e, EnumeratorTraceInfo& eti) override;
59
60 void enterEnumerator(const CellComponentCellEnumerator& e, EnumeratorTraceInfo& eti) override;
61 void exitEnumerator(const CellComponentCellEnumerator& e, EnumeratorTraceInfo& eti) override;
62
63 void enterEnumerator(const ComponentPartSimdCellEnumerator& e, EnumeratorTraceInfo& eti) override;
64 void exitEnumerator(const ComponentPartSimdCellEnumerator& e, EnumeratorTraceInfo& eti) override;
65
66 void enterEnumerator(const ComponentPartCellEnumerator& e, EnumeratorTraceInfo& eti) override;
67 void exitEnumerator(const ComponentPartCellEnumerator& e, EnumeratorTraceInfo& eti) override;
68
69 public:
70
71 void dumpStats() override;
72
73 private:
74
75 Int64 m_nb_call = 0;
76 Int64 m_nb_loop_component_cell = 0;
77 Int64 m_nb_loop_cell_component_cell = 0;
78 Int64 m_nb_loop_all_env_cell = 0;
79
80 Int64 m_nb_call_component_cell = 0;
81 Int64 m_nb_call_cell_component_cell = 0;
82 Int64 m_nb_call_all_env_cell = 0;
83
85 bool m_is_verbose = false;
86
87 private:
88
89 void _beginLoop(EnumeratorTraceInfo& eti);
90 void _endLoop(EnumeratorTraceInfo& eti);
91};
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96} // namespace Arcane::Materials
97
98/*---------------------------------------------------------------------------*/
99/*---------------------------------------------------------------------------*/
100
101#endif
Information for an enumerator's traces.
Enumerator over the constituents of a cell.
Enumerator over a part of the cells of a component (material or environment).
Enumerator over a sub-part (pure or partial) of a subset of the cells of a component (material or env...
SIMD enumerator on a sub-part (pure or partial) of a subset of the cells of a component (material or ...
Reference to an instance.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
Always enables tracing in Arcane parts concerning materials.
class ARCANE_MATERIALS_EXPORT(64) SimdMatVarIndex
SIMD indexer on a component.
std::int64_t Int64
Signed integer type of 64 bits.