126 static const int MAT_INDEX_OFFSET = 10;
134 static void _setNullInstance();
141 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
142 return m_first_sub_constituent_item_id_data[
id.localId()];
144 inline ARCCORE_HOST_DEVICE
void
147 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
148 m_first_sub_constituent_item_id_data[
id.localId()] =
first_id;
150 inline ARCCORE_HOST_DEVICE
Int16 _nbSubConstituent(ConstituentItemIndex
id)
const
152 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
153 return m_nb_sub_constituent_item_data[
id.localId()];
155 ARCCORE_HOST_DEVICE
inline void _setNbSubConstituent(ConstituentItemIndex
id,
Int16 n)
157 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
158 m_nb_sub_constituent_item_data[
id.localId()] = n;
160 inline ARCCORE_HOST_DEVICE
Int16 _componentId(ConstituentItemIndex
id)
const
162 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
163 return m_component_id_data[
id.localId()];
165 ARCCORE_HOST_DEVICE
inline void _setComponentId(ConstituentItemIndex
id,
Int16 component_id)
167 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
168 m_component_id_data[
id.localId()] = component_id;
170 IMeshComponent* _component(ConstituentItemIndex
id)
const
172 return m_components[_componentId(
id)];
174 impl::ItemBase _globalItemBase(ConstituentItemIndex
id)
const
176 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
177 return impl::ItemBase(m_global_item_local_id_data[
id.localId()], m_item_shared_info);
179 ARCCORE_HOST_DEVICE
Int32 _globalItemId(ConstituentItemIndex
id)
const
181 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
182 return m_global_item_local_id_data[
id.localId()];
184 ARCCORE_HOST_DEVICE
void _setGlobalItem(ConstituentItemIndex
id, ItemLocalId global_item_lid)
186 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
187 m_global_item_local_id_data[
id.localId()] = global_item_lid.localId();
189 ARCCORE_HOST_DEVICE
inline matimpl::ConstituentItemBase _superItemBase(ConstituentItemIndex
id)
const;
191 ARCCORE_HOST_DEVICE
void _setSuperItem(ConstituentItemIndex
id, ConstituentItemIndex super_id)
193 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
194 m_super_component_item_local_id_data[
id.localId()] = super_id;
196 inline ARCCORE_HOST_DEVICE matimpl::ConstituentItemBase _subItemBase(ConstituentItemIndex
id,
Int32 sub_index)
const;
198 ARCCORE_HOST_DEVICE MatVarIndex _varIndex(ConstituentItemIndex
id)
200 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
201 return m_var_index_data[
id.localId()];
203 ARCCORE_HOST_DEVICE
void _setVarIndex(ConstituentItemIndex
id, MatVarIndex mv_index)
205 ARCCORE_CHECK_RANGE(
id.localId(), -1, m_storage_size);
206 m_var_index_data[
id.localId()] = mv_index;
214 return (Int64)m_var_index_data[
id.localId()].arrayIndex() + ((Int64)
item_base.uniqueId() << MAT_INDEX_OFFSET);
219 Int32 local_id =
id.localId();
220 ARCCORE_CHECK_RANGE(local_id, -1, m_storage_size);
222 m_var_index_data[local_id].reset();
223 m_first_sub_constituent_item_id_data[local_id] = {};
224 m_nb_sub_constituent_item_data[local_id] = 0;
225 m_component_id_data[local_id] = -1;
226 m_global_item_local_id_data[local_id] = NULL_ITEM_LOCAL_ID;
227 m_super_component_item_local_id_data[local_id] = {};
235 ItemSharedInfo* m_item_shared_info = ItemSharedInfo::nullInstance();
236 Int16 m_level = (-1);
237 ConstArrayView<IMeshComponent*> m_components;
238 ComponentItemSharedInfo* m_super_component_item_shared_info = null_shared_info_pointer;
239 ComponentItemSharedInfo* m_sub_component_item_shared_info = null_shared_info_pointer;