libjmmcg
build_2783
A C++ library containing an eclectic mix of useful, advanced components.
|
With this class, the user can explicity join with the transferred closure_base-derived closure returned from a parallel algorithm, but only via the execution_context, created via the appropriate thread_pool derived from thread_pool_type. More...
#include <thread_work_closure.hpp>
Public Types | |
typedef thread_wk_async_t< generic_traits::return_data::joinable, OST, Del, AtCtr, CFG > | base_t |
typedef base_t::os_traits | os_traits |
typedef base_t::lock_traits | lock_traits |
typedef base_t::cfg_type | cfg_type |
typedef base_t::cfg_details_type | cfg_details_type |
typedef WFlg | work_complete_t |
This atomic object is the object that is used to signal to a waiting future that the work has been completed. More... | |
typedef ThrW | closure_t |
This is the binding of the input data to the mutator, with a representation of the output type. i.e. a closure. More... | |
Public Types inherited from jmmcg::ppd::private_::closure::thread_wk_async_t< generic_traits::return_data::joinable, OST, Del, AtCtr, CFG > | |
typedef thread_wk_base< OST, CFG > | base_t |
typedef base_t::os_traits | os_traits |
typedef base_t::lock_traits | lock_traits |
typedef base_t::work_complete_t | work_complete_t |
typedef sp_counter_type< long, typename base_t::lock_traits, Del, AtCtr > | counter_type |
typedef counter_type::atomic_ctr_t | atomic_ctr_t |
typedef counter_type::deleter_t | deleter_t |
typedef lock_traits::template noop_atomic_ctr< typename atomic_ctr_t::value_type > | no_ref_counting |
typedef noop_dtor< typename deleter_t::element_type > | no_deletion |
Public Types inherited from jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG > | |
typedef intrusive::node_details_itf< typename OST::lock_traits > | base_t |
typedef OST | os_traits |
typedef os_traits::lock_traits | lock_traits |
typedef input_t::cfg_type | cfg_type |
typedef input_t::cfg_details_type | cfg_details_type |
typedef lock::lockable_settable< lock_traits > | work_complete_t |
This atomic object is the object that is used to signal to a waiting future that the work has been completed. More... | |
Public Types inherited from jmmcg::intrusive::node_details_itf< OST::lock_traits > | |
using | base_t = sp_counter_itf_type< long > |
using | lock_traits = OST::lock_traits |
using | atomic_ctr_t = base_t |
using | atomic_ptr_t = typename lock_traits::template atomic< node_details_itf * > |
Public Types inherited from jmmcg::sp_counter_itf_type< long > | |
typedef long | value_type |
typedef jmmcg::default_delete< sp_counter_itf_type > | deleter_t |
The default deletion method for objects that inherit from this intrusively-counted type, which is just heap-deletion, if the objects are heap-allocated. More... | |
Public Types inherited from jmmcg::sp_counter_type< long, thread_wk_base< OST, CFG >::lock_traits, Del, AtCtr > | |
using | base_t = sp_counter_itf_type< long > |
using | value_type = typename base_t::value_type |
using | atomic_ctr_t = AtCtr< value_type > |
using | lock_traits = thread_wk_base< OST, CFG >::lock_traits |
typedef Del< sp_counter_type > | deleter_t |
Make sure the correct object deletion mechanism is used. More... | |
Public Member Functions | |
__stdcall | algo_thread_wk (work_complete_t &w, typename closure_t::argument_type &&tw, typename cfg_details_type::params const &p) FORCE_INLINE |
~algo_thread_wk () noexcept(true) FORCE_INLINE | |
bool | operator< (typename base_t::base_t const &cw) const noexcept(true) override FORCE_INLINE |
bool __fastcall | operator< (algo_thread_wk const &ctw) const noexcept(true) FORCE_INLINE |
closure_t &__fastcall | closure () noexcept(true) FORCE_INLINE |
const closure_t &__fastcall | closure () const noexcept(true) FORCE_INLINE |
const os_traits::thread_exception &__fastcall | exception_thrown_in_thread () const noexcept(true) override FORCE_INLINE |
void | throw_any_exception () const noexcept(false) override FORCE_INLINE |
work_complete_t *__fastcall | work_complete () noexcept(true) final override FORCE_INLINE |
void | update_edge (typename cfg_type::node_property_t::value_type const e_details) noexcept(false) override FORCE_INLINE |
void __fastcall | process_joinable (typename cfg_type::node_property_t::value_type const e_details) noexcept(false) override FORCE_INLINE |
void __fastcall | process_nonjoinable (typename cfg_type::node_property_t::value_type const e_details) noexcept(false) override FORCE_INLINE |
void | resize_output (typename work_complete_t::containers_type::size_type const out_colln_size) noexcept(false) FORCE_INLINE |
tstring __fastcall | to_string () const noexcept(false) override |
Public Member Functions inherited from jmmcg::ppd::private_::closure::thread_wk_async_t< generic_traits::return_data::joinable, OST, Del, AtCtr, CFG > | |
constexpr generic_traits::return_data __fastcall | result_traits () const noexcept(true) override FORCE_INLINE |
Public Member Functions inherited from jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG > | |
thread_wk_base (thread_wk_base const &)=delete | |
virtual | ~thread_wk_base () noexcept(true) FORCE_INLINE |
virtual bool __fastcall | operator< (thread_wk_base const &) const noexcept(true)=0 |
The default ordering of core_work in the pool_aspect::work_queue_type is based upon the weak order of the work to be mutated. More... | |
bool __fastcall | operator== (thread_wk_base const &ctw) const noexcept(true) FORCE_INLINE |
Public Member Functions inherited from jmmcg::intrusive::node_details_itf< OST::lock_traits > | |
virtual | ~node_details_itf () noexcept(true) FORCE_INLINE |
Public Member Functions inherited from jmmcg::sp_counter_itf_type< long > | |
virtual | ~sp_counter_itf_type () |
virtual value_type | sp_count () const noexcept(true) |
virtual value_type | sp_acquire () noexcept(true) |
virtual bool | sp_release () noexcept(true) |
virtual bool | sp_noop_ctr () const noexcept(true) |
virtual bool __fastcall | operator< (const value_type) const noexcept(true) |
virtual bool __fastcall | operator> (const value_type) const noexcept(true) |
virtual bool __fastcall | operator>= (const value_type) const noexcept(true) |
constexpr bool FORCE_INLINE | operator== (const value_type v) const noexcept(true) |
virtual void | deleter () |
Call the correct deleter_t object to delete the object. More... | |
virtual tstring | sp_to_string () const noexcept(false) |
Public Member Functions inherited from jmmcg::sp_counter_type< long, thread_wk_base< OST, CFG >::lock_traits, Del, AtCtr > | |
virtual | ~sp_counter_type () noexcept(true)=default |
void | deleter () override |
Call the correct deleter_t object to delete the object. More... | |
value_type | sp_count () const noexcept(true) override final |
atomic_ctr_t::value_type | sp_acquire () noexcept(true) override final |
bool | sp_release () noexcept(true) override final |
bool __fastcall | operator< (const value_type v) const noexcept(true) override |
bool __fastcall | operator> (const value_type v) const noexcept(true) override |
bool __fastcall | operator>= (const value_type v) const noexcept(true) override final |
tstring | sp_to_string () const noexcept(false) override final |
With this class, the user can explicity join with the transferred closure_base-derived closure returned from a parallel algorithm, but only via the execution_context, created via the appropriate thread_pool derived from thread_pool_type.
Definition at line 832 of file thread_work_closure.hpp.
typedef thread_wk_async_t<generic_traits::return_data::joinable, OST, Del, AtCtr, CFG> jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::base_t |
Definition at line 834 of file thread_work_closure.hpp.
typedef base_t::cfg_details_type jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::cfg_details_type |
Definition at line 838 of file thread_work_closure.hpp.
typedef base_t::cfg_type jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::cfg_type |
Definition at line 837 of file thread_work_closure.hpp.
typedef ThrW jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::closure_t |
This is the binding of the input data to the mutator, with a representation of the output type. i.e. a closure.
We don't directly contain the argument_type in closure_t because we need to be able to perform operator<() on potentially different objects for supporting pool_traits::prioritised_queue, so we need a hierarchy to allow this.
Definition at line 845 of file thread_work_closure.hpp.
typedef base_t::lock_traits jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::lock_traits |
Definition at line 836 of file thread_work_closure.hpp.
typedef base_t::os_traits jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::os_traits |
Definition at line 835 of file thread_work_closure.hpp.
typedef WFlg jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::work_complete_t |
This atomic object is the object that is used to signal to a waiting future that the work has been completed.
Definition at line 840 of file thread_work_closure.hpp.
|
inline |
Definition at line 847 of file thread_work_closure.hpp.
|
inlinenoexcept |
Definition at line 851 of file thread_work_closure.hpp.
|
inlinenoexcept |
Definition at line 863 of file thread_work_closure.hpp.
|
inlinenoexcept |
Definition at line 860 of file thread_work_closure.hpp.
|
inlineoverridevirtualnoexcept |
Definition at line 867 of file thread_work_closure.hpp.
|
inlinenoexcept |
Definition at line 856 of file thread_work_closure.hpp.
|
inlineoverridenoexcept |
Definition at line 853 of file thread_work_closure.hpp.
|
inlineoverridevirtualnoexcept |
Implements jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG >.
Definition at line 879 of file thread_work_closure.hpp.
|
inlineoverridevirtualnoexcept |
Implements jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG >.
Definition at line 894 of file thread_work_closure.hpp.
|
inlinenoexcept |
Definition at line 899 of file thread_work_closure.hpp.
|
inlineoverridevirtualnoexcept |
Definition at line 870 of file thread_work_closure.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from jmmcg::ppd::private_::closure::thread_wk_async_t< generic_traits::return_data::joinable, OST, Del, AtCtr, CFG >.
Reimplemented in jmmcg::ppd::private_::closure::algo_thread_wk_buffered< OST, ThrW, WFlg, SubDivAlgWk, Del, AtCtr, CFG >.
Definition at line 903 of file thread_work_closure.hpp.
|
inlineoverridevirtualnoexcept |
Implements jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG >.
Definition at line 876 of file thread_work_closure.hpp.
|
inlinefinaloverridevirtualnoexcept |
Reimplemented from jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG >.
Definition at line 873 of file thread_work_closure.hpp.