Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MpiTimeInterval.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2022 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
/* MpiTimeInterval.h (C) 2000-2022 */
9
/* */
10
/*---------------------------------------------------------------------------*/
11
#ifndef ARCANE_PARALLEL_MPI_MPITIMEINTERVAL_H
12
#define ARCANE_PARALLEL_MPI_MPITIMEINTERVAL_H
13
/*---------------------------------------------------------------------------*/
14
/*---------------------------------------------------------------------------*/
15
16
#include "arcane/parallel/mpi/ArcaneMpi.h"
17
18
/*---------------------------------------------------------------------------*/
19
/*---------------------------------------------------------------------------*/
20
21
namespace
Arcane
22
{
23
24
/*---------------------------------------------------------------------------*/
25
/*---------------------------------------------------------------------------*/
26
27
class
MpiTimeInterval
28
{
29
public
:
30
31
MpiTimeInterval
(
double
*
cumulative_value
)
32
: m_cumulative_value(
cumulative_value
)
33
{
34
m_begin_time = _getTime();
35
}
36
~MpiTimeInterval
()
37
{
38
double
end_time
= _getTime();
39
*m_cumulative_value += (
end_time
- m_begin_time);
40
}
41
42
private
:
43
44
inline
double
_getTime()
45
{
46
return
MPI_Wtime
();
47
}
48
49
private
:
50
51
double
* m_cumulative_value;
52
double
m_begin_time = 0.0;
53
};
54
55
/*---------------------------------------------------------------------------*/
56
/*---------------------------------------------------------------------------*/
57
58
}
// namespace Arcane
59
60
/*---------------------------------------------------------------------------*/
61
/*---------------------------------------------------------------------------*/
62
63
#endif
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
Arcane::MpiTimeInterval
Definition
MpiTimeInterval.h:28
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AcceleratorGlobal.h:36
arcane
parallel
mpi
MpiTimeInterval.h
Généré le Lundi 18 Novembre 2024 03:01:41 pour Arcane par
1.9.8