opencl::opencl_metainfo* singleton_manager::get_opencl_metainfo() { # ifdef CPPA_OPENCL return lazy_get(s_opencl_metainfo); # else CPPA_LOGF_ERROR("libcppa was compiled without OpenCL support"); throw std::logic_error("libcppa was compiled without OpenCL support"); # endif }
opencl::command_dispatcher* singleton_manager::get_command_dispatcher() { # ifdef CPPA_OPENCL return lazy_get(s_command_dispatcher); # else CPPA_LOGF_ERROR("libcppa was compiled without OpenCL support"); throw std::logic_error("libcppa was compiled without OpenCL support"); # endif }
empty_tuple* singleton_manager::get_empty_tuple() { return lazy_get(s_empty_tuple); }
io::middleman* singleton_manager::get_middleman() { return lazy_get(s_middleman); }
logging* singleton_manager::get_logger() { return lazy_get(s_logger); }
scheduler* singleton_manager::get_scheduler() { return lazy_get(s_scheduler); }
group_manager* singleton_manager::get_group_manager() { return lazy_get(s_group_manager); }
uniform_type_info_map* singleton_manager::get_uniform_type_info_map() { return lazy_get(s_uniform_type_info_map); }
actor_registry* singleton_manager::get_actor_registry() { return lazy_get(s_actor_registry); }
scheduler::coordinator* singleton_manager::get_scheduling_coordinator() { return lazy_get(s_scheduling_coordinator); }
static abstract_singleton* get_plugin_singleton(size_t id, Factory f) { return lazy_get(get_plugin_singleton(id), f); }
static T* lazy_get(std::atomic<T*>& ptr) { return lazy_get(ptr, [] { return T::create_singleton(); }); }