Arcane  4.1.12.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-2025 */
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 private:
58
59 Int32 m_new_size = 0;
60 Int32 m_additional_capacity = 0;
61 bool m_is_use_no_init = false;
62};
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
71class ARCANE_CORE_EXPORT IVariableInternal
72{
73 public:
74
75 virtual ~IVariableInternal() = default;
76
77 public:
78
94 IData* sorted_data) = 0;
95
103 virtual void changeAllocator(const MemoryAllocationOptions& alloc_info) = 0;
104
106 virtual void resize(const VariableResizeArgs& resize_args) = 0;
107
110
116 virtual IParallelMng* replicaParallelMng() const = 0;
117};
118
119/*---------------------------------------------------------------------------*/
120/*---------------------------------------------------------------------------*/
121
122} // namespace Arcane
123
124/*---------------------------------------------------------------------------*/
125/*---------------------------------------------------------------------------*/
126
127#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.