├── CMakeLists.txt ├── README.md ├── benchmark.cpp ├── benchmark.hpp ├── benchmark ├── cpp │ ├── benchmark_aco.cpp │ ├── benchmark_asg.cpp │ ├── benchmark_bs2.cpp │ ├── benchmark_bs2_st.cpp │ ├── benchmark_cls.cpp │ ├── benchmark_cps.cpp │ ├── benchmark_cps_st.cpp │ ├── benchmark_css.cpp │ ├── benchmark_dob.cpp │ ├── benchmark_evl.cpp │ ├── benchmark_ics.cpp │ ├── benchmark_jls.cpp │ ├── benchmark_jos.cpp │ ├── benchmark_ksc.cpp │ ├── benchmark_ktn.cpp │ ├── benchmark_lcp.cpp │ ├── benchmark_lfs.cpp │ ├── benchmark_lss.cpp │ ├── benchmark_mws.cpp │ ├── benchmark_nes.cpp │ ├── benchmark_nls.cpp │ ├── benchmark_nls_st.cpp │ ├── benchmark_nod.cpp │ ├── benchmark_nod_st.cpp │ ├── benchmark_nss_st.cpp │ ├── benchmark_nss_sts.cpp │ ├── benchmark_nss_ts.cpp │ ├── benchmark_nss_tss.cpp │ ├── benchmark_psg.cpp │ ├── benchmark_pss.cpp │ ├── benchmark_pss_st.cpp │ ├── benchmark_sss.cpp │ ├── benchmark_tsr.cpp │ ├── benchmark_tsr_st.cpp │ ├── benchmark_vdk.cpp │ ├── benchmark_vdk_st.cpp │ ├── benchmark_wnk.cpp │ └── benchmark_yas.cpp ├── hpp │ ├── benchmark_aco.hpp │ ├── benchmark_asg.hpp │ ├── benchmark_bs2.hpp │ ├── benchmark_bs2_st.hpp │ ├── benchmark_cls.hpp │ ├── benchmark_cps.hpp │ ├── benchmark_cps_st.hpp │ ├── benchmark_css.hpp │ ├── benchmark_dob.hpp │ ├── benchmark_evl.hpp │ ├── benchmark_ics.hpp │ ├── benchmark_jls.hpp │ ├── benchmark_jos.hpp │ ├── benchmark_ksc.hpp │ ├── benchmark_ktn.hpp │ ├── benchmark_lcp.hpp │ ├── benchmark_lfs.hpp │ ├── benchmark_lss.hpp │ ├── benchmark_mws.hpp │ ├── benchmark_nes.hpp │ ├── benchmark_nls.hpp │ ├── benchmark_nls_st.hpp │ ├── benchmark_nod.hpp │ ├── benchmark_nod_st.hpp │ ├── benchmark_nss_st.hpp │ ├── benchmark_nss_sts.hpp │ ├── benchmark_nss_ts.hpp │ ├── benchmark_nss_tss.hpp │ ├── benchmark_psg.hpp │ ├── benchmark_pss.hpp │ ├── benchmark_pss_st.hpp │ ├── benchmark_sss.hpp │ ├── benchmark_tsr.hpp │ ├── benchmark_tsr_st.hpp │ ├── benchmark_vdk.hpp │ ├── benchmark_vdk_st.hpp │ ├── benchmark_wnk.hpp │ └── benchmark_yas.hpp └── lib │ ├── Ansoulom │ └── cpp-observe │ │ └── cpp_observe.hpp │ ├── CppFakeIt │ ├── LICENSE │ ├── README.md │ ├── docs │ │ ├── bind_weak.md │ │ ├── migration-from-boost-signals2.md │ │ ├── simple-examples.md │ │ └── why-fastsignals.md │ └── libfastsignals │ │ ├── CMakeLists.txt │ │ ├── include │ │ ├── bind_weak.h │ │ ├── combiners.h │ │ ├── function.h │ │ ├── function_detail.h │ │ ├── lfs_connection.h │ │ ├── msvc_autolink.h │ │ ├── signal.h │ │ ├── signal_impl.h │ │ ├── spin_mutex.h │ │ └── type_traits.h │ │ ├── libfastsignals.vcxproj │ │ ├── libfastsignals.vcxproj.filters │ │ └── src │ │ ├── function_detail.cpp │ │ ├── lfs_connection.cpp │ │ └── signal_impl.cpp │ ├── Kosta-Github │ └── signals-cpp │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── signals-cpp │ │ ├── CMakeLists.txt │ │ ├── config.hpp │ │ ├── connection.hpp │ │ ├── connections.hpp │ │ ├── signal.hpp │ │ └── signals.hpp │ ├── KtnFramework │ └── KtnSignalSlot │ │ └── include │ │ └── ktnSignalSlot │ │ └── ktnSignalSlot.hpp │ ├── Montellese │ └── cpp-signal │ │ └── cpp-signal.h │ ├── NoAvailableAlias │ └── nano-signal-slot │ │ ├── LICENSE │ │ ├── README.md │ │ ├── nano_function.hpp │ │ ├── nano_mutex.hpp │ │ ├── nano_observer.hpp │ │ └── nano_signal_slot.hpp │ ├── Nuclex │ ├── Config.h │ └── Events │ │ ├── Delegate.h │ │ ├── EmptyDelegateCallError.h │ │ └── Event.h │ ├── amc522 │ └── signal11 │ │ ├── README.md │ │ └── Signal.h │ ├── copperspice │ └── cs_signal │ │ ├── LICENSE │ │ ├── README.md │ │ └── src │ │ ├── cs_internal.h │ │ ├── cs_macro.h │ │ ├── cs_signal.cpp │ │ ├── cs_signal.h │ │ ├── cs_slot.cpp │ │ ├── cs_slot.h │ │ ├── rcu_guarded.hpp │ │ └── rcu_list.hpp │ ├── cpp11nullptr │ └── lsignal │ │ ├── LICENCE │ │ ├── README.md │ │ └── lsignal.h │ ├── dacap │ ├── LICENSE.txt │ ├── README.md │ └── obs │ │ ├── dacap_connection.cpp │ │ ├── dacap_connection.h │ │ ├── dacap_signal.h │ │ ├── observable.h │ │ ├── observers.h │ │ ├── safe_list.h │ │ └── slot.h │ ├── eviltwin │ └── observer.hpp │ ├── fr00b0 │ └── nod │ │ ├── README.md │ │ ├── include │ │ └── nod │ │ │ └── nod.hpp │ │ └── tools │ │ └── linux_x64 │ │ └── premake5 │ ├── i42output │ ├── LICENSE │ ├── README.md │ ├── include │ │ └── neolib │ │ │ ├── allocator.hpp │ │ │ ├── async_task.hpp │ │ │ ├── async_thread.hpp │ │ │ ├── detail_memory.hpp │ │ │ ├── event.hpp │ │ │ ├── i_lifetime.hpp │ │ │ ├── i_task.hpp │ │ │ ├── i_thread.hpp │ │ │ ├── lifetime.hpp │ │ │ ├── lockable.hpp │ │ │ ├── locking_policy.hpp │ │ │ ├── memory.hpp │ │ │ ├── message_queue.hpp │ │ │ ├── mutex.hpp │ │ │ ├── neolib.hpp │ │ │ ├── noncopyable.hpp │ │ │ ├── raii.hpp │ │ │ ├── signal.hpp │ │ │ ├── signal_interface.hpp │ │ │ ├── singleton.hpp │ │ │ ├── slot.hpp │ │ │ ├── slot_interface.hpp │ │ │ ├── task.hpp │ │ │ ├── thread.hpp │ │ │ ├── timer.hpp │ │ │ ├── variant.hpp │ │ │ ├── waitable.hpp │ │ │ ├── waitable_event.hpp │ │ │ └── win32_message_queue.hpp │ └── src │ │ ├── async_task.cpp │ │ ├── async_thread.cpp │ │ ├── event.cpp │ │ ├── thread.cpp │ │ ├── timer.cpp │ │ ├── waitable_event.cpp │ │ └── win32_message_queue.cpp │ ├── iscool │ ├── CMakeLists.txt │ ├── include │ │ └── iscool │ │ │ ├── context.h │ │ │ ├── copy.h │ │ │ ├── detail │ │ │ ├── copy.tpp │ │ │ └── optional_or_else.tpp │ │ │ ├── digits.h │ │ │ ├── enum_equals.h │ │ │ ├── enum_equals.tpp │ │ │ ├── none.h │ │ │ ├── none_t.h │ │ │ ├── optional.h │ │ │ ├── optional.impl.tpp │ │ │ ├── optional_or_else.h │ │ │ ├── profile │ │ │ ├── detail │ │ │ │ └── output_function.h │ │ │ ├── output_delegate.h │ │ │ ├── profile_data.h │ │ │ ├── profiler.h │ │ │ ├── scoped_profiler.h │ │ │ └── setup.h │ │ │ ├── signals │ │ │ ├── bounce.h │ │ │ ├── connection.h │ │ │ ├── declare_signal.h │ │ │ ├── detail │ │ │ │ ├── any_tuple_has_type_at_index.h │ │ │ │ ├── any_tuple_has_type_at_index.tests.h │ │ │ │ ├── any_tuple_is_masked.h │ │ │ │ ├── any_tuple_is_masked.tests.h │ │ │ │ ├── find_signal_type_from_tuple_element.h │ │ │ │ ├── get.tpp │ │ │ │ ├── get_from_tuple_element.tpp │ │ │ │ ├── no_tuple_is_masked.h │ │ │ │ ├── no_tuple_is_masked.tests.h │ │ │ │ ├── relay.tpp │ │ │ │ ├── resolve_identifier.h │ │ │ │ ├── signal.h │ │ │ │ ├── signal.impl.tpp │ │ │ │ ├── signal_collection_from_tuple.h │ │ │ │ ├── slot.h │ │ │ │ ├── statistics_function.h │ │ │ │ ├── tuple_is_masked.h │ │ │ │ └── tuple_is_masked.tests.h │ │ │ ├── find_signal_type_from_tuple_element.h │ │ │ ├── get.h │ │ │ ├── get_from_tuple_element.h │ │ │ ├── identifier.h │ │ │ ├── implement_signal.h │ │ │ ├── one_shot_signal.h │ │ │ ├── one_shot_signal.impl.tpp │ │ │ ├── one_shot_signal_pool.h │ │ │ ├── one_shot_signal_pool.impl.tpp │ │ │ ├── relay.h │ │ │ ├── scoped_connection.h │ │ │ ├── shared_connection.h │ │ │ ├── shared_connection_set.h │ │ │ ├── signal.h │ │ │ ├── signal.impl.tpp │ │ │ ├── signal_collection.h │ │ │ ├── signal_collection_from_tuple.h │ │ │ ├── signal_from_tuple_arguments.h │ │ │ ├── statistics_data.h │ │ │ ├── statistics_sink.h │ │ │ └── void_signal_function.h │ │ │ └── time │ │ │ ├── backward_duration_to_unit_change.h │ │ │ ├── days.h │ │ │ ├── detail │ │ │ ├── backward_duration_to_unit_change.tpp │ │ │ ├── now.tpp │ │ │ └── round.tpp │ │ │ ├── now.h │ │ │ └── round.h │ └── src │ │ └── iscool │ │ ├── digits.cpp │ │ ├── none.cpp │ │ ├── optional.cpp │ │ ├── profile │ │ ├── detail │ │ │ └── output_function.cpp │ │ ├── profile_data.cpp │ │ ├── profiler.cpp │ │ ├── scoped_profiler.cpp │ │ └── setup.cpp │ │ └── signals │ │ ├── detail │ │ ├── slot.cpp │ │ └── statistics_function.cpp │ │ ├── ics_connection.cpp │ │ ├── ics_signal.cpp │ │ ├── scoped_connection.cpp │ │ ├── shared_connection.cpp │ │ ├── shared_connection_set.cpp │ │ ├── statistics_data.cpp │ │ └── statistics_sink.cpp │ ├── jeffomatic │ └── jl_signal │ │ ├── README.md │ │ └── src │ │ ├── DoublyLinkedList.h │ │ ├── DoublyLinkedListTest.cpp │ │ ├── FastDelegate.h │ │ ├── ObjectPool.cpp │ │ ├── ObjectPool.h │ │ ├── ObjectPoolScopedAllocator.h │ │ ├── ObjectPoolTest.cpp │ │ ├── ScopedAllocator.h │ │ ├── Signal.h │ │ ├── SignalBase.cpp │ │ ├── SignalBase.h │ │ ├── SignalDefinitions.h │ │ ├── SignalTest.cpp │ │ ├── StaticSignalConnectionAllocators.h │ │ └── Utils.h │ ├── joanrieu │ └── signal11 │ │ ├── LICENSE.md │ │ ├── README.md │ │ └── signal11.h │ ├── larspensjo │ └── SimpleSignal │ │ ├── README.md │ │ └── SimpleSignal.h │ ├── libsigcplusplus │ ├── libsigcplusplus │ │ ├── libsigcplusplus.vcxproj │ │ ├── libsigcplusplus.vcxproj.filters │ │ └── libsigcplusplus.vcxproj.user │ ├── license.md │ ├── sigc++ │ │ ├── adaptors │ │ │ ├── adaptor_base.h │ │ │ ├── adaptor_trait.h │ │ │ ├── adaptors.h │ │ │ ├── adapts.h │ │ │ ├── bind.h │ │ │ ├── bind_return.h │ │ │ ├── bound_argument.h │ │ │ ├── compose.h │ │ │ ├── exception_catch.h │ │ │ ├── hide.h │ │ │ ├── retype.h │ │ │ ├── retype_return.h │ │ │ ├── track_obj.h │ │ │ └── tuple_visitor_visit_each.h │ │ ├── bind.h │ │ ├── bind_return.h │ │ ├── connection.cc │ │ ├── connection.h │ │ ├── functors │ │ │ ├── functor_trait.h │ │ │ ├── functors.h │ │ │ ├── mem_fun.h │ │ │ ├── ptr_fun.h │ │ │ ├── slot.h │ │ │ ├── slot_base.cc │ │ │ └── slot_base.h │ │ ├── limit_reference.h │ │ ├── member_method_trait.h │ │ ├── reference_wrapper.h │ │ ├── retype_return.h │ │ ├── sigc++.h │ │ ├── signal.h │ │ ├── signal_base.cc │ │ ├── signal_base.h │ │ ├── slot.h │ │ ├── trackable.cc │ │ ├── trackable.h │ │ ├── tuple-utils │ │ │ ├── tuple_cdr.h │ │ │ ├── tuple_end.h │ │ │ ├── tuple_for_each.h │ │ │ ├── tuple_start.h │ │ │ └── tuple_transform_each.h │ │ ├── type_traits.h │ │ ├── visit_each.h │ │ └── weak_raw_ptr.h │ └── sigc++config.h │ ├── miguelmartin │ └── Wink-Signals │ │ ├── LICENSE │ │ ├── README.md │ │ ├── examples │ │ ├── Benchmark.cpp │ │ └── Makefile │ │ └── wink │ │ ├── detail │ │ ├── FastDelegate.h │ │ └── FastDelegateBind.h │ │ ├── event_queue.hpp │ │ ├── signal.hpp │ │ └── slot.hpp │ ├── mwthinker │ └── Signal │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── src │ │ └── mw │ │ ├── signal.h │ │ └── signals │ │ ├── connection.cpp │ │ └── connection.h │ ├── palacaze │ └── sigslot │ │ ├── LICENSE │ │ ├── include │ │ └── sigslot │ │ │ └── signal.hpp │ │ └── readme.md │ ├── pbhogan │ └── Signals │ │ ├── Delegate.h │ │ ├── README.markdown │ │ └── Signal.h │ ├── supergrover │ └── sigslot │ │ ├── LICENSE │ │ ├── README.md │ │ └── src │ │ ├── signal.cpp │ │ └── signal.h │ ├── tripleslash │ └── rocket │ │ ├── README.md │ │ └── rocket.hpp │ ├── vdksoft │ └── signals │ │ ├── LICENSE-2.0.txt │ │ ├── README.md │ │ ├── doc │ │ └── signals.pdf │ │ ├── docs │ │ └── signals.md │ │ └── src │ │ ├── signals.cpp │ │ └── signals.h │ └── yassi │ └── yassi.h ├── benchmark_utility.hpp ├── results ├── benchmarks_gcc │ └── README.md ├── benchmarks_msvc │ └── README.md └── features.md ├── tests.cpp ├── tests ├── cpp │ ├── exited_with_code_stored.cpp │ ├── signal_traits_jls.cpp │ ├── test_non_template_base.cpp │ └── test_results.cpp └── hpp │ ├── exited_with_code_stored.hpp │ ├── fenced_typed_test.hpp │ ├── signal_traits_aco.hpp │ ├── signal_traits_asg.hpp │ ├── signal_traits_bs2.hpp │ ├── signal_traits_bs2_st.hpp │ ├── signal_traits_cls.hpp │ ├── signal_traits_cps.hpp │ ├── signal_traits_cps_st.hpp │ ├── signal_traits_css.hpp │ ├── signal_traits_dob.hpp │ ├── signal_traits_evl.hpp │ ├── signal_traits_ics.hpp │ ├── signal_traits_jls.hpp │ ├── signal_traits_jos.hpp │ ├── signal_traits_ksc.hpp │ ├── signal_traits_ktn.hpp │ ├── signal_traits_lfs.hpp │ ├── signal_traits_lss.hpp │ ├── signal_traits_mws.hpp │ ├── signal_traits_nes.hpp │ ├── signal_traits_nls.hpp │ ├── signal_traits_nls_st.hpp │ ├── signal_traits_nod.hpp │ ├── signal_traits_nod_st.hpp │ ├── signal_traits_nss_st.hpp │ ├── signal_traits_nss_sts.hpp │ ├── signal_traits_nss_ts.hpp │ ├── signal_traits_nss_tss.hpp │ ├── signal_traits_psg.hpp │ ├── signal_traits_pss.hpp │ ├── signal_traits_pss_st.hpp │ ├── signal_traits_sss.hpp │ ├── signal_traits_vdk.hpp │ ├── signal_traits_wnk.hpp │ ├── signal_traits_yas.hpp │ ├── test_non_template_base.hpp │ ├── test_outcome.hpp │ └── test_results.hpp └── vs ├── signal-slot-benchmarks.sln ├── signal-slot-benchmarks.vcxproj └── signal-slot-benchmarks.vcxproj.filters /benchmark/cpp/benchmark_aco.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_aco.hpp" 2 | 3 | NOINLINE(void Aco::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Aco::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Aco::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Aco::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Aco::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Aco::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Aco::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Aco::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Aco::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Aco::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_asg.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_asg.hpp" 2 | 3 | NOINLINE(void Asg::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Asg::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Asg::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Asg::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Asg::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Asg::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Asg::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Asg::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Asg::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Asg::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_bs2.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_bs2.hpp" 2 | 3 | NOINLINE(void Bs2::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Bs2::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Bs2::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Bs2::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Bs2::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Bs2::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Bs2::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Bs2::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Bs2::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Bs2::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_bs2_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_bs2_st.hpp" 2 | 3 | NOINLINE(void Bs2_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Bs2_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Bs2_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Bs2_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Bs2_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Bs2_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Bs2_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Bs2_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Bs2_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Bs2_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_cls.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_cls.hpp" 2 | 3 | NOINLINE(void Cls::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Cls::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Cls::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Cls::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Cls::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Cls::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Cls::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Cls::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Cls::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Cls::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_cps.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_cps.hpp" 2 | 3 | NOINLINE(void Cps::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Cps::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Cps::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Cps::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Cps::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Cps::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Cps::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Cps::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Cps::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Cps::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_cps_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_cps_st.hpp" 2 | 3 | NOINLINE(void Cps_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Cps_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Cps_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Cps_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Cps_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Cps_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Cps_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Cps_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Cps_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Cps_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_dob.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_dob.hpp" 2 | 3 | NOINLINE(void Dob::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Dob::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Dob::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Dob::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Dob::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Dob::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Dob::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Dob::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Dob::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Dob::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_evl.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_evl.hpp" 2 | 3 | NOINLINE(void Evl::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Evl::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Evl::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Evl::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Evl::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Evl::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Evl::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Evl::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Evl::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Evl::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_ics.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_ics.hpp" 2 | 3 | #include 4 | 5 | NOINLINE(void Ics::initialize()) 6 | { 7 | // NOOP 8 | } 9 | NOINLINE(void Ics::validate_assert(std::size_t N)) 10 | { 11 | return Benchmark::validation_assert(N); 12 | } 13 | NOINLINE(double Ics::construction(std::size_t N, std::size_t limit)) 14 | { 15 | return Benchmark::construction(N, limit); 16 | } 17 | NOINLINE(double Ics::destruction(std::size_t N, std::size_t limit)) 18 | { 19 | return Benchmark::destruction(N, limit); 20 | } 21 | NOINLINE(double Ics::connection(std::size_t N, std::size_t limit)) 22 | { 23 | return Benchmark::connection(N, limit); 24 | } 25 | NOINLINE(double Ics::disconnect(std::size_t N, std::size_t limit)) 26 | { 27 | return Benchmark::disconnect(N, limit); 28 | } 29 | NOINLINE(double Ics::reconnect(std::size_t N, std::size_t limit)) 30 | { 31 | return Benchmark::reconnect(N, limit); 32 | } 33 | NOINLINE(double Ics::emission(std::size_t N, std::size_t limit)) 34 | { 35 | return Benchmark::emission(N, limit); 36 | } 37 | NOINLINE(double Ics::combined(std::size_t N, std::size_t limit)) 38 | { 39 | return Benchmark::combined(N, limit); 40 | } 41 | NOINLINE(double Ics::threaded(std::size_t N, std::size_t limit)) 42 | { 43 | // NOT IMPLEMENTED FOR THIS LIB 44 | return 0.0; 45 | } 46 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_jls.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_jls.hpp" 2 | 3 | NOINLINE(void Jls::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Jls::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Jls::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Jls::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Jls::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Jls::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Jls::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Jls::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Jls::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Jls::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_jos.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_jos.hpp" 2 | 3 | NOINLINE(void Jos::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Jos::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Jos::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Jos::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Jos::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Jos::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Jos::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Jos::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Jos::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Jos::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_ksc.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_ksc.hpp" 2 | 3 | NOINLINE(void Ksc::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Ksc::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Ksc::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Ksc::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Ksc::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Ksc::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Ksc::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Ksc::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Ksc::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Ksc::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_ktn.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_ktn.hpp" 2 | 3 | NOINLINE(void Ktnss::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Ktnss::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Ktnss::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Ktnss::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Ktnss::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Ktnss::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Ktnss::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Ktnss::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Ktnss::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Ktnss::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_lcp.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_lcp.hpp" 2 | 3 | NOINLINE(void Lcp::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Lcp::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Lcp::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Lcp::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Lcp::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Lcp::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Lcp::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Lcp::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Lcp::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Lcp::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_lfs.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_lfs.hpp" 2 | 3 | NOINLINE(void Lfs::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Lfs::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Lfs::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Lfs::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Lfs::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Lfs::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Lfs::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Lfs::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Lfs::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Lfs::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_lss.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_lss.hpp" 2 | 3 | NOINLINE(void Lss::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Lss::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Lss::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Lss::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Lss::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Lss::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Lss::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Lss::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Lss::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Lss::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_mws.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_mws.hpp" 2 | 3 | NOINLINE(void Mws::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Mws::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Mws::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Mws::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Mws::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Mws::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Mws::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Mws::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Mws::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Mws::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nes.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nes.hpp" 2 | 3 | NOINLINE(void Nes::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nes::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nes::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nes::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nes::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nes::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nes::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nes::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nes::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nes::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nls.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nls.hpp" 2 | 3 | NOINLINE(void Nls::initialize()) 4 | { 5 | neolib::event_system::set_multi_threaded(); 6 | } 7 | NOINLINE(void Nls::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nls::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nls::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nls::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nls::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nls::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nls::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nls::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nls::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nls_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nls_st.hpp" 2 | 3 | NOINLINE(void Nls_st::initialize()) 4 | { 5 | neolib::event_system::set_single_threaded(); 6 | } 7 | NOINLINE(void Nls_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nls_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nls_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nls_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nls_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nls_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nls_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nls_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nls_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nod.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nod.hpp" 2 | 3 | NOINLINE(void Nod::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nod::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nod::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nod::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nod::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nod::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nod::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nod::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nod::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nod::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nod_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nod_st.hpp" 2 | 3 | NOINLINE(void Nod_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nod_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nod_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nod_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nod_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nod_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nod_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nod_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nod_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nod_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return 0.0; 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nss_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nss_st.hpp" 2 | 3 | NOINLINE(void Nss_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nss_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nss_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nss_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nss_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nss_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nss_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nss_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nss_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nss_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nss_sts.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nss_sts.hpp" 2 | 3 | NOINLINE(void Nss_sts::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nss_sts::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nss_sts::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nss_sts::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nss_sts::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nss_sts::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nss_sts::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nss_sts::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nss_sts::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nss_sts::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nss_ts.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nss_ts.hpp" 2 | 3 | NOINLINE(void Nss_ts::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nss_ts::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nss_ts::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nss_ts::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nss_ts::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nss_ts::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nss_ts::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nss_ts::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nss_ts::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nss_ts::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_nss_tss.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_nss_tss.hpp" 2 | 3 | NOINLINE(void Nss_tss::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Nss_tss::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Nss_tss::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Nss_tss::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Nss_tss::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Nss_tss::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Nss_tss::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Nss_tss::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Nss_tss::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Nss_tss::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_psg.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_psg.hpp" 2 | 3 | NOINLINE(void Psg::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Psg::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Psg::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Psg::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Psg::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Psg::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Psg::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Psg::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Psg::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Psg::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_pss.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_pss.hpp" 2 | 3 | NOINLINE(void Pss::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Pss::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Pss::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Pss::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Pss::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Pss::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Pss::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Pss::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Pss::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Pss::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_pss_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_pss_st.hpp" 2 | 3 | NOINLINE(void Pss_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Pss_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Pss_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Pss_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Pss_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Pss_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Pss_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Pss_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Pss_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Pss_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_sss.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_sss.hpp" 2 | 3 | NOINLINE(void Sss::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Sss::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Sss::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Sss::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Sss::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Sss::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Sss::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Sss::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Sss::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Sss::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_tsr.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_tsr.hpp" 2 | 3 | NOINLINE(void Tsr::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Tsr::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Tsr::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Tsr::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Tsr::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Tsr::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Tsr::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Tsr::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Tsr::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Tsr::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_tsr_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_tsr_st.hpp" 2 | 3 | NOINLINE(void Tsr_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Tsr_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Tsr_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Tsr_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Tsr_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Tsr_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Tsr_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Tsr_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Tsr_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Tsr_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_vdk.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_vdk.hpp" 2 | 3 | NOINLINE(void Vdk::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Vdk::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Vdk::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Vdk::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Vdk::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Vdk::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Vdk::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Vdk::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Vdk::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Vdk::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | return Benchmark::threaded(N, limit); 42 | } 43 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_vdk_st.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_vdk_st.hpp" 2 | 3 | NOINLINE(void Vdk_st::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Vdk_st::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Vdk_st::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Vdk_st::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Vdk_st::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Vdk_st::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Vdk_st::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Vdk_st::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Vdk_st::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Vdk_st::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_wnk.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_wnk.hpp" 2 | 3 | NOINLINE(void Wnk::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Wnk::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Wnk::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Wnk::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Wnk::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Wnk::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Wnk::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Wnk::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Wnk::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Wnk::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/cpp/benchmark_yas.cpp: -------------------------------------------------------------------------------- 1 | #include "../hpp/benchmark_yas.hpp" 2 | 3 | NOINLINE(void Yas::initialize()) 4 | { 5 | // NOOP 6 | } 7 | NOINLINE(void Yas::validate_assert(std::size_t N)) 8 | { 9 | return Benchmark::validation_assert(N); 10 | } 11 | NOINLINE(double Yas::construction(std::size_t N, std::size_t limit)) 12 | { 13 | return Benchmark::construction(N, limit); 14 | } 15 | NOINLINE(double Yas::destruction(std::size_t N, std::size_t limit)) 16 | { 17 | return Benchmark::destruction(N, limit); 18 | } 19 | NOINLINE(double Yas::connection(std::size_t N, std::size_t limit)) 20 | { 21 | return Benchmark::connection(N, limit); 22 | } 23 | NOINLINE(double Yas::disconnect(std::size_t N, std::size_t limit)) 24 | { 25 | return Benchmark::disconnect(N, limit); 26 | } 27 | NOINLINE(double Yas::reconnect(std::size_t N, std::size_t limit)) 28 | { 29 | return Benchmark::reconnect(N, limit); 30 | } 31 | NOINLINE(double Yas::emission(std::size_t N, std::size_t limit)) 32 | { 33 | return Benchmark::emission(N, limit); 34 | } 35 | NOINLINE(double Yas::combined(std::size_t N, std::size_t limit)) 36 | { 37 | return Benchmark::combined(N, limit); 38 | } 39 | NOINLINE(double Yas::threaded(std::size_t N, std::size_t limit)) 40 | { 41 | // NOT IMPLEMENTED FOR THIS LIB 42 | return 0.0; 43 | } 44 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 iSpring Solutions Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/README.md: -------------------------------------------------------------------------------- 1 | # FastSignals 2 | 3 | Yet another C++ signals and slots library 4 | 5 | * Works as drop-in replacement for Boost.Signals2 with the same API 6 | * Has better performance and more compact binary code 7 | * Thread-safe in most operations, including concurrent connects/disconnects/emits 8 | * Implemented with compact, pure C++17 code 9 | 10 | [![Build Status](https://travis-ci.org/ispringteam/FastSignals.svg?branch=master)](https://travis-ci.org/ispringteam/FastSignals) 11 | [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) 12 | 13 | ## Documentation 14 | 15 | * [Why FastSignals?](docs/why-fastsignals.md) 16 | * [Simple Examples](docs/simple-examples.md) 17 | * [Migration from Boost.Signals2](docs/migration-from-boost-signals2.md) 18 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/docs/simple-examples.md: -------------------------------------------------------------------------------- 1 | # Simple Examples 2 | 3 | >If you are not familar with Boost.Signals2, please read [Boost.Signals2: Connections](https://theboostcpplibraries.com/boost.signals2-connections) 4 | 5 | ## Example with signal<> and connection 6 | 7 | ```cpp 8 | // Creates signal and connects 1 slot, calls 2 times, disconnects, calls again. 9 | // Outputs: 10 | // 13 11 | // 17 12 | #include "libfastsignals/signal.h" 13 | 14 | using namespace is::signals; 15 | 16 | int main() 17 | { 18 | signal valueChanged; 19 | connection conn; 20 | conn = valueChanged.connect([](int value) { 21 | cout << value << endl; 22 | }); 23 | valueChanged(13); 24 | valueChanged(17); 25 | conn.disconnect(); 26 | valueChanged(42); 27 | } 28 | ``` 29 | 30 | ## Example with scoped_connection 31 | 32 | ```cpp 33 | // Creates signal and connects 1 slot, calls 2 times, calls again after scoped_connection destroyed. 34 | // - note: scoped_connection closes connection in destructor 35 | // Outputs: 36 | // 13 37 | // 17 38 | #include "libfastsignals/signal.h" 39 | 40 | using namespace is::signals; 41 | 42 | int main() 43 | { 44 | signal valueChanged; 45 | { 46 | scoped_connection conn; 47 | conn = valueChanged.connect([](int value) { 48 | cout << value << endl; 49 | }); 50 | valueChanged(13); 51 | valueChanged(17); 52 | } 53 | valueChanged(42); 54 | } 55 | ``` 56 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/docs/why-fastsignals.md: -------------------------------------------------------------------------------- 1 | # Why FastSignals? 2 | 3 | FastSignals is a C++17 signals/slots implementation which API is compatible with Boost.Signals2. 4 | 5 | FastSignals pros: 6 | 7 | * Faster than Boost.Signals2 8 | * Has more compact binary code 9 | * Has the same API as Boost.Signals2 10 | 11 | FastSignals cons: 12 | 13 | * Supports only C++17 compatible compilers: Visual Studio 2017, modern Clang, modern GCC 14 | * Lacks a few rarely used features presented in Boost.Signals2 15 | * No access to connection from slot with `signal::connect_extended` method 16 | * No connected object tracking with `slot::track` method 17 | * Use [bind_weak](bind_weak.md) instead 18 | * No temporary signal blocking with `shared_connection_block` class 19 | * Cannot disconnect equivalent slots since no `disconnect(slot)` function overload 20 | * Any other API difference is a bug - please report it! 21 | 22 | See also [Migration from Boost.Signals2](migration-from-boost-signals2.md). 23 | 24 | ## Benchmark results 25 | 26 | Directory `tests/libfastsignals_bench` contains simple benchmark with compares two signal/slot implementations: 27 | 28 | * Boost.Signals2 29 | * libfastsignals 30 | 31 | Benchmark compairs performance when signal emitted frequently with 0, 1 and 8 active connections. In these cases libfastsignals is 3-6 times faster. 32 | 33 | ``` 34 | *** Results: 35 | measure emit_boost emit_fastsignals 36 | emit_boost/0 1.00 3.00 37 | emit_boost/1 1.00 5.76 38 | emit_boost/8 1.00 3.70 39 | *** 40 | ``` 41 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/libfastsignals/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | file(GLOB LIBFASTSIGNALS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") 3 | add_library(libfastsignals ${LIBFASTSIGNALS_SRC}) 4 | custom_enable_cxx17(libfastsignals) 5 | target_include_directories(libfastsignals INTERFACE "${CMAKE_SOURCE_DIR}") 6 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/libfastsignals/include/combiners.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace is::signals 6 | { 7 | 8 | /** 9 | * This results combiner reduces results collection into last value of this collection. 10 | * In other words, it keeps only result of the last slot call. 11 | */ 12 | template 13 | class optional_last_value 14 | { 15 | public: 16 | using result_type = std::optional; 17 | 18 | template 19 | void operator()(TRef&& value) 20 | { 21 | m_result = std::forward(value); 22 | } 23 | 24 | result_type get_value() const 25 | { 26 | return m_result; 27 | } 28 | 29 | private: 30 | result_type m_result = {}; 31 | }; 32 | 33 | template <> 34 | class optional_last_value 35 | { 36 | public: 37 | using result_type = void; 38 | }; 39 | 40 | } // namespace is::signals 41 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/libfastsignals/include/msvc_autolink.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#if defined(_MSC_VER) 4 | // 5 | //# if defined(__clang__) 6 | //# if defined(_DEBUG) && defined(_WIN64) 7 | //# pragma comment(lib, "libfastsignalsd-llvm-x64.lib") 8 | //# elif defined(_DEBUG) 9 | //# pragma comment(lib, "libfastsignalsd-llvm-x32.lib") 10 | //# elif defined(_WIN64) 11 | //# pragma comment(lib, "libfastsignals-llvm-x64.lib") 12 | //# else 13 | //# pragma comment(lib, "libfastsignals-llvm-x32.lib") 14 | //# endif 15 | //# elif _MSC_VER <= 1900 16 | //# error this library needs Visual Studio 2017 and higher 17 | //# elif _MSC_VER < 2000 18 | //# if defined(_DEBUG) && defined(_WIN64) 19 | //# pragma comment(lib, "libfastsignalsd-v141-x64.lib") 20 | //# elif defined(_DEBUG) 21 | //# pragma comment(lib, "libfastsignalsd-v141-x32.lib") 22 | //# elif defined(_WIN64) 23 | //# pragma comment(lib, "libfastsignals-v141-x64.lib") 24 | //# else 25 | //# pragma comment(lib, "libfastsignals-v141-x32.lib") 26 | //# endif 27 | //# else 28 | //# error unknown Visual Studio version, auto-linking setup failed 29 | //# endif 30 | // 31 | //#endif 32 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/libfastsignals/include/signal_impl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "function_detail.h" 4 | #include "spin_mutex.h" 5 | #include 6 | #include 7 | 8 | namespace is::signals::detail 9 | { 10 | 11 | class signal_impl 12 | { 13 | public: 14 | uint64_t add(packed_function fn); 15 | 16 | void remove(uint64_t id) noexcept; 17 | 18 | void remove_all() noexcept; 19 | 20 | size_t count() const noexcept; 21 | 22 | template 23 | Result invoke(Args... args) const 24 | { 25 | packed_function slot; 26 | size_t slotIndex = 0; 27 | uint64_t slotId = 1; 28 | 29 | if constexpr (std::is_same_v) 30 | { 31 | while (get_next_slot(slot, slotIndex, slotId)) 32 | { 33 | slot.get()(std::forward(args)...); 34 | } 35 | } 36 | else 37 | { 38 | Combiner combiner; 39 | while (get_next_slot(slot, slotIndex, slotId)) 40 | { 41 | combiner(slot.get()(std::forward(args)...)); 42 | } 43 | return combiner.get_value(); 44 | } 45 | } 46 | 47 | private: 48 | bool get_next_slot(packed_function& slot, size_t& expectedIndex, uint64_t& nextId) const; 49 | 50 | mutable spin_mutex m_mutex; 51 | std::vector m_functions; 52 | std::vector m_ids; 53 | uint64_t m_nextId = 1; 54 | }; 55 | 56 | using signal_impl_ptr = std::shared_ptr; 57 | using signal_impl_weak_ptr = std::weak_ptr; 58 | 59 | } // namespace is::signals::detail 60 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/libfastsignals/include/spin_mutex.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace is::signals::detail 5 | { 6 | 7 | class spin_mutex 8 | { 9 | public: 10 | spin_mutex() = default; 11 | spin_mutex(const spin_mutex&) = delete; 12 | spin_mutex& operator=(const spin_mutex&) = delete; 13 | spin_mutex(spin_mutex&&) = delete; 14 | spin_mutex& operator=(spin_mutex&&) = delete; 15 | 16 | inline bool try_lock() noexcept 17 | { 18 | return !m_busy.test_and_set(std::memory_order_acquire); 19 | } 20 | 21 | inline void lock() noexcept 22 | { 23 | while (!try_lock()) 24 | { 25 | /* do nothing */; 26 | } 27 | } 28 | 29 | inline void unlock() noexcept 30 | { 31 | m_busy.clear(std::memory_order_release); 32 | } 33 | 34 | private: 35 | std::atomic_flag m_busy = ATOMIC_FLAG_INIT; 36 | }; 37 | 38 | } // namespace is::signals::detail 39 | -------------------------------------------------------------------------------- /benchmark/lib/CppFakeIt/libfastsignals/include/type_traits.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace is::signals 4 | { 5 | namespace detail 6 | { 7 | 8 | template 9 | struct signal_arg 10 | { 11 | using type = const T&; 12 | }; 13 | 14 | template 15 | struct signal_arg 16 | { 17 | using type = U&; 18 | }; 19 | } // namespace detail 20 | 21 | template 22 | using signal_arg_t = typename detail::signal_arg::type; 23 | 24 | } // namespace is::signals 25 | -------------------------------------------------------------------------------- /benchmark/lib/Kosta-Github/signals-cpp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | // 2 | // The MIT License (MIT) 3 | // 4 | // Copyright (c) 2013 by Konstantin (Kosta) Baumann & Autodesk Inc. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | // 23 | -------------------------------------------------------------------------------- /benchmark/lib/Kosta-Github/signals-cpp/signals-cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(signals-cpp CXX) 4 | message("configure: signals-cpp library") 5 | -------------------------------------------------------------------------------- /benchmark/lib/Kosta-Github/signals-cpp/signals-cpp/signals.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // The MIT License (MIT) 3 | // 4 | // Copyright (c) 2013 by Konstantin (Kosta) Baumann & Autodesk Inc. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | // 23 | 24 | #pragma once 25 | 26 | #include "config.hpp" 27 | #include "connection.hpp" 28 | #include "connections.hpp" 29 | #include "signal.hpp" 30 | -------------------------------------------------------------------------------- /benchmark/lib/NoAvailableAlias/nano-signal-slot/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2019 ApEk, NoAvailableAlias, Nano-signal-slot Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /benchmark/lib/copperspice/cs_signal/LICENSE: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions 3 | are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 13 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 16 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 17 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 18 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 19 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 20 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 22 | POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /benchmark/lib/copperspice/cs_signal/README.md: -------------------------------------------------------------------------------- 1 | ## CsSignal 2 | 3 | ### Introduction 4 | 5 | CsSignal is a library for thread aware Signal/Slot delivery. This library does not depend upon 6 | CopperSpice or any other libraries. 7 | 8 | One of the major benefits of CsSignal is how the library delivers signals in a multithreaded 9 | application. Signals can be delivered using a queued connection or a blocking queued connection. 10 | 11 | In the CsSignal library signals and slots are both methods whereas in many other signal/slot 12 | libraries each signal is a separate object. 13 | 14 | 15 | ### System Requirements 16 | 17 | To use CsSignal you will need a C++14 compiler and a C++14 standard library. 18 | 19 | Currently uses the Autotools build system for building and running the unit test suite. The library has been tested with 20 | clang sanitizer and a major code review. 21 | 22 | 23 | ### Documentation 24 | 25 | Class level documentation for CsSignal is available on the CopperSpice website: 26 | 27 | www.copperspice.com/docs/cs_signal/index.html 28 | 29 | 30 | ### Presentations 31 | 32 | Multiple videos discussing Signals and Slots can be found on the following pages: 33 | 34 | www.youtube.com/copperspice
35 | www.copperspice.com/presentations.html 36 | 37 | 38 | ### Authors / Contributors 39 | 40 | * **Ansel Sermersheim** 41 | * **Barbara Geller** 42 | 43 | 44 | ### License 45 | 46 | This library is released under the BSD 2-clause license. For more information refer to the LICENSE file provided with this 47 | project. 48 | 49 | 50 | ### References 51 | 52 | * Website: www.copperspice.com 53 | * Email: info@copperspice.com 54 | -------------------------------------------------------------------------------- /benchmark/lib/copperspice/cs_signal/src/cs_macro.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * Copyright (c) 2015-2018 Barbara Geller 4 | * Copyright (c) 2015-2018 Ansel Sermersheim 5 | * All rights reserved. 6 | * 7 | * This file is part of libCsSignal 8 | * 9 | * libCsSignal is free software, released under the BSD 2-Clause license. 10 | * For license details refer to LICENSE provided with this project. 11 | * 12 | ***********************************************************************/ 13 | 14 | #ifndef LIB_CS_MACRO_H 15 | #define LIB_CS_MACRO_H 16 | 17 | #ifdef _WIN32 18 | 19 | #ifdef BUILDING_LIB_CS_SIGNAL 20 | # define LIB_SIG_EXPORT __declspec(dllexport) 21 | #else 22 | # define LIB_SIG_EXPORT __declspec(dllimport) 23 | #endif 24 | 25 | #else 26 | # define LIB_SIG_EXPORT 27 | 28 | #endif 29 | 30 | 31 | // ** signal macros 32 | #define SIGNAL_1(...) \ 33 | __VA_ARGS__ { 34 | // do not remove the "{", this is required for part two of the macro 35 | 36 | #define SIGNAL_2(signalName, ...) \ 37 | activate(*this, &std::remove_reference::type::signalName, ##__VA_ARGS__); \ 38 | } 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /benchmark/lib/cpp11nullptr/lsignal/LICENCE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2015 Ievgen Polyvanyi 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /benchmark/lib/dacap/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016-2018 David Capello 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /benchmark/lib/dacap/obs/dacap_connection.cpp: -------------------------------------------------------------------------------- 1 | // Observable Library 2 | // Copyright (c) 2016 David Capello 3 | // 4 | // This file is released under the terms of the MIT license. 5 | // Read LICENSE.txt for more information. 6 | 7 | #include "dacap_connection.h" 8 | #include "dacap_signal.h" 9 | 10 | namespace obs { 11 | 12 | void connection::disconnect() { 13 | if (!m_slot) 14 | return; 15 | 16 | assert(m_signal); 17 | if (m_signal) 18 | m_signal->disconnect_slot(m_slot); 19 | 20 | delete m_slot; 21 | m_slot = nullptr; 22 | } 23 | 24 | } // namespace obs 25 | -------------------------------------------------------------------------------- /benchmark/lib/dacap/obs/dacap_connection.h: -------------------------------------------------------------------------------- 1 | // Observable Library 2 | // Copyright (c) 2016 David Capello 3 | // 4 | // This file is released under the terms of the MIT license. 5 | // Read LICENSE.txt for more information. 6 | 7 | #ifndef OBS_CONNETION_H_INCLUDED 8 | #define OBS_CONNETION_H_INCLUDED 9 | #pragma once 10 | 11 | namespace obs { 12 | 13 | class signal_base; 14 | class slot_base; 15 | 16 | class connection { 17 | public: 18 | connection() : m_signal(nullptr), 19 | m_slot(nullptr) { 20 | } 21 | 22 | connection(signal_base* sig, 23 | slot_base* slot) : 24 | m_signal(sig), 25 | m_slot(slot) { 26 | } 27 | 28 | void disconnect(); 29 | 30 | operator bool() { 31 | return (m_slot != nullptr); 32 | } 33 | 34 | private: 35 | signal_base* m_signal; 36 | slot_base* m_slot; 37 | }; 38 | 39 | class scoped_connection { 40 | public: 41 | scoped_connection() { 42 | } 43 | 44 | scoped_connection(const connection& conn) : m_conn(conn) { 45 | } 46 | 47 | scoped_connection& operator=(const connection& conn) { 48 | m_conn.disconnect(); 49 | m_conn = conn; 50 | return *this; 51 | } 52 | 53 | ~scoped_connection() { 54 | m_conn.disconnect(); 55 | } 56 | 57 | private: 58 | connection m_conn; 59 | }; 60 | 61 | } // namespace obs 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /benchmark/lib/dacap/obs/observable.h: -------------------------------------------------------------------------------- 1 | // Observable Library 2 | // Copyright (c) 2016 David Capello 3 | // 4 | // This file is released under the terms of the MIT license. 5 | // Read LICENSE.txt for more information. 6 | 7 | #ifndef OBS_OBSERVABLE_H_INCLUDED 8 | #define OBS_OBSERVABLE_H_INCLUDED 9 | #pragma once 10 | 11 | #include "observers.h" 12 | 13 | namespace obs { 14 | 15 | template 16 | class observable { 17 | public: 18 | 19 | void add_observer(Observer* observer) { 20 | m_observers.add_observer(observer); 21 | } 22 | 23 | void remove_observer(Observer* observer) { 24 | m_observers.remove_observer(observer); 25 | } 26 | 27 | void notify_observers(void (Observer::*method)()) { 28 | m_observers.notify_observers(method); 29 | } 30 | 31 | template 32 | void notify_observers(void (Observer::*method)(Args...), Args ...args) { 33 | m_observers.template notify_observers(method, std::forward(args)...); 34 | } 35 | 36 | private: 37 | observers m_observers; 38 | }; 39 | 40 | } // namespace obs 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /benchmark/lib/dacap/obs/observers.h: -------------------------------------------------------------------------------- 1 | // Observable Library 2 | // Copyright (c) 2016 David Capello 3 | // 4 | // This file is released under the terms of the MIT license. 5 | // Read LICENSE.txt for more information. 6 | 7 | #ifndef OBS_OBSERVERS_H_INCLUDED 8 | #define OBS_OBSERVERS_H_INCLUDED 9 | #pragma once 10 | 11 | #include "safe_list.h" 12 | 13 | namespace obs { 14 | 15 | template 16 | class observers { 17 | public: 18 | typedef T observer_type; 19 | typedef safe_list list_type; 20 | typedef typename list_type::iterator iterator; 21 | 22 | bool empty() const { return m_observers.empty(); } 23 | std::size_t size() const { return m_observers.size(); } 24 | 25 | void add_observer(observer_type* observer) { 26 | m_observers.push_back(observer); 27 | } 28 | 29 | void remove_observer(observer_type* observer) { 30 | m_observers.erase(observer); 31 | } 32 | 33 | template 34 | void notify_observers(void (observer_type::*method)(Args...), Args ...args) { 35 | for (auto observer : m_observers) { 36 | if (observer) 37 | (observer->*method)(std::forward(args)...); 38 | } 39 | } 40 | 41 | private: 42 | list_type m_observers; 43 | }; 44 | 45 | } // namespace obs 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /benchmark/lib/dacap/obs/slot.h: -------------------------------------------------------------------------------- 1 | // Observable Library 2 | // Copyright (c) 2016 David Capello 3 | // 4 | // This file is released under the terms of the MIT license. 5 | // Read LICENSE.txt for more information. 6 | 7 | #ifndef OBS_SLOT_H_INCLUDED 8 | #define OBS_SLOT_H_INCLUDED 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | namespace obs { 15 | 16 | class slot_base { 17 | public: 18 | slot_base() { } 19 | virtual ~slot_base() { } 20 | 21 | // Disable copy 22 | slot_base(const slot_base&) = delete; 23 | slot_base& operator=(const slot_base&) = delete; 24 | }; 25 | 26 | // Generic slot 27 | template 28 | class slot { }; 29 | 30 | template 31 | class slot : public slot_base { 32 | public: 33 | template 34 | slot(F&& f) : f(std::forward(f)) { } 35 | slot(const slot& s) { (void)s; } 36 | virtual ~slot() { } 37 | 38 | template 39 | R operator()(Args2&&...args) { 40 | assert(f); 41 | return f(std::forward(args)...); 42 | } 43 | 44 | private: 45 | std::function f; 46 | }; 47 | 48 | template 49 | class slot : public slot_base { 50 | public: 51 | template 52 | slot(F&& f) : f(std::forward(f)) { } 53 | slot(const slot& s) { (void)s; } 54 | virtual ~slot() { } 55 | 56 | template 57 | void operator()(Args2&&...args) { 58 | assert(f); 59 | f(std::forward(args)...); 60 | } 61 | 62 | private: 63 | std::function f; 64 | }; 65 | 66 | } // namespace obs 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /benchmark/lib/fr00b0/nod/tools/linux_x64/premake5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAvailableAlias/signal-slot-benchmarks/ae175d272f80faaaf75c594d9bfa4f3f4a382de1/benchmark/lib/fr00b0/nod/tools/linux_x64/premake5 -------------------------------------------------------------------------------- /benchmark/lib/i42output/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007-present, Leigh Johnston. 2 | 3 | All Rights Reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | * Neither the name of Leigh Johnston nor the names of any 17 | other contributors to this software may be used to endorse or 18 | promote products derived from this software without specific prior 19 | written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 22 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 23 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /benchmark/lib/i42output/README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | "neolib" is a cross-platform C++ utility library. 3 | 4 | # Dependencies 5 | * Boost 6 | * OpenSSL 7 | * zlib 8 | 9 | # Features 10 | * vecarray container, see http://i42.co.uk/stuff/vecarray.htm 11 | * segmented_array container, see http://i42.co.uk/stuff/segmented_array.htm 12 | * NoFussXML, see http://i42.co.uk/stuff/NoFussXML.htm 13 | * neosigslot, see http://i42.co.uk/stuff/neosigslot.htm 14 | * packet stream network library (based on Boost.Asio) 15 | * plugin framework; uses interfaces (vtables) similar to Microsoft's COM with support for containers/iterators. 16 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | file(GLOB_RECURSE SOURCE_FILES *.cpp) 3 | add_library(iscool_signals STATIC ${SOURCE_FILES}) 4 | target_include_directories(iscool_signals PUBLIC include) 5 | set_property(TARGET iscool_signals PROPERTY CXX_STANDARD 11) 6 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_COPY_H 17 | #define ISCOOL_COPY_H 18 | 19 | namespace iscool 20 | { 21 | template< typename T > 22 | T copy( const T& value ); 23 | } 24 | 25 | #include "iscool/detail/copy.tpp" 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/detail/copy.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_COPY_TPP 17 | #define ISCOOL_COPY_TPP 18 | 19 | template< typename T > 20 | T iscool::copy( const T& value ) 21 | { 22 | return value; 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/detail/optional_or_else.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_OPTIONAL_OR_ELSE_TPP 17 | #define ISCOOL_OPTIONAL_OR_ELSE_TPP 18 | 19 | template< typename T > 20 | T iscool::optional_or_else 21 | ( const optional< T >& optional, const T& fallback ) 22 | { 23 | return optional ? *optional : fallback; 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/digits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_CORE_DIGITS_H 17 | #define ISCOOL_CORE_DIGITS_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | std::uint8_t digits( std::int64_t value ); 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/enum_equals.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_ENUM_EQUALS_H 17 | #define ISCOOL_ENUM_EQUALS_H 18 | 19 | namespace iscool 20 | { 21 | template< typename Enum > 22 | bool enum_equals( int lhs, Enum rhs ); 23 | 24 | template< typename Enum > 25 | bool enum_equals( Enum lhs, int rhs ); 26 | } 27 | 28 | #include "iscool/enum_equals.tpp" 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/enum_equals.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_ENUM_EQUALS_TPP 17 | #define ISCOOL_ENUM_EQUALS_TPP 18 | 19 | template< typename Enum > 20 | bool iscool::enum_equals( int lhs, Enum rhs ) 21 | { 22 | return lhs == static_cast< int >( rhs ); 23 | } 24 | 25 | template< typename Enum > 26 | bool iscool::enum_equals( Enum lhs, int rhs ) 27 | { 28 | return enum_equals( rhs, lhs ); 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/none.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_NONE_H 17 | #define ISCOOL_NONE_H 18 | 19 | #include "iscool/none_t.h" 20 | 21 | namespace iscool 22 | { 23 | extern const none_t none; 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/none_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_NONE_T_H 17 | #define ISCOOL_NONE_T_H 18 | 19 | namespace iscool 20 | { 21 | struct none_t 22 | { 23 | struct init_tag{}; 24 | explicit none_t( init_tag ) { }; 25 | }; 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/optional_or_else.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_OPTIONAL_OR_ELSE_H 17 | #define ISCOOL_OPTIONAL_OR_ELSE_H 18 | 19 | #include "iscool/optional.h" 20 | 21 | namespace iscool 22 | { 23 | template< typename T > 24 | T optional_or_else 25 | ( const optional< T >& optional, const T& fallback ); 26 | } 27 | 28 | #include "iscool/detail/optional_or_else.tpp" 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/profile/detail/output_function.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_PROFILE_DETAIL_OUTPUT_FUNCTION_H 17 | #define ISCOOL_PROFILE_DETAIL_OUTPUT_FUNCTION_H 18 | 19 | #include "iscool/profile/output_delegate.h" 20 | 21 | namespace iscool 22 | { 23 | namespace profile 24 | { 25 | namespace detail 26 | { 27 | extern output_delegate output_function; 28 | } 29 | } 30 | } 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/profile/output_delegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_PROFILE_PRINT_DELEGATE_H 17 | #define ISCOOL_PROFILE_PRINT_DELEGATE_H 18 | 19 | #include 20 | 21 | #include "iscool/profile/profile_data.h" 22 | 23 | namespace iscool 24 | { 25 | namespace profile 26 | { 27 | typedef boost::function< void( profile_data ) > output_delegate; 28 | } 29 | } 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/profile/profile_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_PROFILE_PROFILE_DATA_H 17 | #define ISCOOL_PROFILE_PROFILE_DATA_H 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace iscool 24 | { 25 | namespace profile 26 | { 27 | struct profile_data 28 | { 29 | profile_data(); 30 | profile_data 31 | ( const std::string& new_name, 32 | const std::chrono::milliseconds& new_start, 33 | const std::chrono::milliseconds& new_end, 34 | const std::vector< std::string >& new_tags ); 35 | 36 | std::string name; 37 | std::chrono::milliseconds start; 38 | std::chrono::milliseconds end; 39 | std::vector< std::string > tags; 40 | }; 41 | } 42 | } 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/profile/profiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_PROFILE_PROFILER_H 17 | #define ISCOOL_PROFILE_PROFILER_H 18 | 19 | #include "iscool/optional.h" 20 | #include 21 | #include 22 | #include 23 | 24 | namespace iscool 25 | { 26 | namespace profile 27 | { 28 | class profiler 29 | { 30 | public: 31 | explicit profiler( const std::string& name ); 32 | 33 | void append_tag( const std::string& tag ); 34 | void clear_tags(); 35 | 36 | bool started() const; 37 | 38 | void start(); 39 | void end(); 40 | 41 | private: 42 | const std::string _name; 43 | std::vector< std::string > _tags; 44 | iscool::optional< std::chrono::milliseconds > _start; 45 | }; 46 | } 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/profile/scoped_profiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_PROFILE_SCOPED_PROFILER_H 17 | #define ISCOOL_PROFILE_SCOPED_PROFILER_H 18 | 19 | #include "iscool/profile/profiler.h" 20 | 21 | namespace iscool 22 | { 23 | namespace profile 24 | { 25 | class scoped_profiler 26 | { 27 | public: 28 | explicit scoped_profiler( const std::string& name ); 29 | ~scoped_profiler(); 30 | 31 | void append_tag( const std::string& tag ); 32 | private: 33 | profiler _profiler; 34 | }; 35 | } 36 | } 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/profile/setup.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_PROFILE_SETUP_H 17 | #define ISCOOL_PROFILE_SETUP_H 18 | 19 | #include "iscool/profile/output_delegate.h" 20 | 21 | namespace iscool 22 | { 23 | namespace profile 24 | { 25 | void initialize( output_delegate delegate ); 26 | void finalize(); 27 | } 28 | } 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_CONNECTION_H 17 | #define ISCOOL_SIGNALS_CONNECTION_H 18 | 19 | #include "iscool/signals/detail/slot.h" 20 | 21 | #include 22 | 23 | namespace iscool 24 | { 25 | namespace signals 26 | { 27 | class connection 28 | { 29 | public: 30 | connection(); 31 | explicit connection( const std::weak_ptr< detail::slot >& slot ); 32 | connection( const connection& that ); 33 | connection( connection&& that ); 34 | ~connection(); 35 | 36 | connection& operator=( const connection& that ); 37 | connection& operator=( connection&& that ); 38 | 39 | bool operator==( const connection& that ) const; 40 | bool operator!=( const connection& that ) const; 41 | 42 | bool connected() const; 43 | void disconnect() const; 44 | 45 | private: 46 | std::weak_ptr< detail::slot > _slot; 47 | }; 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/detail/no_tuple_is_masked.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_DETAIL_NO_TUPLE_IS_MASKED_H 17 | #define ISCOOL_SIGNALS_DETAIL_NO_TUPLE_IS_MASKED_H 18 | 19 | #include "iscool/signals/detail/any_tuple_is_masked.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | namespace detail 26 | { 27 | template< typename... Tuple > 28 | struct no_tuple_is_masked 29 | { 30 | enum 31 | { 32 | value = 33 | !any_tuple_is_masked< std::tuple<>, Tuple... >::value 34 | }; 35 | }; 36 | } 37 | } 38 | } 39 | 40 | #include "iscool/signals/detail/no_tuple_is_masked.tests.h" 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/detail/no_tuple_is_masked.tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_DETAIL_NO_TUPLE_IS_MASKED_TESTS_H 17 | #define ISCOOL_SIGNALS_DETAIL_NO_TUPLE_IS_MASKED_TESTS_H 18 | 19 | namespace iscool 20 | { 21 | namespace signals 22 | { 23 | namespace detail 24 | { 25 | static_assert 26 | ( no_tuple_is_masked 27 | < 28 | std::tuple< int, float, bool >, 29 | std::tuple< float, bool, double >, 30 | std::tuple< int, float, int >, 31 | std::tuple< bool, int, double > 32 | >::value, 33 | "Failed to see that no tuple is masked." ); 34 | 35 | static_assert 36 | ( !no_tuple_is_masked 37 | < 38 | std::tuple< int, float, bool >, 39 | std::tuple< float, bool, double >, 40 | std::tuple< int, float, double >, 41 | std::tuple< bool, int, double > 42 | >::value, 43 | "Failed to find a masked tuple." ); 44 | } 45 | } 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/detail/resolve_identifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_DETAIL_RESOLVE_IDENTIFIER_H 17 | #define ISCOOL_SIGNALS_DETAIL_RESOLVE_IDENTIFIER_H 18 | 19 | namespace iscool 20 | { 21 | namespace signals 22 | { 23 | namespace detail 24 | { 25 | template< typename T > 26 | struct resolve_identifier 27 | { 28 | static const char* name() { return T::name(); } 29 | }; 30 | 31 | template<> 32 | struct resolve_identifier< void > 33 | { 34 | static const char* name() { return "unnamed_signal"; } 35 | }; 36 | } 37 | } 38 | } 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/detail/signal_collection_from_tuple.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_DETAIL_SIGNAL_COLLECTION_FROM_TUPLE_H 17 | #define ISCOOL_SIGNALS_DETAIL_SIGNAL_COLLECTION_FROM_TUPLE_H 18 | 19 | #include "iscool/signals/signal_from_tuple_arguments.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | namespace detail 26 | { 27 | template< typename... Tuple > 28 | class signal_collection_from_tuple; 29 | 30 | template<> 31 | class signal_collection_from_tuple<> 32 | { 33 | 34 | }; 35 | 36 | template< typename HeadTuple, typename... OtherTuples > 37 | class signal_collection_from_tuple< HeadTuple, OtherTuples... >: 38 | public signal_collection_from_tuple< OtherTuples... > 39 | { 40 | public: 41 | typedef 42 | typename signal_from_tuple_arguments< HeadTuple >::type 43 | signal_type; 44 | 45 | signal_type signal_instance; 46 | }; 47 | } 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/detail/slot.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_DETAIL_SLOT_H 17 | #define ISCOOL_SIGNALS_DETAIL_SLOT_H 18 | 19 | #include 20 | #include 21 | 22 | namespace iscool 23 | { 24 | namespace signals 25 | { 26 | namespace detail 27 | { 28 | class slot 29 | { 30 | public: 31 | slot(); 32 | ~slot(); 33 | 34 | bool connected() const; 35 | void disconnect(); 36 | 37 | private: 38 | bool _connected; 39 | }; 40 | } 41 | } 42 | } 43 | 44 | extern template 45 | class std::shared_ptr< iscool::signals::detail::slot >; 46 | 47 | extern template 48 | class std::vector< std::shared_ptr< iscool::signals::detail::slot > >; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/detail/statistics_function.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_STATISTICS_FUNCTION_H 17 | #define ISCOOL_SIGNALS_STATISTICS_FUNCTION_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | class statistics_data; 26 | 27 | namespace detail 28 | { 29 | extern 30 | boost::function< void( const statistics_data& ) > 31 | statistics_function; 32 | } 33 | } 34 | } 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/get.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_GET_H 17 | #define ISCOOL_SIGNALS_GET_H 18 | 19 | #include "iscool/signals/signal_collection.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | template< typename SearchedType, typename... SignalArgument > 26 | signal< void ( SearchedType ) >& 27 | get( signal_collection< SignalArgument... >& collection ); 28 | 29 | template< typename SearchedType, typename... SignalArgument > 30 | const signal< void ( SearchedType ) >& 31 | get( const signal_collection< SignalArgument... >& collection ); 32 | } 33 | } 34 | 35 | #include "iscool/signals/detail/get.tpp" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/get_from_tuple_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_GET_FROM_TUPLE_ELEMENT_H 17 | #define ISCOOL_SIGNALS_GET_FROM_TUPLE_ELEMENT_H 18 | 19 | #include "iscool/signals/find_signal_type_from_tuple_element.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | template< typename SearchedType, std::size_t I, typename... Tuple > 26 | typename 27 | find_signal_type_from_tuple_element 28 | < 29 | SearchedType, 30 | I, 31 | signal_collection_from_tuple< Tuple... > 32 | >::type& 33 | get_from_tuple_element 34 | ( signal_collection_from_tuple< Tuple... >& collection ); 35 | 36 | template< typename SearchedType, std::size_t I, typename... Tuple > 37 | const typename 38 | find_signal_type_from_tuple_element 39 | < 40 | SearchedType, 41 | I, 42 | signal_collection_from_tuple< Tuple... > 43 | >::type& 44 | get_from_tuple_element 45 | ( const signal_collection_from_tuple< Tuple... >& collection ); 46 | } 47 | } 48 | 49 | #include "iscool/signals/detail/get_from_tuple_element.tpp" 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/implement_signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_IMPLEMENT_SIGNAL_H 17 | #define ISCOOL_SIGNALS_IMPLEMENT_SIGNAL_H 18 | 19 | #include "iscool/signals/declare_signal.h" 20 | #include "iscool/signals/signal.impl.tpp" 21 | 22 | #include 23 | 24 | #define DETAIL_IMPLEMENT_SIGNAL( SCOPE, NAME, MEMBER, TYPENAME ) \ 25 | ::iscool::signals::connection \ 26 | BOOST_PP_REMOVE_PARENS( SCOPE )::DETAIL_SIGNAL_CONNECT_FUNCTION_NAME \ 27 | ( NAME ) \ 28 | ( const DETAIL_SIGNAL_FUNCTION_TYPE_NAME( NAME )& function ) const \ 29 | { \ 30 | return MEMBER.connect( function ); \ 31 | } 32 | 33 | #define IMPLEMENT_SIGNAL( SCOPE, NAME, MEMBER ) \ 34 | DETAIL_IMPLEMENT_SIGNAL( SCOPE, NAME, MEMBER, ) 35 | 36 | #define IMPLEMENT_SIGNAL_IN_TEMPLATE( SCOPE, NAME, MEMBER ) \ 37 | DETAIL_IMPLEMENT_SIGNAL( SCOPE, NAME, MEMBER, typename ) 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/one_shot_signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_ONE_SHOT_SIGNAL_H 17 | #define ISCOOL_SIGNALS_ONE_SHOT_SIGNAL_H 18 | 19 | #include "iscool/signals/signal.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | template< typename Signature > 26 | class one_shot_signal 27 | { 28 | public: 29 | typedef signal< Signature > signal_type; 30 | typedef typename signal_type::result_type result_type; 31 | 32 | public: 33 | connection connect( const boost::function< Signature >& f ); 34 | 35 | template< typename... Arg > 36 | result_type operator()( Arg... arg ); 37 | 38 | void disconnect_all_slots(); 39 | bool empty() const; 40 | 41 | private: 42 | signal_type _impl; 43 | }; 44 | } 45 | } 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/one_shot_signal.impl.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_ONE_SHOT_SIGNAL_IMPL_TPP 17 | #define ISCOOL_SIGNALS_ONE_SHOT_SIGNAL_IMPL_TPP 18 | 19 | #include "iscool/signals/signal.impl.tpp" 20 | 21 | template< typename Signature > 22 | iscool::signals::connection 23 | iscool::signals::one_shot_signal< Signature >::connect 24 | ( const boost::function< Signature >& f ) 25 | { 26 | return _impl.connect( f ); 27 | } 28 | 29 | template< typename Signature > 30 | template< typename... Arg > 31 | typename iscool::signals::one_shot_signal< Signature >::result_type 32 | iscool::signals::one_shot_signal< Signature >::operator()( Arg... arg ) 33 | { 34 | signal_type s; 35 | s.swap( _impl ); 36 | return s( arg... ); 37 | } 38 | 39 | template< typename Signature > 40 | void iscool::signals::one_shot_signal< Signature >::disconnect_all_slots() 41 | { 42 | _impl.disconnect_all_slots(); 43 | } 44 | 45 | template< typename Signature > 46 | bool iscool::signals::one_shot_signal< Signature >::empty() const 47 | { 48 | return _impl.empty(); 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/one_shot_signal_pool.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SIGNAL_POOL_H 17 | #define ISCOOL_SIGNALS_SIGNAL_POOL_H 18 | 19 | #include "iscool/memory/dynamic_pool.h" 20 | #include "iscool/memory/pool_signal_traits.h" 21 | 22 | namespace iscool 23 | { 24 | namespace signals 25 | { 26 | template< typename T > 27 | class one_shot_signal_pool 28 | { 29 | 30 | public: 31 | typedef 32 | iscool::memory::dynamic_pool 33 | < 34 | iscool::signals::signal< T >, 35 | iscool::memory::pool_signal_traits 36 | < 37 | iscool::signals::signal< T > 38 | > 39 | > 40 | pool_type; 41 | 42 | 43 | public: 44 | explicit one_shot_signal_pool( std::size_t pool_size ); 45 | ~one_shot_signal_pool(); 46 | 47 | typename pool_type::slot pick_available(); 48 | 49 | template< typename... Args > 50 | void trigger( std::size_t id, Args&&... args ); 51 | 52 | void clear(); 53 | private: 54 | pool_type _pool; 55 | 56 | }; 57 | } 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/one_shot_signal_pool.impl.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SIGNAL_POOL_IMPL_TPP 17 | #define ISCOOL_SIGNALS_SIGNAL_POOL_IMPL_TPP 18 | 19 | template< typename T > 20 | iscool::signals::one_shot_signal_pool< T >::one_shot_signal_pool 21 | ( std::size_t pool_size ) 22 | : _pool( pool_size ) 23 | { 24 | 25 | } 26 | 27 | template< typename T > 28 | iscool::signals::one_shot_signal_pool< T >::~one_shot_signal_pool() = default; 29 | 30 | template< typename T > 31 | typename iscool::signals::one_shot_signal_pool< T >::pool_type::slot 32 | iscool::signals::one_shot_signal_pool< T >::pick_available() 33 | { 34 | return _pool.pick_available(); 35 | } 36 | 37 | template< typename T > 38 | template< typename... Args > 39 | void iscool::signals::one_shot_signal_pool< T >::trigger 40 | ( std::size_t id, Args&&... args ) 41 | { 42 | _pool.get( id )( std::forward< Args >( args )... ); 43 | _pool.release( id ); 44 | } 45 | 46 | template< typename T > 47 | void iscool::signals::one_shot_signal_pool< T >::clear() 48 | { 49 | _pool.clear(); 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/relay.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_RELAY_H 17 | #define ISCOOL_SIGNALS_RELAY_H 18 | 19 | #include "iscool/signals/signal.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | template< typename Signature > 26 | typename signal< Signature >::slot_function_type 27 | relay( const signal< Signature >& s ); 28 | } 29 | } 30 | 31 | #include "iscool/signals/detail/relay.tpp" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/shared_connection.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SHARED_CONNECTION_H 17 | #define ISCOOL_SIGNALS_SHARED_CONNECTION_H 18 | 19 | #include "iscool/signals/connection.h" 20 | #include "iscool/signals/scoped_connection.h" 21 | 22 | namespace iscool 23 | { 24 | namespace signals 25 | { 26 | class shared_connection 27 | { 28 | private: 29 | typedef std::shared_ptr< scoped_connection > connection_pointer; 30 | 31 | public: 32 | shared_connection(); 33 | shared_connection( const connection& c ); 34 | ~shared_connection(); 35 | 36 | bool connected() const; 37 | void disconnect(); 38 | 39 | bool operator==( const shared_connection& that ) const; 40 | bool operator!=( const shared_connection& that ) const; 41 | 42 | private: 43 | connection_pointer _connection; 44 | }; 45 | } 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/shared_connection_set.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SHARED_CONNECTION_SET_H 17 | #define ISCOOL_SIGNALS_SHARED_CONNECTION_SET_H 18 | 19 | #include "iscool/signals/shared_connection.h" 20 | 21 | #include 22 | 23 | namespace iscool 24 | { 25 | namespace signals 26 | { 27 | class shared_connection_set 28 | { 29 | private: 30 | typedef std::vector< shared_connection > connection_collection; 31 | 32 | public: 33 | shared_connection_set(); 34 | ~shared_connection_set(); 35 | 36 | void insert( shared_connection c ); 37 | void insert( shared_connection_set that ); 38 | 39 | void clear(); 40 | bool empty() const; 41 | 42 | private: 43 | connection_collection _connections; 44 | }; 45 | } 46 | } 47 | 48 | extern template class std::vector< iscool::signals::shared_connection >; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/signal_collection.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SIGNAL_COLLECTION_H 17 | #define ISCOOL_SIGNALS_SIGNAL_COLLECTION_H 18 | 19 | #include "iscool/signals/signal.h" 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | template< typename... SignalArgument > 26 | class signal_collection; 27 | 28 | template<> 29 | class signal_collection<> 30 | { 31 | 32 | }; 33 | 34 | template< typename SignalArgument, typename... OtherArguments > 35 | class signal_collection< SignalArgument, OtherArguments... >: 36 | public signal_collection< OtherArguments... > 37 | { 38 | public: 39 | signal< void ( SignalArgument ) > signal_instance; 40 | }; 41 | } 42 | } 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/signal_collection_from_tuple.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SIGNAL_COLLECTION_FROM_TUPLE_H 17 | #define ISCOOL_SIGNALS_SIGNAL_COLLECTION_FROM_TUPLE_H 18 | 19 | #include "iscool/signals/detail/no_tuple_is_masked.h" 20 | #include "iscool/signals/detail/signal_collection_from_tuple.h" 21 | 22 | namespace iscool 23 | { 24 | namespace signals 25 | { 26 | template< typename... Tuple > 27 | class signal_collection_from_tuple: 28 | public detail::signal_collection_from_tuple< Tuple... > 29 | { 30 | static_assert 31 | ( detail::no_tuple_is_masked< Tuple... >::value, 32 | "Some tuples cannot be reached." ); 33 | }; 34 | } 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/signal_from_tuple_arguments.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_SIGNAL_FROM_TUPLE_ARGUMENTS_H 17 | #define ISCOOL_SIGNALS_SIGNAL_FROM_TUPLE_ARGUMENTS_H 18 | 19 | #include "iscool/signals/signal.h" 20 | 21 | #include 22 | 23 | namespace iscool 24 | { 25 | namespace signals 26 | { 27 | template< typename T > 28 | class signal_from_tuple_arguments; 29 | 30 | template< typename... Arg > 31 | class signal_from_tuple_arguments< std::tuple< Arg... > > 32 | { 33 | public: 34 | typedef signal< void( Arg... ) > type; 35 | }; 36 | } 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/statistics_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_STATISTICS_DATA_H 17 | #define ISCOOL_SIGNALS_STATISTICS_DATA_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | class statistics_data 26 | { 27 | public: 28 | statistics_data 29 | ( const std::string& signal_identifier, std::size_t slot_count ); 30 | ~statistics_data(); 31 | 32 | public: 33 | std::string signal_identifier; 34 | std::size_t slot_count; 35 | }; 36 | } 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/statistics_sink.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_STATISTICS_SINK_H 17 | #define ISCOOL_SIGNALS_STATISTICS_SINK_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | class statistics_data; 26 | 27 | void set_statistics_sink 28 | ( const boost::function< void( const statistics_data& ) >& sink ); 29 | void clear_statistics_sink(); 30 | } 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/signals/void_signal_function.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_SIGNALS_VOID_SIGNAL_FUNCTION_H 17 | #define ISCOOL_SIGNALS_VOID_SIGNAL_FUNCTION_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace signals 24 | { 25 | typedef boost::function< void() > void_signal_function; 26 | } 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/time/backward_duration_to_unit_change.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_TIME_BACKWARD_DURATION_TO_UNIT_CHANGE_H 17 | #define ISCOOL_TIME_BACKWARD_DURATION_TO_UNIT_CHANGE_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace time 24 | { 25 | template< class TargetDuration, class Rep, class Period > 26 | TargetDuration 27 | backward_duration_to_unit_change 28 | ( const std::chrono::duration< Rep, Period >& duration ); 29 | } 30 | } 31 | 32 | #include "iscool/time/detail/backward_duration_to_unit_change.tpp" 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/time/days.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_TIME_DAYS_H 17 | #define ISCOOL_TIME_DAYS_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace time 24 | { 25 | typedef std::chrono::duration 26 | < 27 | int, 28 | std::ratio_multiply 29 | < 30 | std::chrono::hours::period, 31 | std::ratio< 24 > 32 | >::type 33 | > 34 | days; 35 | } 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/time/detail/now.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_TIME_DETAIL_NOW_TPP 17 | #define ISCOOL_TIME_DETAIL_NOW_TPP 18 | 19 | #include 20 | 21 | template 22 | Duration iscool::time::now() 23 | { 24 | return std::chrono::duration_cast< Duration > 25 | ( std::chrono::system_clock::now().time_since_epoch() ); 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/time/detail/round.tpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_TIME_ROUND_TPP 17 | #define ISCOOL_TIME_ROUND_TPP 18 | 19 | template 20 | TargetDuration 21 | iscool::time::round( std::chrono::duration< Rep, Period > duration ) 22 | { 23 | const TargetDuration floor 24 | ( std::chrono::duration_cast< TargetDuration >( duration ) ); 25 | const TargetDuration ceil( floor + TargetDuration( 1 ) ); 26 | 27 | const auto underestimation( duration - floor ); 28 | const auto overestimation( ceil - duration ); 29 | 30 | if ( underestimation == overestimation ) 31 | { 32 | if ( floor.count() % 2 == 1 ) 33 | return ceil; 34 | 35 | return floor; 36 | } 37 | else if ( underestimation < overestimation ) 38 | return floor; 39 | 40 | return ceil; 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/time/now.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_TIME_NOW_H 17 | #define ISCOOL_TIME_NOW_H 18 | 19 | namespace iscool 20 | { 21 | namespace time 22 | { 23 | template 24 | Duration now(); 25 | } 26 | } 27 | 28 | #include "iscool/time/detail/now.tpp" 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/include/iscool/time/round.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef ISCOOL_TIME_ROUND_H 17 | #define ISCOOL_TIME_ROUND_H 18 | 19 | #include 20 | 21 | namespace iscool 22 | { 23 | namespace time 24 | { 25 | template< class TargetDuration, class Rep, class Period > 26 | TargetDuration round( std::chrono::duration< Rep, Period > duration ); 27 | } 28 | } 29 | 30 | #include "iscool/time/detail/round.tpp" 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/digits.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/digits.h" 17 | 18 | #include 19 | 20 | std::uint8_t iscool::digits( std::int64_t value ) 21 | { 22 | std::uint8_t result( 1 ); 23 | 24 | if ( value < 0 ) 25 | { 26 | ++result; 27 | 28 | if ( value == std::numeric_limits< std::int64_t >::min() ) 29 | value = -( value + 1 ); 30 | else 31 | value = -value; 32 | } 33 | 34 | while ( value >= 10 ) 35 | { 36 | ++result; 37 | value /= 10; 38 | } 39 | 40 | return result; 41 | } 42 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/none.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/none.h" 17 | 18 | const iscool::none_t iscool::none( ( iscool::none_t::init_tag() ) ); 19 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/optional.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/optional.h" 17 | 18 | #include "iscool/optional.impl.tpp" 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | template class iscool::optional< bool >; 25 | template class iscool::optional< char >; 26 | template class iscool::optional< unsigned char >; 27 | template class iscool::optional< int >; 28 | template class iscool::optional< unsigned int >; 29 | template class iscool::optional< long >; 30 | template class iscool::optional< unsigned long >; 31 | template class iscool::optional< long long >; 32 | template class iscool::optional< unsigned long long >; 33 | template class iscool::optional< float >; 34 | template class iscool::optional< double >; 35 | 36 | template class iscool::optional< std::chrono::milliseconds >; 37 | template class iscool::optional< std::chrono::seconds >; 38 | 39 | template class iscool::optional< std::string >; 40 | 41 | template class iscool::optional< std::vector< char > >; 42 | template class iscool::optional< std::vector< unsigned long > >; 43 | template class iscool::optional< std::vector< unsigned long long > >; 44 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/profile/detail/output_function.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/profile/detail/output_function.h" 17 | 18 | iscool::profile::output_delegate iscool::profile::detail::output_function; 19 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/profile/profile_data.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/profile/profile_data.h" 17 | 18 | iscool::profile::profile_data::profile_data() 19 | : start( std::chrono::milliseconds( 0 ) ), 20 | end( std::chrono::milliseconds( 0 ) ) 21 | {} 22 | 23 | iscool::profile::profile_data::profile_data 24 | ( const std::string& new_name, const std::chrono::milliseconds& new_start, 25 | const std::chrono::milliseconds& new_end, 26 | const std::vector< std::string >& new_tags ) 27 | : name( new_name ), 28 | start( new_start ), 29 | end( new_end ), 30 | tags( new_tags ) 31 | { 32 | } 33 | 34 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/profile/profiler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/profile/profiler.h" 17 | 18 | #include "iscool/time/now.h" 19 | #include "iscool/profile/detail/output_function.h" 20 | 21 | iscool::profile::profiler::profiler 22 | ( const std::string& name ) 23 | : _name( name ) 24 | { 25 | } 26 | 27 | void iscool::profile::profiler::append_tag( const std::string& tag ) 28 | { 29 | _tags.push_back( tag ); 30 | } 31 | 32 | void iscool::profile::profiler::clear_tags() 33 | { 34 | _tags.clear(); 35 | } 36 | 37 | bool iscool::profile::profiler::started() const 38 | { 39 | return !!_start; 40 | } 41 | 42 | void iscool::profile::profiler::start() 43 | { 44 | _start = iscool::time::now< std::chrono::milliseconds >(); 45 | } 46 | 47 | void iscool::profile::profiler::end() 48 | { 49 | assert( _start ); 50 | const std::chrono::milliseconds end 51 | ( iscool::time::now< std::chrono::milliseconds >() ); 52 | const profile_data result( _name, *_start, end, _tags ); 53 | _start.reset(); 54 | 55 | if( !detail::output_function.empty() ) 56 | detail::output_function( result ); 57 | } 58 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/profile/scoped_profiler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/profile/scoped_profiler.h" 17 | 18 | iscool::profile::scoped_profiler::scoped_profiler 19 | ( const std::string& name ) 20 | : _profiler( name ) 21 | { 22 | _profiler.start(); 23 | } 24 | 25 | iscool::profile::scoped_profiler::~scoped_profiler() 26 | { 27 | _profiler.end(); 28 | } 29 | 30 | void iscool::profile::scoped_profiler::append_tag( const std::string& tag ) 31 | { 32 | _profiler.append_tag( tag ); 33 | } 34 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/profile/setup.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/profile/setup.h" 17 | 18 | #include "iscool/profile/detail/output_function.h" 19 | 20 | void iscool::profile::initialize( output_delegate delegate ) 21 | { 22 | assert( !detail::output_function ); 23 | assert( delegate ); 24 | 25 | detail::output_function = delegate; 26 | } 27 | 28 | void iscool::profile::finalize() 29 | { 30 | detail::output_function = output_delegate(); 31 | } 32 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/signals/detail/slot.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/signals/detail/slot.h" 17 | 18 | template class std::shared_ptr< iscool::signals::detail::slot >; 19 | template class std::vector< std::shared_ptr< iscool::signals::detail::slot > >; 20 | 21 | iscool::signals::detail::slot::slot() 22 | : _connected( true ) 23 | { 24 | 25 | } 26 | 27 | iscool::signals::detail::slot::~slot() = default; 28 | 29 | bool iscool::signals::detail::slot::connected() const 30 | { 31 | return _connected; 32 | } 33 | 34 | void iscool::signals::detail::slot::disconnect() 35 | { 36 | _connected = false; 37 | } 38 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/signals/detail/statistics_function.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/signals/detail/statistics_function.h" 17 | 18 | boost::function< void( const iscool::signals::statistics_data& ) > 19 | iscool::signals::detail::statistics_function; 20 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/signals/ics_signal.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/signals/signal.h" 17 | #include "iscool/signals/signal.impl.tpp" 18 | 19 | template class iscool::signals::signal< void() >; 20 | template class iscool::signals::signal< void( bool ) >; 21 | template class iscool::signals::signal< void( int ) >; 22 | template class iscool::signals::signal< void( float ) >; 23 | template class iscool::signals::signal< void( std::uint32_t ) >; 24 | template class iscool::signals::signal< void( std::uint64_t ) >; 25 | template class iscool::signals::signal< void( std::string ) >; 26 | template class iscool::signals::signal< void( const std::string& ) >; 27 | 28 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/signals/shared_connection_set.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/signals/shared_connection_set.h" 17 | 18 | #include 19 | #include 20 | 21 | template class std::vector< iscool::signals::shared_connection >; 22 | 23 | iscool::signals::shared_connection_set::shared_connection_set() = default; 24 | iscool::signals::shared_connection_set::~shared_connection_set() = default; 25 | 26 | void iscool::signals::shared_connection_set::insert( shared_connection c ) 27 | { 28 | assert( std::find( _connections.begin(), _connections.end(), c ) 29 | == _connections.end() ); 30 | _connections.push_back( c ); 31 | } 32 | 33 | void 34 | iscool::signals::shared_connection_set::insert( shared_connection_set that ) 35 | { 36 | for ( const shared_connection& c : that._connections ) 37 | insert( c ); 38 | } 39 | 40 | void iscool::signals::shared_connection_set::clear() 41 | { 42 | for ( shared_connection& connection : _connections ) 43 | connection.disconnect(); 44 | 45 | _connections.clear(); 46 | } 47 | 48 | bool iscool::signals::shared_connection_set::empty() const 49 | { 50 | return _connections.empty(); 51 | } 52 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/signals/statistics_data.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/signals/statistics_data.h" 17 | 18 | iscool::signals::statistics_data::statistics_data 19 | ( const std::string& signal_identifier, std::size_t slot_count ) 20 | : signal_identifier( signal_identifier ), 21 | slot_count( slot_count ) 22 | { 23 | 24 | } 25 | 26 | iscool::signals::statistics_data::~statistics_data() = default; 27 | -------------------------------------------------------------------------------- /benchmark/lib/iscool/src/iscool/signals/statistics_sink.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-present IsCool Entertainment 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "iscool/signals/statistics_sink.h" 17 | 18 | #include "iscool/signals/detail/statistics_function.h" 19 | 20 | void iscool::signals::set_statistics_sink 21 | ( const boost::function< void( const statistics_data& ) >& sink ) 22 | { 23 | assert( sink ); 24 | detail::statistics_function = sink; 25 | } 26 | 27 | void iscool::signals::clear_statistics_sink() 28 | { 29 | detail::statistics_function = 30 | boost::function< void( const statistics_data& ) >(); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /benchmark/lib/jeffomatic/jl_signal/src/ScopedAllocator.h: -------------------------------------------------------------------------------- 1 | #ifndef _JL_SCOPED_ALLOCATOR_H_ 2 | #define _JL_SCOPED_ALLOCATOR_H_ 3 | 4 | // Scoped allocators will most likely be used with placement new, e.g.: 5 | // Foo* pFoo = new( pFooAllocator->Alloc(sizeof(Foo)) ) Foo(); 6 | // To use placement new, we need to include the standard 'new' header. 7 | #include 8 | 9 | namespace jl { 10 | 11 | /** 12 | * An interface for very basic, stateful allocators. No array allocation. 13 | */ 14 | class ScopedAllocator 15 | { 16 | public: 17 | virtual ~ScopedAllocator() {}; 18 | virtual void* Alloc( size_t nBytes ) = 0; 19 | virtual void Free( void* pObject ) = 0; 20 | }; 21 | 22 | } // namespace jl 23 | 24 | #endif // ! defined( _JL_SCOPED_ALLOCATOR_H_ ) 25 | -------------------------------------------------------------------------------- /benchmark/lib/jeffomatic/jl_signal/src/StaticSignalConnectionAllocators.h: -------------------------------------------------------------------------------- 1 | #ifndef _JL_STATIC_SIGNAL_CONNECTION_ALLOCATORS_H_ 2 | #define _JL_STATIC_SIGNAL_CONNECTION_ALLOCATORS_H_ 3 | 4 | #include "ObjectPoolScopedAllocator.h" 5 | #include "SignalDefinitions.h" 6 | 7 | namespace jl { 8 | 9 | typedef Signal0 TDummySignal; 10 | 11 | template< unsigned _Size > 12 | class StaticSignalConnectionAllocator : public StaticObjectPoolAllocator< TDummySignal::eAllocationSize, _Size > 13 | { 14 | }; 15 | 16 | template< unsigned _Size > 17 | class StaticObserverConnectionAllocator : public StaticObjectPoolAllocator< SignalObserver::eAllocationSize, _Size > 18 | { 19 | }; 20 | 21 | } // namespace jl 22 | 23 | #endif // ! defined( _JL_STATIC_SIGNAL_CONNECTION_ALLOCATORS_H_ ) -------------------------------------------------------------------------------- /benchmark/lib/jeffomatic/jl_signal/src/Utils.h: -------------------------------------------------------------------------------- 1 | #ifndef _JL_UTILS_H_ 2 | #define _JL_UTILS_H_ 3 | 4 | ///////////// 5 | // I. Asserts 6 | 7 | #include 8 | 9 | // To disable runtime asserts, either: 10 | // 1. Define JL_DISABLE_ASSERT as a global compiler macro, 11 | // 2. Comment out JL_ENABLE_ASSERT below 12 | #define JL_ENABLE_ASSERT 13 | 14 | #if defined( JL_ENABLE_ASSERT ) && ! defined ( JL_DISABLE_ASSERT ) 15 | #define JL_ASSERT( _Expr ) assert( _Expr ) 16 | #else 17 | #define JL_ASSERT( _Expr ) 18 | #endif 19 | 20 | // A handy compile-time assert 21 | #define JL_COMPILER_ASSERT( _Expr, _Message ) typedef int JL_COMPILER_ASSERT_##_Message[ _Expr ? 0 : -1 ] 22 | 23 | ////////////////////////////// 24 | // II. Miscellaneous utilities 25 | 26 | #define JL_ARRAY_SIZE( _a ) ( sizeof(_a) / sizeof((_a)[0]) ) 27 | #define JL_UNUSED( _a ) (void)( _a ) 28 | 29 | namespace jl { 30 | 31 | template< typename _to, typename _from > 32 | _to BruteForceCast( _from p ) 33 | { 34 | union 35 | { 36 | _from from; 37 | _to to; 38 | } conversion; 39 | conversion.from = p; 40 | return conversion.to; 41 | } 42 | 43 | } // namespace jl 44 | 45 | #endif // ! defined( _JL_UTILS_H_ ) -------------------------------------------------------------------------------- /benchmark/lib/joanrieu/signal11/LICENSE.md: -------------------------------------------------------------------------------- 1 | Please refer to `signal11.h`. 2 | -------------------------------------------------------------------------------- /benchmark/lib/joanrieu/signal11/README.md: -------------------------------------------------------------------------------- 1 | signal11 2 | ======== 3 | 4 | Description 5 | ----------- 6 | 7 | A very simple signal/slot library for C++11. 8 | 9 | Installation 10 | ------------ 11 | 12 | Just copy `signal11.h` in your project. 13 | You probably need to enable the C++11 mode of your compiler, `clang++` and `g++` use `-std=c++11`. 14 | 15 | Usage 16 | ----- 17 | 18 | signal11 signal; 19 | 20 | Declares a signal taking three arguments of types `A`, `B` and `C`. 21 | There is no limit on the amount of arguments. 22 | 23 | signal.connect(function); 24 | 25 | Connects `function` (anything accepted by `std::function`) to the signal. 26 | `function(a, b, c)` will be called anytime `signal(a, b, c)` is called. 27 | 28 | auto connection = signal.connect(function); 29 | // ... 30 | signal.disconnect(connection); 31 | 32 | Prevent `function` from being called anymore. 33 | 34 | signal.connect_oneshot(function); 35 | 36 | Like `connect` but `function` will be disconnected as soon as it has been called once. 37 | 38 | For a more in-depth example, see `example.cpp`. 39 | -------------------------------------------------------------------------------- /benchmark/lib/larspensjo/SimpleSignal/README.md: -------------------------------------------------------------------------------- 1 | # High performance C++11 signals 2 | See [Performance of a C++11 Signal System](http://www.testbit.eu/2013/cpp11-signal-system-performance/) for 3 | the original source code, as well as performance measurements compared to other signalling systems. 4 | 5 | The original author, Tim Janik, licensed the source code to the public domain [CC0 1.0 Universal (CC0 1.0)](http://creativecommons.org/publicdomain/zero/1.0/). 6 | ## Declare a signal 7 | This example declares a signal 'sig' that takes three arguments and returns a char. 8 | ```c++ 9 | Simple::Signal sig; 10 | ``` 11 | ## Connect to a signal 12 | This example connects 'sig' to a static function. 13 | It is also possible to connect to member functions or lambda functions. 14 | ```c++ 15 | static char float_callback (float f, int, std::string) { 16 | // ... 17 | return 0; 18 | } 19 | 20 | void Init() { 21 | sig.connect(float_callback); 22 | } 23 | ``` 24 | ## Fire a signal 25 | ```c++ 26 | void func() { 27 | // ... 28 | sig.emit(1.0f, 7, "xxxx"); 29 | } 30 | ``` 31 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/libsigcplusplus/libsigcplusplus.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/license.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: License 4 | --- 5 | 6 | Libsigc++ is licensed under the [GNU Library General Public License](https://www.gnu.org/licenses/lgpl-3.0-standalone.html) 7 | for all platforms. Our intent in licensing it in this way is to 8 | provide it for use through shared libraries in all projects both 9 | open and proprietary. Other GNU projects may of course integrate 10 | and link in a static manner. The full body of the license is 11 | provided for your inspection. 12 | 13 | This is the only license which grants you use of the software, so 14 | if you do not agree to its terms, you may not use this software. 15 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/adaptors/adaptor_base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2003 - 2016, The libsigc++ Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef SIGC_ADAPTORS_DEDUCE_RESULT_TYPE_H 20 | #define SIGC_ADAPTORS_DEDUCE_RESULT_TYPE_H 21 | 22 | namespace sigc 23 | { 24 | 25 | // TODO: Is this necessary now that we don't need deduce_result_type? 26 | /** A hint to the compiler. 27 | * Functors which have all methods based on templates 28 | * should publicly inherit from this hint. 29 | * 30 | * Adaptors don't inherit from this type directly. They use 31 | * use sigc::adapts as a base type instead. sigc::adaptors 32 | * wraps arbitrary functor types as well as function pointers 33 | * and class methods. 34 | * 35 | * @ingroup adaptors 36 | */ 37 | struct adaptor_base 38 | { 39 | }; 40 | 41 | } /* namespace sigc */ 42 | #endif /* SIGC_ADAPTORS_DEDUCE_RESULT_TYPE_H */ 43 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/adaptors/adaptors.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2002 - 2016, The libsigc++ Development Team 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Lesser General Public 5 | * License as published by the Free Software Foundation; either 6 | * version 2.1 of the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public 14 | * License along with this library; if not, write to the Free Software 15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | */ 18 | #ifndef SIGC_ADAPTOR_HPP 19 | #define SIGC_ADAPTOR_HPP 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif /* SIGC_ADAPTOR_HPP */ 31 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/adaptors/tuple_visitor_visit_each.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 - 2016, The libsigc++ Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef SIGC_TUPLE_VISITOR_VISIT_EACH_H 20 | #define SIGC_TUPLE_VISITOR_VISIT_EACH_H 21 | 22 | #include 23 | #include 24 | 25 | namespace sigc 26 | { 27 | 28 | namespace internal 29 | { 30 | 31 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 32 | template 33 | struct TupleVisitorVisitEach 34 | { 35 | template 36 | constexpr static void visit(const T_element& element, T_action&& action) 37 | { 38 | sigc::visit_each(std::forward(action), element); 39 | } 40 | }; 41 | #endif // DOXYGEN_SHOULD_SKIP_THIS 42 | 43 | } // namespace internal 44 | 45 | } // namespace sigc 46 | 47 | #endif /* SIGC_TUPLE_VISITOR_VISIT_EACH_H */ 48 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/bind.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002 - 2016, The libsigc++ Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | */ 19 | #ifndef SIGC_BIND_HPP 20 | #define SIGC_BIND_HPP 21 | 22 | #include 23 | 24 | #endif /* SIGC_BIND_HPP */ 25 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/bind_return.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002 - 2016, The libsigc++ Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | */ 19 | #ifndef SIGC_BIND_RETURN_HPP 20 | #define SIGC_BIND_RETURN_HPP 21 | 22 | #include 23 | 24 | #endif /* SIGC_BIND_RETURN_HPP */ 25 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/functors/functors.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2002 - 2016, The libsigc++ Development Team 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Lesser General Public 5 | * License as published by the Free Software Foundation; either 6 | * version 2.1 of the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public 14 | * License along with this library; if not, write to the Free Software 15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | */ 18 | #ifndef SIGC_FUNCTOR_HPP 19 | #define SIGC_FUNCTOR_HPP 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #endif /* SIGC_FUNCTOR_HPP */ 26 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/reference_wrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002 - 2016, The libsigc++ Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | */ 19 | #ifndef SIGC_REFERENCE_WRAPPER_H 20 | #define SIGC_REFERENCE_WRAPPER_H 21 | 22 | #include 23 | 24 | namespace sigc 25 | { 26 | 27 | template 28 | struct unwrap_reference 29 | { 30 | using type = T_type; 31 | }; 32 | 33 | template 34 | struct unwrap_reference> 35 | { 36 | using type = T_type&; 37 | }; 38 | 39 | template 40 | struct unwrap_reference> 41 | { 42 | using type = const T_type&; 43 | }; 44 | 45 | template 46 | T_type& 47 | unwrap(const std::reference_wrapper& v) 48 | { 49 | return v; 50 | } 51 | 52 | template 53 | const T_type& 54 | unwrap(const std::reference_wrapper& v) 55 | { 56 | return v; 57 | } 58 | 59 | } /* namespace sigc */ 60 | 61 | #endif /* SIGC_REFERENCE_WRAPPER_H */ 62 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/retype_return.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002 - 2016, The libsigc++ Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | */ 19 | #ifndef SIGC_RETYPE_RETURN_HPP 20 | #define SIGC_RETYPE_RETURN_HPP 21 | 22 | #include 23 | 24 | #endif /* SIGC_RETYPE_RETURN_HPP */ 25 | -------------------------------------------------------------------------------- /benchmark/lib/libsigcplusplus/sigc++/slot.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2002 - 2016, The libsigc++ Development Team 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Lesser General Public 5 | * License as published by the Free Software Foundation; either 6 | * version 2.1 of the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public 14 | * License along with this library. If not, see . 15 | */ 16 | #ifndef SIGC_SLOT_H 17 | #define SIGC_SLOT_H 18 | 19 | #include 20 | #endif /* SIGC_SLOT_H */ 21 | -------------------------------------------------------------------------------- /benchmark/lib/miguelmartin/Wink-Signals/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013-2014 Miguel Martin (miguel@miguel-martin.com) 2 | 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | 1. The origin of this software must not be misrepresented; 8 | you must not claim that you wrote the original software. 9 | If you use this software in a product, an acknowledgment 10 | in the product documentation would be appreciated but is not required. 11 | 12 | 2. Altered source versions must be plainly marked as such, 13 | and must not be misrepresented as being the original software. 14 | 15 | 3. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | -------------------------------------------------------------------------------- /benchmark/lib/miguelmartin/Wink-Signals/examples/Makefile: -------------------------------------------------------------------------------- 1 | CXX=c++ 2 | CXX_ARGS=-I ../ -std=c++11 3 | 4 | benchmark: 5 | @echo "Compiling benchmark..." 6 | @$(CXX) $(CXX_ARGS) -o benchmark -O3 7 | @echo "Running benchmark..." 8 | @./benchmark 9 | clean: 10 | rm ./benchmark 11 | -------------------------------------------------------------------------------- /benchmark/lib/mwthinker/Signal/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2014 Marcus Welander 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /benchmark/lib/mwthinker/Signal/README.md: -------------------------------------------------------------------------------- 1 | Signal 2 | ====== 3 | Is a simple Signal/Slot library inspired by the corresponding boost library. 4 | 5 | The compiler must support variadic template and support some parts of C++11 6 | standard. While using Visual Studio, it must be at least version 12 or higher. 7 | 8 |

Open source

9 | The project is under the MIT license (see LICENSE.txt). 10 | -------------------------------------------------------------------------------- /benchmark/lib/mwthinker/Signal/src/mw/signals/connection.cpp: -------------------------------------------------------------------------------- 1 | #include "connection.h" 2 | #include "signal.h" 3 | 4 | namespace mw { 5 | 6 | namespace signals { 7 | 8 | void Connection::disconnect() { 9 | if (connectionInfo_ && connectionInfo_->signal_ != nullptr) { 10 | connectionInfo_->signal_->disconnect(connectionInfo_->id_); 11 | } 12 | } 13 | 14 | bool Connection::connected() const { 15 | return connectionInfo_ && connectionInfo_->signal_ != nullptr; 16 | } 17 | 18 | Connection::Connection(const ConnectionInfoPtr& c) { 19 | connectionInfo_ = c; 20 | } 21 | 22 | } // Namespace signals. 23 | 24 | } // Namespace mw. 25 | -------------------------------------------------------------------------------- /benchmark/lib/palacaze/sigslot/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Pierre-Antoine Lacaze 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /benchmark/lib/supergrover/sigslot/README.md: -------------------------------------------------------------------------------- 1 | sigslot 2 | ======= 3 | 4 | C++11 signal/slot implementation 5 | 6 | ## Requirements ## 7 | * c++11 8 | 9 | ## How to use ## 10 | For a code sample, see test.cpp 11 | 12 | ``` 13 | class Emitter 14 | { 15 | public: 16 | Signal the_signal; 17 | 18 | void do_emit(int value) 19 | { 20 | the_signal.emit(value); 21 | } 22 | }; 23 | ``` 24 | 25 | The only thing required for a class to emit signals, is to declare a field of the Signal<> type. The template arguments will be the parameter types of the slots to be bound to the signal. 26 | 27 | ``` 28 | class Receiver: public Object 29 | { 30 | public: 31 | void slot(int v) 32 | { 33 | cout << "Yay! " << v << endl; 34 | } 35 | }; 36 | ``` 37 | 38 | The only thing required for a class to be able to bind to signals, is for it to derive from Object. After that, every method of the object can be bound to signals. 39 | 40 | ``` 41 | int main(int argc, char* argv[]) 42 | { 43 | // Create both an emitting and receiving instance 44 | Emitter em; 45 | Receiver recv; 46 | 47 | // Bind the slot to the signal 48 | em.the_signal.bind(&Receiver::slot, &recv); 49 | 50 | // Emit 51 | em.do_emit(42); 52 | 53 | return EXIT_SUCCESS; 54 | } 55 | ``` 56 | 57 | Here we instantiate both classes, bind the signal and emit it. 58 | 59 | 60 | ## Donations ## 61 | 62 | Like it? 63 | 64 | If you find this useful, please consider donating to BTC: 1Pck5gui4iXhTQUiUc3qFD7uPbj1cn5ZSB 65 | 66 | -------------------------------------------------------------------------------- /benchmark/lib/vdksoft/signals/doc/signals.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAvailableAlias/signal-slot-benchmarks/ae175d272f80faaaf75c594d9bfa4f3f4a382de1/benchmark/lib/vdksoft/signals/doc/signals.pdf -------------------------------------------------------------------------------- /tests/cpp/exited_with_code_stored.cpp: -------------------------------------------------------------------------------- 1 | #include "tests/hpp/exited_with_code_stored.hpp" 2 | 3 | #include 4 | 5 | exited_with_code_stored::exited_with_code_stored 6 | (int* exit_code) 7 | : m_expected_exit_code(*exit_code), 8 | m_actual_exit_code(exit_code) 9 | { 10 | 11 | } 12 | 13 | bool exited_with_code_stored::operator()(int exit_status) 14 | { 15 | # if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA 16 | 17 | *m_actual_exit_code = exit_code; 18 | return exit_status == m_expected_exit_code_; 19 | 20 | #else 21 | if (!WIFEXITED(exit_status)) 22 | return false; 23 | 24 | const int exit_code(WEXITSTATUS(exit_status)); 25 | *m_actual_exit_code = exit_code; 26 | 27 | return exit_code == m_expected_exit_code; 28 | #endif 29 | } 30 | -------------------------------------------------------------------------------- /tests/cpp/signal_traits_jls.cpp: -------------------------------------------------------------------------------- 1 | #include "tests/hpp/signal_traits_jls.hpp" 2 | 3 | std::unique_ptr> 4 | signal_traits_jls::m_signal_con_allocator; 5 | 6 | std::unique_ptr> 7 | signal_traits_jls::m_observer_con_allocator; 8 | -------------------------------------------------------------------------------- /tests/hpp/exited_with_code_stored.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class exited_with_code_stored 4 | { 5 | public: 6 | explicit exited_with_code_stored(int* exit_code); 7 | 8 | bool operator()(int exit_status); 9 | 10 | exited_with_code_stored& operator=(const exited_with_code_stored&) = delete; 11 | 12 | private: 13 | const int m_expected_exit_code; 14 | int* m_actual_exit_code; 15 | }; 16 | -------------------------------------------------------------------------------- /tests/hpp/fenced_typed_test.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "tests/hpp/exited_with_code_stored.hpp" 4 | 5 | #include 6 | 7 | #define FENCED_TYPED_TEST(test_suite, test_name, category, description, body) \ 8 | TYPED_TEST(test_suite, test_name) \ 9 | { \ 10 | this->test_description(category, description); \ 11 | \ 12 | auto test_runner \ 13 | ([this]() -> void \ 14 | { \ 15 | body \ 16 | }); \ 17 | \ 18 | int exit_code(0); \ 19 | EXPECT_EXIT \ 20 | (exit(this->run_forked_test(test_runner)), \ 21 | exited_with_code_stored(&exit_code), \ 22 | ""); \ 23 | \ 24 | this->store_result_from_exit_code(exit_code); \ 25 | } 26 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_asg.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct signal_traits_asg 6 | { 7 | static constexpr bool has_signal_empty_test = false; 8 | static constexpr bool has_connection_connected_test = true; 9 | static constexpr bool has_disconnect_all = true; 10 | static constexpr bool has_swap = true; 11 | static constexpr bool will_deadlock_if_recursively_modified = false; 12 | static constexpr bool is_intrusive = false; 13 | 14 | template 15 | using signal = Signal11::Signal; 16 | 17 | using connection = Signal11::ConnectionRef; 18 | 19 | static void initialize() {} 20 | static void terminate() {} 21 | 22 | template 23 | static connection connect(Signal& s, F&& f) 24 | { 25 | return s.connect(std::forward(f)); 26 | } 27 | 28 | template 29 | static void trigger(Signal& s, Args&&... args) 30 | { 31 | s.emit(std::forward(args)...); 32 | } 33 | 34 | static bool connected(const connection& c) 35 | { 36 | return c.isValid(); 37 | } 38 | 39 | template 40 | static void disconnect(Signal& s, connection& c) 41 | { 42 | c.disconnect(); 43 | } 44 | 45 | template 46 | static void disconnect_all_slots(Signal& s) 47 | { 48 | s = Signal(); 49 | } 50 | 51 | template 52 | static void swap(Signal& s1, Signal& s2) 53 | { 54 | std::swap(s1, s2); 55 | } 56 | }; 57 | 58 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_bs2.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct signal_traits_bs2 6 | { 7 | static constexpr bool has_signal_empty_test = true; 8 | static constexpr bool has_connection_connected_test = true; 9 | static constexpr bool has_disconnect_all = true; 10 | static constexpr bool has_swap = true; 11 | static constexpr bool will_deadlock_if_recursively_modified = false; 12 | static constexpr bool is_intrusive = false; 13 | 14 | template 15 | using signal = boost::signals2::signal; 16 | 17 | using connection = boost::signals2::connection; 18 | 19 | static void initialize() {} 20 | static void terminate() {} 21 | 22 | template 23 | static bool empty(Signal& s) 24 | { 25 | return s.empty(); 26 | } 27 | 28 | template 29 | static connection connect(Signal& s, F&& f) 30 | { 31 | return s.connect(std::forward(f)); 32 | } 33 | 34 | template 35 | static void trigger(Signal& s, Args&&... args) 36 | { 37 | s(std::forward(args)...); 38 | } 39 | 40 | static bool connected(const connection& c) 41 | { 42 | return c.connected(); 43 | } 44 | 45 | template 46 | static void disconnect(Signal& s, connection& c) 47 | { 48 | c.disconnect(); 49 | } 50 | 51 | template 52 | static void disconnect_all_slots(Signal& s) 53 | { 54 | s.disconnect_all_slots(); 55 | } 56 | 57 | template 58 | static void swap(Signal& s1, Signal& s2) 59 | { 60 | s1.swap(s2); 61 | } 62 | }; 63 | 64 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_bs2_st.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct signal_traits_bs2_st 6 | { 7 | static constexpr bool has_signal_empty_test = true; 8 | static constexpr bool has_connection_connected_test = true; 9 | static constexpr bool has_disconnect_all = true; 10 | static constexpr bool has_swap = true; 11 | static constexpr bool will_deadlock_if_recursively_modified = false; 12 | static constexpr bool is_intrusive = false; 13 | 14 | template 15 | using signal = 16 | typename boost::signals2::signal_type 17 | < 18 | Signature, 19 | boost::signals2::keywords::mutex_type 20 | >::type; 21 | 22 | using connection = boost::signals2::connection; 23 | 24 | static void initialize() {} 25 | static void terminate() {} 26 | 27 | template 28 | static bool empty(Signal& s) 29 | { 30 | return s.empty(); 31 | } 32 | 33 | template 34 | static connection connect(Signal& s, F&& f) 35 | { 36 | return s.connect(std::forward(f)); 37 | } 38 | 39 | template 40 | static void trigger(Signal& s, Args&&... args) 41 | { 42 | s(std::forward(args)...); 43 | } 44 | 45 | static bool connected(const connection& c) 46 | { 47 | return c.connected(); 48 | } 49 | 50 | template 51 | static void disconnect(Signal& s, connection& c) 52 | { 53 | c.disconnect(); 54 | } 55 | 56 | template 57 | static void disconnect_all_slots(Signal& s) 58 | { 59 | s.disconnect_all_slots(); 60 | } 61 | 62 | template 63 | static void swap(Signal& s1, Signal& s2) 64 | { 65 | s1.swap(s2); 66 | } 67 | }; 68 | 69 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_cls.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | struct signal_traits_cls 7 | { 8 | static constexpr bool has_signal_empty_test = false; 9 | static constexpr bool has_connection_connected_test = false; 10 | static constexpr bool has_disconnect_all = true; 11 | static constexpr bool has_swap = true; 12 | static constexpr bool will_deadlock_if_recursively_modified = true; 13 | static constexpr bool is_intrusive = false; 14 | 15 | template 16 | using signal = lsignal::signal; 17 | 18 | using connection = lsignal::slot; 19 | 20 | static void initialize() {} 21 | static void terminate() {} 22 | 23 | template 24 | static connection connect(Signal& s, F&& f) 25 | { 26 | connection result; 27 | s.connect(std::forward(f), &result); 28 | 29 | return result; 30 | } 31 | 32 | template 33 | static void trigger(Signal& s, Args&&... args) 34 | { 35 | s(std::forward(args)...); 36 | } 37 | 38 | template 39 | static void disconnect(Signal& s, connection& c) 40 | { 41 | c.disconnect(); 42 | } 43 | 44 | template 45 | static void disconnect_all_slots(Signal& s) 46 | { 47 | s.disconnect_all(); 48 | } 49 | 50 | template 51 | static void swap(Signal& s1, Signal& s2) 52 | { 53 | std::swap(s1, s2); 54 | } 55 | }; 56 | 57 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_dob.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | struct signal_traits_dob 7 | { 8 | static constexpr bool has_signal_empty_test = false; 9 | static constexpr bool has_connection_connected_test = true; 10 | static constexpr bool has_disconnect_all = true; 11 | static constexpr bool has_swap = true; 12 | static constexpr bool will_deadlock_if_recursively_modified = false; 13 | static constexpr bool is_intrusive = false; 14 | 15 | template 16 | using signal = obs::signal; 17 | 18 | using connection = obs::connection; 19 | 20 | static void initialize() {} 21 | static void terminate() {} 22 | 23 | template 24 | static connection connect(Signal& s, F&& f) 25 | { 26 | return s.connect(std::forward(f)); 27 | } 28 | 29 | template 30 | static void trigger(Signal& s, Args&&... args) 31 | { 32 | s(std::forward(args)...); 33 | } 34 | 35 | static bool connected(connection& c) 36 | { 37 | return c; 38 | } 39 | 40 | template 41 | static void disconnect(Signal& s, connection& c) 42 | { 43 | c.disconnect(); 44 | } 45 | 46 | template 47 | static void disconnect_all_slots(Signal& s) 48 | { 49 | s = Signal(); 50 | } 51 | 52 | template 53 | static void swap(Signal& s1, Signal& s2) 54 | { 55 | std::swap(s1, s2); 56 | } 57 | }; 58 | 59 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_evl.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | struct signal_traits_evl 8 | { 9 | static constexpr bool has_signal_empty_test = false; 10 | static constexpr bool has_connection_connected_test = true; 11 | static constexpr bool has_disconnect_all = true; 12 | static constexpr bool has_swap = true; 13 | static constexpr bool will_deadlock_if_recursively_modified = false; 14 | static constexpr bool is_intrusive = false; 15 | 16 | template 17 | using signal = obs::Subject; 18 | 19 | using connection = obs::Registration; 20 | 21 | static void initialize() {} 22 | static void terminate() {} 23 | 24 | template 25 | static connection connect(Signal& s, F&& f) 26 | { 27 | return s.registerObserver(std::forward(f)); 28 | } 29 | 30 | template 31 | static void trigger(Signal& s, Args&&... args) 32 | { 33 | s(std::forward(args)...); 34 | } 35 | 36 | static bool connected(connection& c) 37 | { 38 | return c != connection(); 39 | } 40 | 41 | template 42 | static void disconnect(Signal& s, connection& c) 43 | { 44 | assert(c.use_count() <= 1); 45 | c.reset(); 46 | } 47 | 48 | template 49 | static void disconnect_all_slots(Signal& s) 50 | { 51 | s = Signal(); 52 | } 53 | 54 | template 55 | static void swap(Signal& s1, Signal& s2) 56 | { 57 | std::swap(s1, s2); 58 | } 59 | }; 60 | 61 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_ics.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | struct signal_traits_ics 7 | { 8 | static constexpr bool has_signal_empty_test = true; 9 | static constexpr bool has_connection_connected_test = true; 10 | static constexpr bool has_disconnect_all = true; 11 | static constexpr bool has_swap = true; 12 | static constexpr bool will_deadlock_if_recursively_modified = false; 13 | static constexpr bool is_intrusive = false; 14 | 15 | template 16 | using signal = iscool::signals::signal; 17 | 18 | using connection = iscool::signals::connection; 19 | 20 | static void initialize() {} 21 | static void terminate() {} 22 | 23 | template 24 | static bool empty(Signal& s) 25 | { 26 | return s.empty(); 27 | } 28 | 29 | template 30 | static connection connect(Signal& s, F&& f) 31 | { 32 | return s.connect(std::forward(f)); 33 | } 34 | 35 | template 36 | static void trigger(Signal& s, Args&&... args) 37 | { 38 | s(std::forward(args)...); 39 | } 40 | 41 | static bool connected(const connection& c) 42 | { 43 | return c.connected(); 44 | } 45 | 46 | template 47 | static void disconnect(Signal& s, connection& c) 48 | { 49 | c.disconnect(); 50 | } 51 | 52 | template 53 | static void disconnect_all_slots(Signal& s) 54 | { 55 | s.disconnect_all_slots(); 56 | } 57 | 58 | template 59 | static void swap(Signal& s1, Signal& s2) 60 | { 61 | s1.swap(s2); 62 | } 63 | }; 64 | 65 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_ksc.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | struct signal_traits_ksc 8 | { 9 | static constexpr bool has_signal_empty_test = false; 10 | static constexpr bool has_connection_connected_test = true; 11 | static constexpr bool has_disconnect_all = true; 12 | static constexpr bool has_swap = true; 13 | static constexpr bool will_deadlock_if_recursively_modified = false; 14 | static constexpr bool is_intrusive = false; 15 | 16 | template 17 | using signal = sigs::signal; 18 | 19 | using connection = sigs::connection; 20 | 21 | static void initialize() {} 22 | static void terminate() {} 23 | 24 | template 25 | static connection connect(Signal& s, F&& f) 26 | { 27 | return s.connect(std::forward(f)); 28 | } 29 | 30 | template 31 | static void trigger(Signal& s, Args&&... args) 32 | { 33 | s.fire(std::forward(args)...); 34 | } 35 | 36 | static bool connected(const connection& c) 37 | { 38 | return c.connected(); 39 | } 40 | 41 | template 42 | static void disconnect(Signal& s, connection& c) 43 | { 44 | c.disconnect(); 45 | } 46 | 47 | template 48 | static void disconnect_all_slots(Signal& s) 49 | { 50 | s.disconnect_all(false); 51 | } 52 | 53 | template 54 | static void swap(Signal& s1, Signal& s2) 55 | { 56 | std::swap(s1, s2); 57 | } 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_lfs.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | struct signal_traits_lfs 7 | { 8 | static constexpr bool has_signal_empty_test = true; 9 | static constexpr bool has_connection_connected_test = true; 10 | static constexpr bool has_disconnect_all = true; 11 | static constexpr bool has_swap = true; 12 | static constexpr bool will_deadlock_if_recursively_modified = false; 13 | static constexpr bool is_intrusive = false; 14 | 15 | template 16 | using signal = is::signals::signal; 17 | 18 | using connection = is::signals::connection; 19 | 20 | static void initialize() {} 21 | static void terminate() {} 22 | 23 | template 24 | static bool empty(Signal& s) 25 | { 26 | return s.empty(); 27 | } 28 | 29 | template 30 | static connection connect(Signal& s, F&& f) 31 | { 32 | return s.connect(std::forward(f)); 33 | } 34 | 35 | template 36 | static void trigger(Signal& s, Args&&... args) 37 | { 38 | s(std::forward(args)...); 39 | } 40 | 41 | static bool connected(const connection& c) 42 | { 43 | return c.connected(); 44 | } 45 | 46 | template 47 | static void disconnect(Signal& s, connection& c) 48 | { 49 | c.disconnect(); 50 | } 51 | 52 | template 53 | static void disconnect_all_slots(Signal& s) 54 | { 55 | s.disconnect_all_slots(); 56 | } 57 | 58 | template 59 | static void swap(Signal& s1, Signal& s2) 60 | { 61 | s1.swap(s2); 62 | } 63 | }; 64 | 65 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_lss.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct signal_traits_lss 6 | { 7 | static constexpr bool has_signal_empty_test = true; 8 | static constexpr bool has_connection_connected_test = false; 9 | static constexpr bool has_disconnect_all = false; 10 | static constexpr bool has_swap = false; 11 | static constexpr bool will_deadlock_if_recursively_modified = false; 12 | static constexpr bool is_intrusive = false; 13 | 14 | template 15 | using signal = Simple::Signal; 16 | 17 | using connection = std::size_t; 18 | 19 | static void initialize() {} 20 | static void terminate() {} 21 | 22 | template 23 | static bool empty(Signal& s) 24 | { 25 | return s.size() == 0; 26 | } 27 | 28 | template 29 | static connection connect(Signal& s, F&& f) 30 | { 31 | return s.connect(std::forward(f)); 32 | } 33 | 34 | template 35 | static void trigger(Signal& s, Args&&... args) 36 | { 37 | s.emit(std::forward(args)...); 38 | } 39 | 40 | template 41 | static void disconnect(Signal& s, connection& c) 42 | { 43 | s.disconnect(c); 44 | } 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_mws.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | struct signal_traits_mws 8 | { 9 | static constexpr bool has_signal_empty_test = true; 10 | static constexpr bool has_connection_connected_test = true; 11 | static constexpr bool has_disconnect_all = true; 12 | static constexpr bool has_swap = false; 13 | static constexpr bool will_deadlock_if_recursively_modified = false; 14 | static constexpr bool is_intrusive = false; 15 | 16 | template 17 | struct resolve_signal; 18 | 19 | template 20 | struct resolve_signal 21 | { 22 | using type = mw::Signal; 23 | }; 24 | 25 | template 26 | using signal = typename resolve_signal::type; 27 | 28 | using connection = mw::signals::Connection; 29 | 30 | static void initialize() {} 31 | static void terminate() {} 32 | 33 | template 34 | static bool empty(Signal& s) 35 | { 36 | return s.size() == 0; 37 | } 38 | 39 | template 40 | static connection connect(mw::Signal& s, F&& f) 41 | { 42 | return s.connect(f); 43 | } 44 | 45 | template 46 | static void trigger(Signal& s, Args&&... args) 47 | { 48 | s(std::forward(args)...); 49 | } 50 | 51 | static bool connected(const connection& c) 52 | { 53 | return c.connected(); 54 | } 55 | 56 | template 57 | static void disconnect(Signal& s, connection& c) 58 | { 59 | c.disconnect(); 60 | } 61 | 62 | template 63 | static void disconnect_all_slots(Signal& s) 64 | { 65 | s.clear(); 66 | } 67 | }; 68 | 69 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_nod.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | struct signal_traits_nod 8 | { 9 | static constexpr bool has_signal_empty_test = true; 10 | static constexpr bool has_connection_connected_test = true; 11 | static constexpr bool has_disconnect_all = true; 12 | static constexpr bool has_swap = false; 13 | static constexpr bool will_deadlock_if_recursively_modified = false; 14 | static constexpr bool is_intrusive = false; 15 | 16 | template 17 | using signal = nod::signal; 18 | 19 | using connection = nod::connection; 20 | 21 | static void initialize() {} 22 | static void terminate() {} 23 | 24 | template 25 | static bool empty(Signal& s) 26 | { 27 | return s.empty(); 28 | } 29 | 30 | template 31 | static connection connect(Signal& s, F&& f) 32 | { 33 | return s.connect(std::forward(f)); 34 | } 35 | 36 | template 37 | static void trigger(Signal& s, Args&&... args) 38 | { 39 | s(std::forward(args)...); 40 | } 41 | 42 | static bool connected(const connection& c) 43 | { 44 | return c.connected(); 45 | } 46 | 47 | template 48 | static void disconnect(Signal& s, connection& c) 49 | { 50 | c.disconnect(); 51 | } 52 | 53 | template 54 | static void disconnect_all_slots(Signal& s) 55 | { 56 | s.disconnect_all_slots(); 57 | } 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_nod_st.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | struct signal_traits_nod_st 8 | { 9 | static constexpr bool has_signal_empty_test = true; 10 | static constexpr bool has_connection_connected_test = true; 11 | static constexpr bool has_disconnect_all = true; 12 | static constexpr bool has_swap = false; 13 | static constexpr bool will_deadlock_if_recursively_modified = false; 14 | static constexpr bool is_intrusive = false; 15 | 16 | template 17 | using signal = nod::unsafe_signal; 18 | 19 | using connection = nod::connection; 20 | 21 | static void initialize() {} 22 | static void terminate() {} 23 | 24 | template 25 | static bool empty(Signal& s) 26 | { 27 | return s.empty(); 28 | } 29 | 30 | template 31 | static connection connect(Signal& s, F&& f) 32 | { 33 | return s.connect(std::forward(f)); 34 | } 35 | 36 | template 37 | static void trigger(Signal& s, Args&&... args) 38 | { 39 | s(std::forward(args)...); 40 | } 41 | 42 | static bool connected(const connection& c) 43 | { 44 | return c.connected(); 45 | } 46 | 47 | template 48 | static void disconnect(Signal& s, connection& c) 49 | { 50 | c.disconnect(); 51 | } 52 | 53 | template 54 | static void disconnect_all_slots(Signal& s) 55 | { 56 | s.disconnect_all_slots(); 57 | } 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_pss.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | struct signal_traits_pss 9 | { 10 | static constexpr bool has_signal_empty_test = false; 11 | static constexpr bool has_connection_connected_test = true; 12 | static constexpr bool has_disconnect_all = true; 13 | static constexpr bool has_swap = true; 14 | static constexpr bool will_deadlock_if_recursively_modified = false; 15 | static constexpr bool is_intrusive = false; 16 | 17 | template 18 | struct resolve_signal; 19 | 20 | template 21 | struct resolve_signal 22 | { 23 | using type = sigslot::signal; 24 | }; 25 | 26 | template 27 | using signal = typename resolve_signal::type; 28 | 29 | using connection = sigslot::connection; 30 | 31 | static void initialize() {} 32 | static void terminate() {} 33 | 34 | template 35 | static connection connect(sigslot::signal& s, F&& f) 36 | { 37 | return s.connect(f); 38 | } 39 | 40 | template 41 | static void trigger(Signal& s, Args&&... args) 42 | { 43 | s(std::forward(args)...); 44 | } 45 | 46 | static bool connected(const connection& c) 47 | { 48 | return c.connected(); 49 | } 50 | 51 | template 52 | static void disconnect(Signal& s, connection& c) 53 | { 54 | c.disconnect(); 55 | } 56 | 57 | template 58 | static void disconnect_all_slots(Signal& s) 59 | { 60 | s.disconnect_all(); 61 | } 62 | 63 | template 64 | static void swap(Signal& s1, Signal& s2) 65 | { 66 | std::swap(s1, s2); 67 | } 68 | }; 69 | 70 | -------------------------------------------------------------------------------- /tests/hpp/signal_traits_pss_st.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | struct signal_traits_pss_st 9 | { 10 | static constexpr bool has_signal_empty_test = false; 11 | static constexpr bool has_connection_connected_test = true; 12 | static constexpr bool has_disconnect_all = true; 13 | static constexpr bool has_swap = true; 14 | static constexpr bool will_deadlock_if_recursively_modified = false; 15 | static constexpr bool is_intrusive = false; 16 | 17 | template 18 | struct resolve_signal; 19 | 20 | template 21 | struct resolve_signal 22 | { 23 | using type = sigslot::signal_st; 24 | }; 25 | 26 | template 27 | using signal = typename resolve_signal::type; 28 | 29 | using connection = sigslot::connection; 30 | 31 | static void initialize() {} 32 | static void terminate() {} 33 | 34 | template 35 | static connection connect(sigslot::signal_st& s, F&& f) 36 | { 37 | return s.connect(f); 38 | } 39 | 40 | template 41 | static void trigger(Signal& s, Args&&... args) 42 | { 43 | s(std::forward(args)...); 44 | } 45 | 46 | static bool connected(const connection& c) 47 | { 48 | return c.connected(); 49 | } 50 | 51 | template 52 | static void disconnect(Signal& s, connection& c) 53 | { 54 | c.disconnect(); 55 | } 56 | 57 | template 58 | static void disconnect_all_slots(Signal& s) 59 | { 60 | s.disconnect_all(); 61 | } 62 | 63 | template 64 | static void swap(Signal& s1, Signal& s2) 65 | { 66 | std::swap(s1, s2); 67 | } 68 | }; 69 | 70 | -------------------------------------------------------------------------------- /tests/hpp/test_non_template_base.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "tests/hpp/test_outcome.hpp" 7 | 8 | #include 9 | 10 | struct results_per_category; 11 | 12 | class test_non_template_base: 13 | public testing::Test 14 | { 15 | public: 16 | const std::optional& outcome() const; 17 | 18 | void store_test_result_success(); 19 | void store_test_result_failure(); 20 | void store_test_result_not_available(); 21 | void store_test_result_other_failure(); 22 | 23 | void store_library_tag(std::string tag); 24 | 25 | void test_description(std::string category, std::string description); 26 | 27 | void clear_test_result(); 28 | void commit_test_result(results_per_category& results) const; 29 | 30 | int run_forked_test(const std::function& f); 31 | 32 | void store_result_from_exit_code(int exit_code); 33 | 34 | private: 35 | void store_test_result(test_outcome outcome); 36 | 37 | private: 38 | std::string m_library_tag; 39 | std::string m_current_category; 40 | std::string m_current_description; 41 | std::optional m_current_outcome; 42 | 43 | static const constexpr int m_exit_code_guard = 200; 44 | }; 45 | -------------------------------------------------------------------------------- /tests/hpp/test_outcome.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class test_outcome 4 | { 5 | success, 6 | failure, 7 | not_available, 8 | other_failure 9 | }; 10 | -------------------------------------------------------------------------------- /tests/hpp/test_results.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "tests/hpp/test_outcome.hpp" 9 | 10 | struct test_results 11 | { 12 | std::vector descriptions; 13 | std::map> outcomes; 14 | }; 15 | 16 | struct results_per_category 17 | { 18 | std::map category_to_results; 19 | }; 20 | 21 | void output_results(std::ostream& output, const results_per_category& results); 22 | --------------------------------------------------------------------------------