39 [[nodiscard]]
bool isPrepared()
const override {
return m_state == Prepared; }
42 void setTraceMng(Alien::ITraceMng* traceMng)
override;
45 void prepare()
override;
49 void stats(Arccore::Integer& globalSize, Arccore::Integer& minLocalIndex,
50 Arccore::Integer& localSize)
const override;
54 [[nodiscard]] Arccore::Integer globalSize()
const override;
58 [[nodiscard]] Arccore::Integer minLocalIndex()
const override;
62 [[nodiscard]] Arccore::Integer localSize()
const override;
65 [[nodiscard]] EntryEnumerator enumerateEntry()
const override;
69 Arccore::IntegerConstArrayView localIds,
80 Arccore::IntegerConstArrayView localIds,
82 Arccore::Integer n)
override;
91 [[nodiscard]] Arccore::UniqueArray<Arccore::Integer>
getIndexes(
92 const ScalarIndexSet& entry)
const override;
96 [[nodiscard]] Arccore::UniqueArray2<Arccore::Integer>
getIndexes(
97 const VectorIndexSet& entries)
const override;
101 [[nodiscard]] Arccore::MessagePassing::IMessagePassingMng*
parallelMng()
const override
103 return m_parallel_mng;
109 [[nodiscard]] Arccore::Integer
nullIndex()
const override
111 ALIEN_ASSERT((m_state == Prepared), (
"nullIndex is valid only in Prepared state"));
112 if (m_max_null_index_opt)
113 return m_global_entry_offset + m_local_entry_count;
122 Arccore::MessagePassing::IMessagePassingMng* m_parallel_mng =
nullptr;
123 Arccore::Integer m_local_owner = 0;
132 Arccore::ITraceMng* m_trace =
nullptr;
134 Arccore::Integer m_local_entry_count = 0;
135 Arccore::Integer m_global_entry_count = 0;
136 Arccore::Integer m_global_entry_offset = 0;
137 Arccore::Integer m_local_removed_entry_count = 0;
138 Arccore::Integer m_global_removed_entry_count = 0;
140 bool m_max_null_index_opt =
false;
143 class MyEntryEnumeratorImpl;
145 struct InternalEntryIndex
147 InternalEntryIndex(MyEntryImpl* e, Arccore::Integer lid, Arccore::Integer kind,
148 Arccore::Int64 uid, Arccore::Integer index,
149 [[maybe_unused]] Arccore::Integer creation_index, Arccore::Integer owner)
158 MyEntryImpl* m_entry;
159 Arccore::Int64 m_uid;
160 Arccore::Integer m_localid, m_kind, m_index;
162 Arccore::Integer m_owner;
163 bool operator==(
const InternalEntryIndex& m)
const
165 return m.m_entry == m_entry && m.m_localid == m_localid;
169 typedef std::vector<InternalEntryIndex> EntryIndexMap;
171 struct EntryIndexComparator
173 inline bool operator()(
174 const InternalEntryIndex& a,
const InternalEntryIndex& b)
const;
178 typedef std::map<Arccore::String, MyEntryImpl*> EntrySet;
179 EntrySet m_entry_set;
182 Arccore::Integer m_creation_index = 0;
186 Arccore::Integer m_abstract_family_base_kind = 0;
189 std::map<Arccore::Integer, std::shared_ptr<IAbstractFamily>>
191 std::map<const IAbstractFamily*, Arccore::Integer>
192 m_abstract_family_to_kind_map;
197 [[nodiscard]] Entry getEntry(
const Arccore::String& name)
const override;
201 struct EntrySendRequest;
202 struct EntryRecvRequest;
206 Entry buildEntry(
const Arccore::String& name,
const IAbstractFamily* itemFamily,
207 Arccore::Integer kind);
208 void defineIndex(
const Entry& entry, Arccore::IntegerConstArrayView localIds);
209 void parallel_prepare(EntryIndexMap& entry_index);
210 void sequential_prepare(EntryIndexMap& entry_index);
211 [[nodiscard]]
inline bool isOwn(
const IAbstractFamily::Item& item)
const
213 return item.owner() == m_local_owner;
215 [[nodiscard]]
inline bool isOwn(
const InternalEntryIndex& i)
const
217 return i.m_owner == m_local_owner;
219 void reserveEntries(
const EntryIndexMap& entry_index);
220 Arccore::Integer addNewAbstractFamily(
const IAbstractFamily* family);