Implementation of the ItemGroupImpl class. More...
#include <arcane/core/internal/ItemGroupInternal.h>
Classes | |
| class | CheckNeedUpdateMutex |
| Mutex to protect calls to ItemGroupImpl::_checkNeedUpdate(). More... | |
Public Attributes | |
| ItemGroupImplInternal | m_internal_api |
| IMesh * | m_mesh = nullptr |
| Associated group manager. | |
| IItemFamily * | m_item_family = nullptr |
| Associated family. | |
| ItemGroupImpl * | m_parent = nullptr |
| String | m_variable_name |
| Parent group (null group if none). | |
| String | m_full_name |
| Full name of the group. | |
| bool | m_is_null = true |
| true if the group is null | |
| eItemKind | m_kind = IK_Unknown |
| Kind of the group entities. | |
| String | m_name |
| Name of the group. | |
| bool | m_is_own = false |
| true if the group contains only entities owned by us. | |
| Int64 | m_simd_timestamp = -1 |
| Time of the last modification for SIMD info calculation. | |
| ItemGroupImpl * | m_own_group = nullptr |
| Items owned by the subdomain. | |
| ItemGroupImpl * | m_ghost_group = nullptr |
| Items not owned by the subdomain. | |
| ItemGroupImpl * | m_interface_group = nullptr |
| Items on the boundary of two subdomains. | |
| ItemGroupImpl * | m_node_group = nullptr |
| Node group. | |
| ItemGroupImpl * | m_edge_group = nullptr |
| Edge group. | |
| ItemGroupImpl * | m_face_group = nullptr |
| Face group. | |
| ItemGroupImpl * | m_cell_group = nullptr |
| Cell group. | |
| ItemGroupImpl * | m_inner_face_group = nullptr |
| Inner face group. | |
| ItemGroupImpl * | m_outer_face_group = nullptr |
| ItemGroupImpl * | m_active_cell_group = nullptr |
| AMR. | |
| ItemGroupImpl * | m_own_active_cell_group = nullptr |
| Active owned cell group. | |
| ItemGroupImpl * | m_active_face_group = nullptr |
| Active face group. | |
| ItemGroupImpl * | m_own_active_face_group = nullptr |
| Active owned face group. | |
| ItemGroupImpl * | m_inner_active_face_group = nullptr |
| Active inner face group. | |
| ItemGroupImpl * | m_outer_active_face_group = nullptr |
| Active outer face group. | |
| std::map< Integer, ItemGroupImpl * > | m_level_cell_group |
| Level cell group. | |
| std::map< Integer, ItemGroupImpl * > | m_own_level_cell_group |
| Level owned cell group. | |
| std::map< String, AutoRefT< ItemGroupImpl > > | m_sub_groups |
| Set of all sub-groups. | |
| bool | m_need_recompute = false |
| True if the group needs to be recalculated. | |
| bool | m_need_invalidate_on_recompute = false |
| True if invalidate observers must be activated upon recalculation. | |
| bool | m_transaction_mode = false |
| True if the group is in direct transaction mode. | |
| bool | m_is_local_to_sub_domain = false |
| True if the group is local to the subdomain. | |
| IFunctor * | m_compute_functor = nullptr |
| Group computation function. | |
| bool | m_is_all_items = false |
| Indicates if it is the group of all entities. | |
| bool | m_is_constituent_group = false |
| Indicates if the group is associated with a constituent (IMeshComponent). | |
| SharedPtrT< GroupIndexTable > | m_group_index_table |
| Hash table of item local id to its enumeration position. | |
| Ref< IVariableSynchronizer > | m_synchronizer |
| Group synchronizer. | |
| UniqueArray< Int32 > | m_items_index_in_all_group |
| std::map< const void *, IItemGroupObserver * > | m_observers |
| localids -> index (ONLY ALLITEMS) | |
| bool | m_observer_need_info = false |
| Synthesis of observer need for transition information. | |
| UniqueArray< Int32 > | m_local_buffer { MemoryUtils::getAllocatorForMostlyReadOnlyData() } |
| Array< Int32 > * | m_items_local_id = &m_local_buffer |
| List of local IDs of the entities in this group. | |
| VariableArrayInt32 * | m_variable_items_local_id = nullptr |
| bool | m_is_contiguous = false |
| bool | m_is_check_simd_padding = true |
| True if the localIds are consecutive. | |
| bool | m_is_print_check_simd_padding = false |
| bool | m_is_print_apply_simd_padding = false |
| bool | m_is_print_stack_apply_simd_padding = false |
| CheckNeedUpdateMutex | m_check_need_update_mutex |
| Mutex to protect updates. | |
| ItemGroupSubPartsByType | m_sub_parts_by_type |
| Sub-part of a group based on its type. | |
Private Member Functions | |
| void | _notifyDirectRemoveItems (SmallSpan< const Int32 > removed_ids, Int32 nb_remaining) |
| void | _init () |
Private Attributes | |
| Int64 | m_timestamp = -1 |
| Time of the last modification. | |
Friends | |
| class | ItemGroupImplInternal |
Implementation of the ItemGroupImpl class.
The container holding the list of group entities is either a variable in the case of a standard group, or a simple array in the case of a group having a parent. Indeed, groups having parents are dynamically generated groups (for example, the group of own entities) and are therefore not always present in all sub-domains (a variable must always exist in all sub-domains). Furthermore, their value does not need to be saved during a protection.
Definition at line 135 of file ItemGroupInternal.h.
| Arcane::ItemGroupInternal::ItemGroupInternal | ( | ) |
Definition at line 38 of file ItemGroupInternal.cc.
| Arcane::ItemGroupInternal::ItemGroupInternal | ( | IItemFamily * | family, |
| const String & | name ) |
Definition at line 49 of file ItemGroupInternal.cc.
| Arcane::ItemGroupInternal::ItemGroupInternal | ( | IItemFamily * | family, |
| ItemGroupImpl * | parent, | ||
| const String & | name ) |
Definition at line 66 of file ItemGroupInternal.cc.
| Arcane::ItemGroupInternal::~ItemGroupInternal | ( | ) |
Definition at line 84 of file ItemGroupInternal.cc.
|
private |
Definition at line 99 of file ItemGroupInternal.cc.
|
private |
Definition at line 520 of file ItemGroupInternal.cc.
Definition at line 355 of file ItemGroupInternal.cc.
| void Arcane::ItemGroupInternal::applySimdPadding | ( | ) |
Apply padding for vectorization.
Definition at line 288 of file ItemGroupInternal.cc.
References Arcane::platform::getStackTrace(), Arcane::ITraceMng::info(), m_item_family, and m_name.
Referenced by checkUpdateSimdPadding().
| void Arcane::ItemGroupInternal::checkIsContiguous | ( | ) |
Checks that the localIds() are contiguous.
Definition at line 263 of file ItemGroupInternal.cc.
References Arcane::ConstArrayView< T >::empty(), and Arcane::ConstArrayView< T >::size().
| void Arcane::ItemGroupInternal::checkUpdateSimdPadding | ( | ) |
Fills the last elements of the group to have a complete SIMD vector.
For vectorization to work, the number of elements in the group must be a multiple of the size of a SIMD vector. If this is not the case, the last values of the localId() array are filled with the last element.
For example, suppose a SIMD vector size of 8 (which is the maximum currently with AVX512) and a group grp of 13 elements. The group must therefore be filled as follows:
Note that the group size remains 13 elements. The additional padding is only for iterations via ENUMERATE_SIMD. Since the localId() array is allocated with the alignment allocator, it is guaranteed that the allocated memory is sufficient for padding.
Definition at line 331 of file ItemGroupInternal.cc.
References applySimdPadding(), Arcane::ITraceMng::info(), m_is_check_simd_padding, m_item_family, and m_simd_timestamp.
| void Arcane::ItemGroupInternal::checkValid | ( | ) |
Definition at line 444 of file ItemGroupInternal.cc.
|
inline |
Definition at line 209 of file ItemGroupInternal.h.
|
inline |
Definition at line 247 of file ItemGroupInternal.h.
|
inline |
Definition at line 223 of file ItemGroupInternal.h.
|
inline |
Definition at line 248 of file ItemGroupInternal.h.
| ItemInfoListView Arcane::ItemGroupInternal::itemInfoListView | ( | ) | const |
Definition at line 155 of file ItemGroupInternal.cc.
| ItemInternalList Arcane::ItemGroupInternal::items | ( | ) | const |
Definition at line 135 of file ItemGroupInternal.cc.
|
inline |
Definition at line 217 of file ItemGroupInternal.h.
|
inline |
Definition at line 218 of file ItemGroupInternal.h.
|
inline |
Definition at line 212 of file ItemGroupInternal.h.
| Int32 Arcane::ItemGroupInternal::maxLocalId | ( | ) | const |
Definition at line 146 of file ItemGroupInternal.cc.
|
inline |
Definition at line 211 of file ItemGroupInternal.h.
|
inline |
Definition at line 219 of file ItemGroupInternal.h.
|
inline |
Definition at line 208 of file ItemGroupInternal.h.
|
inline |
Definition at line 249 of file ItemGroupInternal.h.
| void Arcane::ItemGroupInternal::notifyCompactObservers | ( | const Int32ConstArrayView * | info | ) |
Definition at line 226 of file ItemGroupInternal.cc.
| void Arcane::ItemGroupInternal::notifyExtendObservers | ( | const Int32ConstArrayView * | info | ) |
Definition at line 196 of file ItemGroupInternal.cc.
| void Arcane::ItemGroupInternal::notifyInvalidateObservers | ( | ) |
Definition at line 241 of file ItemGroupInternal.cc.
| void Arcane::ItemGroupInternal::notifyReduceObservers | ( | const Int32ConstArrayView * | info | ) |
Definition at line 211 of file ItemGroupInternal.cc.
|
inline |
Definition at line 210 of file ItemGroupInternal.h.
| void Arcane::ItemGroupInternal::resetSubGroups | ( | ) |
Definition at line 166 of file ItemGroupInternal.cc.
|
inline |
Definition at line 232 of file ItemGroupInternal.h.
|
inline |
Definition at line 222 of file ItemGroupInternal.h.
|
inline |
Definition at line 226 of file ItemGroupInternal.h.
|
inline |
Definition at line 220 of file ItemGroupInternal.h.
|
friend |
Definition at line 137 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_active_cell_group = nullptr |
| ItemGroupImpl* Arcane::ItemGroupInternal::m_active_face_group = nullptr |
Active face group.
Definition at line 295 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_cell_group = nullptr |
Cell group.
Definition at line 287 of file ItemGroupInternal.h.
| CheckNeedUpdateMutex Arcane::ItemGroupInternal::m_check_need_update_mutex |
Mutex to protect updates.
Definition at line 340 of file ItemGroupInternal.h.
| IFunctor* Arcane::ItemGroupInternal::m_compute_functor = nullptr |
Group computation function.
Definition at line 308 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_edge_group = nullptr |
Edge group.
Definition at line 285 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_face_group = nullptr |
Face group.
Definition at line 286 of file ItemGroupInternal.h.
| String Arcane::ItemGroupInternal::m_full_name |
Full name of the group.
Definition at line 267 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_ghost_group = nullptr |
Items not owned by the subdomain.
Definition at line 282 of file ItemGroupInternal.h.
| SharedPtrT<GroupIndexTable> Arcane::ItemGroupInternal::m_group_index_table |
Hash table of item local id to its enumeration position.
Definition at line 311 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_inner_active_face_group = nullptr |
Active inner face group.
Definition at line 297 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_inner_face_group = nullptr |
Inner face group.
Definition at line 288 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_interface_group = nullptr |
Items on the boundary of two subdomains.
Definition at line 283 of file ItemGroupInternal.h.
| ItemGroupImplInternal Arcane::ItemGroupInternal::m_internal_api |
Definition at line 262 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_all_items = false |
Indicates if it is the group of all entities.
Definition at line 309 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_check_simd_padding = true |
True if the localIds are consecutive.
Definition at line 332 of file ItemGroupInternal.h.
Referenced by checkUpdateSimdPadding().
| bool Arcane::ItemGroupInternal::m_is_constituent_group = false |
Indicates if the group is associated with a constituent (IMeshComponent).
Definition at line 310 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_contiguous = false |
Definition at line 331 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_local_to_sub_domain = false |
True if the group is local to the subdomain.
Definition at line 307 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_null = true |
true if the group is null
Definition at line 268 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_own = false |
true if the group contains only entities owned by us.
Definition at line 271 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_print_apply_simd_padding = false |
Definition at line 334 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_print_check_simd_padding = false |
Definition at line 333 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_is_print_stack_apply_simd_padding = false |
Definition at line 335 of file ItemGroupInternal.h.
| IItemFamily* Arcane::ItemGroupInternal::m_item_family = nullptr |
Associated family.
Definition at line 264 of file ItemGroupInternal.h.
Referenced by applySimdPadding(), and checkUpdateSimdPadding().
| UniqueArray<Int32> Arcane::ItemGroupInternal::m_items_index_in_all_group |
Definition at line 315 of file ItemGroupInternal.h.
List of local IDs of the entities in this group.
Definition at line 329 of file ItemGroupInternal.h.
| eItemKind Arcane::ItemGroupInternal::m_kind = IK_Unknown |
Kind of the group entities.
Definition at line 269 of file ItemGroupInternal.h.
| std::map<Integer, ItemGroupImpl*> Arcane::ItemGroupInternal::m_level_cell_group |
Level cell group.
Definition at line 299 of file ItemGroupInternal.h.
| UniqueArray<Int32> Arcane::ItemGroupInternal::m_local_buffer { MemoryUtils::getAllocatorForMostlyReadOnlyData() } |
Definition at line 328 of file ItemGroupInternal.h.
| IMesh* Arcane::ItemGroupInternal::m_mesh = nullptr |
Associated group manager.
Definition at line 263 of file ItemGroupInternal.h.
| String Arcane::ItemGroupInternal::m_name |
Name of the group.
Definition at line 270 of file ItemGroupInternal.h.
Referenced by applySimdPadding().
| bool Arcane::ItemGroupInternal::m_need_invalidate_on_recompute = false |
True if invalidate observers must be activated upon recalculation.
Definition at line 305 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_need_recompute = false |
True if the group needs to be recalculated.
Definition at line 304 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_node_group = nullptr |
Node group.
Definition at line 284 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_observer_need_info = false |
Synthesis of observer need for transition information.
Definition at line 318 of file ItemGroupInternal.h.
| std::map<const void*, IItemGroupObserver*> Arcane::ItemGroupInternal::m_observers |
localids -> index (ONLY ALLITEMS)
Group observers
Definition at line 317 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_outer_active_face_group = nullptr |
Active outer face group.
Definition at line 298 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_outer_face_group = nullptr |
Outer face group
Definition at line 289 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_own_active_cell_group = nullptr |
Active owned cell group.
Definition at line 294 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_own_active_face_group = nullptr |
Active owned face group.
Definition at line 296 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_own_group = nullptr |
Items owned by the subdomain.
Definition at line 281 of file ItemGroupInternal.h.
| std::map<Integer, ItemGroupImpl*> Arcane::ItemGroupInternal::m_own_level_cell_group |
Level owned cell group.
Definition at line 300 of file ItemGroupInternal.h.
| ItemGroupImpl* Arcane::ItemGroupInternal::m_parent = nullptr |
Definition at line 265 of file ItemGroupInternal.h.
| Int64 Arcane::ItemGroupInternal::m_simd_timestamp = -1 |
Time of the last modification for SIMD info calculation.
Definition at line 279 of file ItemGroupInternal.h.
Referenced by checkUpdateSimdPadding().
| std::map<String, AutoRefT<ItemGroupImpl> > Arcane::ItemGroupInternal::m_sub_groups |
Set of all sub-groups.
Definition at line 303 of file ItemGroupInternal.h.
| ItemGroupSubPartsByType Arcane::ItemGroupInternal::m_sub_parts_by_type |
Sub-part of a group based on its type.
Definition at line 345 of file ItemGroupInternal.h.
| Ref<IVariableSynchronizer> Arcane::ItemGroupInternal::m_synchronizer |
Group synchronizer.
Definition at line 312 of file ItemGroupInternal.h.
|
private |
Time of the last modification.
Definition at line 275 of file ItemGroupInternal.h.
| bool Arcane::ItemGroupInternal::m_transaction_mode = false |
True if the group is in direct transaction mode.
Definition at line 306 of file ItemGroupInternal.h.
| VariableArrayInt32* Arcane::ItemGroupInternal::m_variable_items_local_id = nullptr |
Definition at line 330 of file ItemGroupInternal.h.
| String Arcane::ItemGroupInternal::m_variable_name |
Parent group (null group if none).
Name of the variable containing the group item indices
Definition at line 266 of file ItemGroupInternal.h.