Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
IVariableInternal.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/* IVariableInternal.h (C) 2000-2026 */
9/* */
10/* Internal part of IVariable in Arcane. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_INTERNAL_IVARIABLEINTERNAL_H
13#define ARCANE_CORE_INTERNAL_IVARIABLEINTERNAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class VariableResizeArgs
32{
33 public:
34
35 explicit VariableResizeArgs(Int32 new_size)
36 : m_new_size(new_size)
37 {
38 }
39
40 explicit VariableResizeArgs(Int32 new_size, Int32 additional_capacity)
41 : m_new_size(new_size)
42 , m_additional_capacity(additional_capacity)
43 {
44 }
45
46 explicit VariableResizeArgs(Int32 new_size, Int32 additional_capacity, bool use_no_init)
47 : m_new_size(new_size)
48 , m_additional_capacity(additional_capacity)
49 , m_is_use_no_init(use_no_init)
50 {
51 }
52
53 Int32 newSize() const { return m_new_size; }
54 Int32 nbAdditionalCapacity() const { return m_additional_capacity; }
55 bool isUseNoInit() const { return m_is_use_no_init; }
56
57 void setNewSizeDim2(Int32 dim2){m_new_size_dim2 = dim2;}
58 Int32 newSizeDim2() const { return m_new_size_dim2; }
59
60 private:
61
62 Int32 m_new_size = 0;
63 Int32 m_new_size_dim2 = -1;
64 Int32 m_additional_capacity = 0;
65 bool m_is_use_no_init = false;
66};
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
75class ARCANE_CORE_EXPORT IVariableInternal
76{
77 public:
78
79 virtual ~IVariableInternal() = default;
80
81 public:
82
98 IData* sorted_data) = 0;
99
107 virtual void changeAllocator(const MemoryAllocationOptions& alloc_info) = 0;
108
110 virtual void resize(const VariableResizeArgs& resize_args) = 0;
111
114
120 virtual IParallelMng* replicaParallelMng() const = 0;
121};
122
123/*---------------------------------------------------------------------------*/
124/*---------------------------------------------------------------------------*/
125
126} // namespace Arcane
127
128/*---------------------------------------------------------------------------*/
129/*---------------------------------------------------------------------------*/
130
131#endif
Declarations of Arcane's general types.
Interface of a data item.
Definition IData.h:34
Interface of a hashing algorithm.
Interface of the parallelism manager for a subdomain.
Internal part of Ivariable.
virtual String computeComparisonHashCollective(IHashAlgorithm *hash_algo, IData *sorted_data)=0
Calculates the comparison hash for the variable.
virtual void resize(const VariableResizeArgs &resize_args)=0
Resizes the variable by adding additional capacity.
virtual void changeAllocator(const MemoryAllocationOptions &alloc_info)=0
Changes the variable's allocator.
virtual VariableComparerResults compareVariable(const VariableComparerArgs &compare_args)=0
Applies the comparison method specified by compare_args.
virtual IParallelMng * replicaParallelMng() const =0
Returns the IParallelMng of the mesh replica associated with the variable.
Arguments for VariableComparer methods.
Results of a comparison operation.
Arguments for resizing a variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.