MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_registered_node_count()

size_t MayaFlux::Core::InputManager::get_registered_node_count ( ) const

Get count of registered nodes.

Definition at line 285 of file InputManager.cpp.

286{
287#ifdef MAYAFLUX_PLATFORM_MACOS
288 // Brief hazard pointer acquisition for count
289 size_t slot = m_hazard_counter.fetch_add(1) % MAX_READERS;
291 do {
292 current = m_registrations.load();
293 m_hazard_ptrs[slot].store(current);
294 } while (current != m_registrations.load());
295
296 size_t count = current->size();
297 m_hazard_ptrs[slot].store(nullptr);
298 return count;
299#else
300 return m_registrations.load()->size();
301#endif
302}
glm::vec2 current
size_t count
std::vector< NodeRegistration > RegistrationList
std::atomic< std::shared_ptr< const RegistrationList > > m_registrations

References count, current, and m_registrations.