MayaFlux 0.4.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 276 of file InputManager.cpp.

277{
278#ifdef MAYAFLUX_PLATFORM_MACOS
279 // Brief hazard pointer acquisition for count
280 size_t slot = m_hazard_counter.fetch_add(1) % MAX_READERS;
282 do {
283 current = m_registrations.load();
284 m_hazard_ptrs[slot].store(current);
285 } while (current != m_registrations.load());
286
287 size_t count = current->size();
288 m_hazard_ptrs[slot].store(nullptr);
289 return count;
290#else
291 return m_registrations.load()->size();
292#endif
293}
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.