Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
SubDomainBuildInfo.cc
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/* SubDomainBuildInfo.cc (C) 2000-2020 */
9/* */
10/* Informations pour construire un sous-domaine. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/SubDomainBuildInfo.h"
15#include "arcane/IParallelMng.h"
16
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
20namespace Arcane
21{
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26SubDomainBuildInfo::
27SubDomainBuildInfo(Ref<IParallelMng> pm,Int32 index)
28: m_parallel_mng(pm)
29, m_index(index)
30, m_all_replica_parallel_mng(m_parallel_mng)
31{
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37SubDomainBuildInfo::
38SubDomainBuildInfo(Ref<IParallelMng> pm,Int32 index,Ref<IParallelMng> all_replica_pm)
39: m_parallel_mng(pm)
40, m_index(index)
41, m_all_replica_parallel_mng(all_replica_pm)
42{
43}
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
48ByteConstArrayView SubDomainBuildInfo::
49caseBytes() const
50{
51 ConstArrayView<std::byte> x { m_case_content.view() };
52 return ByteConstArrayView(x.size(), reinterpret_cast<const Byte*>(x.data()));
53}
54
55void SubDomainBuildInfo::
56setCaseBytes(ByteConstArrayView bytes)
57{
58 auto d = reinterpret_cast<const std::byte*>(bytes.data());
59 m_case_content = ByteConstSpan(d,bytes.size());
60}
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65ByteConstSpan SubDomainBuildInfo::
66caseContent() const
67{
68 return m_case_content;
69}
70
71void SubDomainBuildInfo::
72setCaseContent(ByteConstSpan content)
73{
74 m_case_content = content;
75}
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80} // End namespace Arcane
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Span< const std::byte > ByteConstSpan
Vue en lecture seule d'un tableau à une dimension de caractères.
Definition UtilsTypes.h:706
ConstArrayView< Byte > ByteConstArrayView
Equivalent C d'un tableau à une dimension de caractères.
Definition UtilsTypes.h:634
unsigned char Byte
Type d'un octet.
Definition UtilsTypes.h:142