12#ifndef ARCANE_MATERIALS_INTERNAL_COMPONENTITEMINTERNALDATA_H
13#define ARCANE_MATERIALS_INTERNAL_COMPONENTITEMINTERNALDATA_H
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/Array.h"
19#include "arcane/utils/NumArray.h"
22#include "arcane/core/materials/ComponentItemInternal.h"
46 friend ComponentItemInternalRange;
50 Iterator(
Int32 current_value,
Int32 last_value)
51 : m_current_value(current_value)
52 , m_last_value(last_value)
58 void operator++() { ++m_current_value; }
59 bool operator==(
const Sentinel&)
const
61 return m_current_value == m_last_value;
63 bool operator!=(
const Sentinel&)
const
65 return m_current_value != m_last_value;
70 Int32 m_current_value = 0;
71 Int32 m_last_value = 0;
78 ARCANE_CHECK_AT(index, m_nb_value);
84 void setRange(
Int32 first_index,
Int32 nb_value)
86 m_first_index = first_index;
87 m_nb_value = nb_value;
91 return Iterator(m_first_index, m_first_index + m_nb_value);
97 Int32 size()
const {
return m_nb_value; }
98 ConstituentItemIndex firstValue()
const {
return ConstituentItemIndex(m_first_index); }
102 Int32 m_first_index = -1;
103 Int32 m_nb_value = 0;
116class ComponentItemInternalData
130 void resize(
Int32 new_size, ComponentItemSharedInfo* shared_info,
RunQueue& queue);
131 Int32 size()
const {
return m_size; }
165 ComponentItemSharedInfo* allEnvSharedInfo() {
return sharedInfo(LEVEL_ALLENVIRONMENT); }
166 ComponentItemSharedInfo* envSharedInfo() {
return sharedInfo(LEVEL_ENVIRONMENT); }
167 ComponentItemSharedInfo* matSharedInfo() {
return sharedInfo(LEVEL_MATERIAL); }
171 MeshMaterialMng* m_material_mng =
nullptr;
185 void _initSharedInfos();
Execution queue for an accelerator.
Container for ComponentItemSharedInfo information.
void endCreate()
Notification of the end of environment/material creation.
void resizeComponentItemInternals(Int32 max_local_id, Int32 total_env_cell)
Resizes the structures allocating 'ComponentItemInternal'.
void _resetItemsInternal()
Resets ComponentItemInternal associated with EnvCell and AllEnvCell.
ComponentItemSharedInfo * sharedInfo(Int16 level)
Shared instance associated with the level.
UniqueArray< ComponentItemSharedInfo > m_shared_infos
List of shared information.
Interval of constituent identifiers in the ComponentItemInternal list.
Index of a constituent entity in the list of constituent entities.
Implementation of a material manager.
Options to configure allocations.
Unicode character string.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
1D data vector with value semantics (STL style).
Always enables tracing in Arcane parts concerning materials.
std::int16_t Int16
Signed integer type of 16 bits.
std::int32_t Int32
Signed integer type of 32 bits.