Public Member Functions | |
| VariablePrivate (const VariableBuildInfo &v, const VariableInfo &vi, Variable *var) | |
| void | serializeHashId (ISerializer *sbuf) |
| Serializes the hashid. | |
Implementation of IVariableInternal | |
| String | computeComparisonHashCollective (IHashAlgorithm *hash_algo, IData *sorted_data) override |
| Calculates the comparison hash for the variable. | |
| void | changeAllocator (const MemoryAllocationOptions &alloc_info) override |
| Changes the variable's allocator. | |
| void | resize (const VariableResizeArgs &resize_args) override |
| Resizes the variable by adding additional capacity. | |
| VariableComparerResults | compareVariable (const VariableComparerArgs &compare_args) override |
| Applies the comparison method specified by compare_args. | |
| IParallelMng * | replicaParallelMng () const |
| Returns the IParallelMng of the mesh replica associated with the variable. | |
Public Attributes | |
| ISubDomain * | m_sub_domain = nullptr |
| IDataFactoryMng * | m_data_factory_mng = nullptr |
| MeshHandle | m_mesh_handle |
| Mesh (can be null). | |
| Ref< IData > | m_data |
| Variable data. | |
| ItemGroup | m_item_group |
| Entity group to which the variable is associated. | |
| IItemFamily * | m_item_family = nullptr |
| Entity family (can be null). | |
| VariableInfo | m_infos |
| Characteristic information of the variable. | |
| int | m_property = 0 |
| Properties of the variable. | |
| bool | m_is_partial = false |
| True if the variable is partial. | |
| bool | m_need_property_update = false |
| bool | m_is_used = false |
| Usage status of the variable. | |
| bool | m_has_valid_data = false |
| True if the data is valid. | |
| Real | m_last_update_time = 0.0 |
| Physical time of the last update. | |
| VariableRef * | m_first_reference = nullptr |
| Integer | m_nb_reference = 0 |
| First reference on the variable. | |
| UniqueArray< VariableDependInfo > | m_depends |
| List of dependencies for this variable. | |
| Int64 | m_modified_time = 0 |
| Tag of the last modification. | |
| ScopedPtrT< IVariableComputeFunction > | m_compute_function |
| Calculation function. | |
| AutoDetachObservable | m_write_observable |
| Write observable. | |
| AutoDetachObservable | m_read_observable |
| Read observable. | |
| AutoDetachObservable | m_on_size_changed_observable |
| Resize observable. | |
| std::map< String, String > | m_tags |
| List of tags. | |
| bool | m_has_recursive_depend = true |
| True if dependencies are recursive. | |
| bool | m_want_shrink = false |
| Variable * | m_variable = nullptr |
| Associated variable. | |
Static Public Attributes | |
| static std::atomic< Int64 > | modified_time_global_value = 1 |
Private Member Functions | |
| void | _setHashId () |
Private Attributes | |
| Byte | m_hash_id [HASHID_SIZE] |
| Hash of the variable to check serialization consistency. | |
Static Private Attributes | |
| static const int | HASHID_SIZE = 64 |
Definition at line 86 of file Variable.cc.
| Arcane::VariablePrivate::VariablePrivate | ( | const VariableBuildInfo & | v, |
| const VariableInfo & | vi, | ||
| Variable * | var ) |
Definition at line 216 of file Variable.cc.
|
inlineprivate |
Definition at line 180 of file Variable.cc.
|
overridevirtual |
Changes the variable's allocator.
Currently valid only for 1D variables. Does nothing for others.
Implements Arcane::IVariableInternal.
Definition at line 1486 of file Variable.cc.
References Arcane::INumericDataInternal::changeAllocator(), m_data, and m_variable.
|
overridevirtual |
Applies the comparison method specified by compare_args.
Implements Arcane::IVariableInternal.
Definition at line 1508 of file Variable.cc.
References m_variable.
|
overridevirtual |
Calculates the comparison hash for the variable.
sorted_data must be sorted according to uniqueId() and also by rank of the IParallelMng associated with the variable.
This method is collective, but only the master rank (the one for which IParallelMng::isMasterIO() is true) returns a valid hash. The others return a null string.
It also returns a null string if the data is not numeric (if sorted_data->_commonInternal()->numericData()==nullptr) or if the variable is not associated with a mesh entity.
Implements Arcane::IVariableInternal.
Definition at line 1452 of file Variable.cc.
References Arcane::IData::_commonInternal(), ARCANE_CHECK_POINTER, Arcane::asBytes(), Arccore::asSpan(), Arcane::ConstMemoryView::bytes(), Arcane::IParallelMng::commRank(), Arcane::IHashAlgorithm::computeHash(), Arcane::IParallelMng::gatherVariable(), m_item_family, Arcane::IParallelMng::masterIORank(), Arcane::INumericDataInternal::memoryView(), Arcane::IDataInternal::numericData(), and Arcane::Convert::toHexaString().
|
virtual |
Returns the IParallelMng of the mesh replica associated with the variable.
Returns nullptr if there is no replication.
Implements Arcane::IVariableInternal.
Definition at line 1517 of file Variable.cc.
References Arcane::IParallelReplication::hasReplication(), m_variable, Arcane::IParallelReplication::replicaParallelMng(), and Arcane::IParallelMng::replication().
|
overridevirtual |
Resizes the variable by adding additional capacity.
Implements Arcane::IVariableInternal.
Definition at line 1499 of file Variable.cc.
References m_variable.
|
inline |
Serializes the hashid.
During deserialization, verifies that the hashid is correct and throws an exception if not.
Definition at line 133 of file Variable.cc.
References ARCANE_FATAL, Arcane::Byte, Arcane::ISerializer::getSpan(), m_hash_id, m_infos, Arcane::ISerializer::mode(), Arcane::ISerializer::ModeGet, Arcane::ISerializer::ModePut, Arcane::ISerializer::putSpan(), and Arcane::ISerializer::reserveSpan().
|
staticprivate |
Definition at line 170 of file Variable.cc.
| ScopedPtrT<IVariableComputeFunction> Arcane::VariablePrivate::m_compute_function |
Calculation function.
Definition at line 116 of file Variable.cc.
| IDataFactoryMng* Arcane::VariablePrivate::m_data_factory_mng = nullptr |
Definition at line 100 of file Variable.cc.
| UniqueArray<VariableDependInfo> Arcane::VariablePrivate::m_depends |
List of dependencies for this variable.
Definition at line 114 of file Variable.cc.
| VariableRef* Arcane::VariablePrivate::m_first_reference = nullptr |
Definition at line 112 of file Variable.cc.
| bool Arcane::VariablePrivate::m_has_recursive_depend = true |
True if dependencies are recursive.
Definition at line 121 of file Variable.cc.
| bool Arcane::VariablePrivate::m_has_valid_data = false |
True if the data is valid.
Definition at line 110 of file Variable.cc.
|
private |
Hash of the variable to check serialization consistency.
The first 16 bytes are the hash of the name in hexadecimal format (derived from an Int64) and the following are the full name (fullName()), possibly truncated, of the variable. Any remaining characters are '~'.
Definition at line 178 of file Variable.cc.
Referenced by serializeHashId().
| VariableInfo Arcane::VariablePrivate::m_infos |
Characteristic information of the variable.
Definition at line 105 of file Variable.cc.
Referenced by serializeHashId().
| bool Arcane::VariablePrivate::m_is_partial = false |
True if the variable is partial.
Definition at line 107 of file Variable.cc.
| bool Arcane::VariablePrivate::m_is_used = false |
Usage status of the variable.
Definition at line 109 of file Variable.cc.
Referenced by Arcane::Variable::_checkSwapIsValid().
| IItemFamily* Arcane::VariablePrivate::m_item_family = nullptr |
Entity family (can be null).
Definition at line 104 of file Variable.cc.
Referenced by computeComparisonHashCollective().
| ItemGroup Arcane::VariablePrivate::m_item_group |
Entity group to which the variable is associated.
Definition at line 103 of file Variable.cc.
| Real Arcane::VariablePrivate::m_last_update_time = 0.0 |
Physical time of the last update.
Definition at line 111 of file Variable.cc.
| MeshHandle Arcane::VariablePrivate::m_mesh_handle |
Mesh (can be null).
Definition at line 101 of file Variable.cc.
| Int64 Arcane::VariablePrivate::m_modified_time = 0 |
Tag of the last modification.
Definition at line 115 of file Variable.cc.
| Integer Arcane::VariablePrivate::m_nb_reference = 0 |
First reference on the variable.
Definition at line 113 of file Variable.cc.
| bool Arcane::VariablePrivate::m_need_property_update = false |
Definition at line 108 of file Variable.cc.
| AutoDetachObservable Arcane::VariablePrivate::m_on_size_changed_observable |
Resize observable.
Definition at line 119 of file Variable.cc.
| int Arcane::VariablePrivate::m_property = 0 |
Properties of the variable.
Definition at line 106 of file Variable.cc.
| AutoDetachObservable Arcane::VariablePrivate::m_read_observable |
Read observable.
Definition at line 118 of file Variable.cc.
| ISubDomain* Arcane::VariablePrivate::m_sub_domain = nullptr |
Definition at line 99 of file Variable.cc.
List of tags.
Definition at line 120 of file Variable.cc.
| Variable* Arcane::VariablePrivate::m_variable = nullptr |
Associated variable.
Definition at line 123 of file Variable.cc.
Referenced by changeAllocator(), compareVariable(), replicaParallelMng(), and resize().
| bool Arcane::VariablePrivate::m_want_shrink = false |
Definition at line 122 of file Variable.cc.
| AutoDetachObservable Arcane::VariablePrivate::m_write_observable |
Write observable.
Definition at line 117 of file Variable.cc.
|
static |
Definition at line 95 of file Variable.cc.