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
21namespace Arcane
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
28{
29 public:
30
32 : m_cumulative_value(cumulative_value)
33 {
34 m_begin_time = _getTime();
35 }
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
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-