Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
CheckpointInfo.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/* CheckpointInfo.h (C) 2000-2018 */
9/* */
10/* Informations sur une protection. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CHECKPOINTINFO_H
13#define ARCANE_CHECKPOINTINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25class ICheckpointReader2;
26class IParallelMng;
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30/*!
31 * \brief Informations sur une protection.
32 */
33class ARCANE_CORE_EXPORT CheckpointInfo
34{
35 public:
36
38
39 public:
40
41 Int32 nbSubDomain() const { return m_nb_sub_domain; }
42 void setNbSubDomain(Int32 v) { m_nb_sub_domain = v; }
43
44 Int32 nbReplication() const { return m_nb_replication; }
45 void setNbReplication(Int32 v) { m_nb_replication = v; }
46
47 void setServiceName(const String& v) { m_service_name = v; }
48 const String& serviceName() const { return m_service_name; }
49
50 void setDirectory(const String& v) { m_directory = v; }
51 const String& directory() const { return m_directory; }
52
53 Int32 checkpointIndex() const { return m_checkpoint_index ; }
54 void setCheckpointIndex(Int32 v) { m_checkpoint_index = v; }
55
56 Real checkpointTime() const { return m_checkpoint_time; }
57 void setCheckpointTime(Real v) { m_checkpoint_time = v; }
58
59 void setReaderMetaData(const String& v) { m_reader_meta_data = v; }
60 const String& readerMetaData() const { return m_reader_meta_data; }
61
62 Int32 subDomainRank() const { return m_sub_domain_rank; }
63 void setSubDomainRank(Int32 v) { m_sub_domain_rank = v; }
64
65 Int32 replicationRank() const { return m_replication_rank; }
66 void setReplicationRank(Int32 v) { m_replication_rank = v; }
67
68 //! Indique s'il s'agit d'une reprise
69 bool isRestart() const { return m_is_restart; }
70 void setIsRestart(bool v) { m_is_restart = v; }
71
72 private:
73
74 Int32 m_nb_replication;
75 Int32 m_nb_sub_domain;
76 String m_service_name;
77 String m_directory;
78 Real m_checkpoint_time;
79 Int32 m_checkpoint_index;
80 String m_reader_meta_data;
81 Int32 m_sub_domain_rank;
82 Int32 m_replication_rank;
83 bool m_is_restart;
84};
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88/*!
89 * \brief Informations de relecture d'une protection.
90 */
92{
93 public:
94 explicit CheckpointReadInfo(const CheckpointInfo& ci)
95 : m_checkpoint_info(ci), m_reader(nullptr), m_parallel_mng(nullptr){}
96 public:
97 const CheckpointInfo& checkpointInfo() const { return m_checkpoint_info; }
98 ICheckpointReader2* reader() const { return m_reader; }
99 void setReader(ICheckpointReader2* v) { m_reader = v; }
100 IParallelMng* parallelMng() const { return m_parallel_mng; }
101 void setParallelMng(IParallelMng* v) { m_parallel_mng = v; }
102 private:
103 CheckpointInfo m_checkpoint_info;
104 ICheckpointReader2* m_reader;
105 IParallelMng* m_parallel_mng;
106};
107
108/*---------------------------------------------------------------------------*/
109/*---------------------------------------------------------------------------*/
110
111} // End namespace Arcane
112
113/*---------------------------------------------------------------------------*/
114/*---------------------------------------------------------------------------*/
115
116#endif
117
Informations sur une protection.
bool isRestart() const
Indique s'il s'agit d'une reprise.
Informations de relecture d'une protection.
Interface du service de lecture d'une protection/reprise (V2)
Interface du gestionnaire de parallélisme pour un sous-domaine.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-