116class ARCANE_CORE_EXPORT ConstituentItemSharedInfo
119 friend ComponentItemInternalData;
120 friend CellComponentCellEnumerator;
121 friend ConstituentItemLocalIdList;
122 friend ConstituentItemLocalIdListView;
124 friend ConstituentItem;
125 friend CellToAllEnvCellConverter;
126 friend AllEnvCellVectorView;
127 friend ConstituentItemVectorImpl;
129 static const int MAT_INDEX_OFFSET = 10;
135 static ComponentItemSharedInfo* null_shared_info_pointer;
136 static ComponentItemSharedInfo* _nullInstance() {
return null_shared_info_pointer; }
137 static void _setNullInstance();
144 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
145 return m_first_sub_constituent_item_id_data[
id.localId()];
147 inline ARCCORE_HOST_DEVICE
void
150 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
151 m_first_sub_constituent_item_id_data[
id.localId()] = first_id;
153 inline ARCCORE_HOST_DEVICE Int16 _nbSubConstituent(ConstituentItemIndex
id)
const
155 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
156 return m_nb_sub_constituent_item_data[
id.localId()];
158 ARCCORE_HOST_DEVICE
inline void _setNbSubConstituent(ConstituentItemIndex
id, Int16 n)
160 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
161 m_nb_sub_constituent_item_data[
id.localId()] = n;
163 inline ARCCORE_HOST_DEVICE Int16 _componentId(ConstituentItemIndex
id)
const
165 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
166 return m_component_id_data[
id.localId()];
168 ARCCORE_HOST_DEVICE
inline void _setComponentId(ConstituentItemIndex
id, Int16 component_id)
170 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
171 m_component_id_data[
id.localId()] = component_id;
173 IMeshComponent* _component(ConstituentItemIndex
id)
const
175 return m_components[_componentId(
id)];
177 impl::ItemBase _globalItemBase(ConstituentItemIndex
id)
const
179 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
180 return impl::ItemBase(m_global_item_local_id_data[
id.localId()], m_item_shared_info);
182 ARCCORE_HOST_DEVICE Int32 _globalItemId(ConstituentItemIndex
id)
const
184 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
185 return m_global_item_local_id_data[
id.localId()];
187 ARCCORE_HOST_DEVICE
void _setGlobalItem(ConstituentItemIndex
id, ItemLocalId global_item_lid)
189 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
190 m_global_item_local_id_data[
id.localId()] = global_item_lid.localId();
192 ARCCORE_HOST_DEVICE
inline matimpl::ConstituentItemBase _superItemBase(ConstituentItemIndex
id)
const;
194 ARCCORE_HOST_DEVICE
void _setSuperItem(ConstituentItemIndex
id, ConstituentItemIndex super_id)
196 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
197 m_super_component_item_local_id_data[
id.localId()] = super_id;
199 inline ARCCORE_HOST_DEVICE matimpl::ConstituentItemBase _subItemBase(ConstituentItemIndex
id, Int32 sub_index)
const;
201 ARCCORE_HOST_DEVICE MatVarIndex _varIndex(ConstituentItemIndex
id)
203 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
204 return m_var_index_data[
id.localId()];
206 ARCCORE_HOST_DEVICE
void _setVarIndex(ConstituentItemIndex
id, MatVarIndex mv_index)
208 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
209 m_var_index_data[
id.localId()] = mv_index;
216 impl::ItemBase item_base(_globalItemBase(
id));
222 Int32 local_id =
id.localId();
223 ARCCORE_CHECK_RANGE(local_id, -1, m_storage_size);
225 m_var_index_data[local_id].reset();
226 m_first_sub_constituent_item_id_data[local_id] = {};
227 m_nb_sub_constituent_item_data[local_id] = 0;
228 m_component_id_data[local_id] = -1;
229 m_global_item_local_id_data[local_id] = NULL_ITEM_LOCAL_ID;
230 m_super_component_item_local_id_data[local_id] = {};
238 ItemSharedInfo* m_item_shared_info = ItemSharedInfo::nullInstance();
239 Int16 m_level = (-1);
240 ConstArrayView<IMeshComponent*> m_components;
241 ComponentItemSharedInfo* m_super_component_item_shared_info = null_shared_info_pointer;
242 ComponentItemSharedInfo* m_sub_component_item_shared_info = null_shared_info_pointer;