MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / update_entry

Function update_entry

modules/engine/runtime/src/ecs/scheduler.cpp:259–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257};
258using DependencySet = skr::FlatHashSet<skr::task::event_t, hash_shared_ptr>;
259void update_entry(job_dependency_entry_t& entry, skr::task::event_t job, bool readonly, bool atomic, DependencySet& dependencies)
260{
261 SKR_ASSERT(job);
262 if (readonly)
263 {
264 for (auto& dp : entry.owned)
265 if(auto ptr = dp.lock())
266 dependencies.insert(ptr);
267 entry.shared.push_back(job);
268 }
269 else
270 {
271 for (auto& dp : entry.shared)
272 if(auto ptr = dp.lock())
273 dependencies.insert(ptr);
274 if (atomic)
275 {
276 entry.owned.push_back(job);
277 }
278 else
279 {
280 for (auto& dp : entry.owned)
281 if(auto ptr = dp.lock())
282 dependencies.insert(ptr);
283 entry.shared.clear();
284 entry.owned.clear();
285 entry.owned.push_back(job);
286 }
287 }
288}
289} // namespace sugoi
290
291skr::task::event_t sugoi::scheduler_t::schedule_ecs_job(sugoi_query_t* query, EIndex batchSize, sugoi_system_callback_t callback, void* u,

Callers 2

update_dependenciesMethod · 0.85
sync_resourcesMethod · 0.85

Calls 4

lockMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected