191{
192
193 std::vector<uint32_t> queue;
194 for (uint32_t i = 0; i < static_cast<uint32_t>(
m_slots.size()); ++i) {
195 if (!
m_slots[i].parent_index.has_value())
196 queue.push_back(i);
197 }
198
201
202 while (!queue.empty()) {
203 uint32_t idx = queue.front();
204 queue.erase(queue.begin());
206
207 for (uint32_t child :
m_slots[idx].child_indices)
208 queue.push_back(child);
209 }
210
213 "MeshNetwork: slot DAG contains a cycle — sort is incomplete");
214 }
215
217
219 "MeshNetwork: rebuilt slot sort order ({} slots)",
m_sorted_indices.size());
220}
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
std::vector< MeshSlot > m_slots
std::vector< uint32_t > m_sorted_indices
Processing order: indices into m_slots, parents before children.
bool m_sort_dirty
Set when add_slot() changes the DAG and a re-sort is needed.
@ Init
Engine/subsystem initialization.
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.