libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG > Class Template Reference

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>

Inheritance diagram for jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >:
[legend]
Collaboration diagram for jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >:
[legend]

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_typeno_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_traitswork_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_typedeleter_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_typedeleter_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
 

Additional Inherited Members

- Public Attributes inherited from jmmcg::intrusive::node_details_itf< OST::lock_traits >
atomic_ptr_t next
 
- Static Public Attributes inherited from jmmcg::ppd::private_::closure::thread_wk_async_t< generic_traits::return_data::joinable, OST, Del, AtCtr, CFG >
static constexpr generic_traits::return_data result_traits_ =generic_traits::return_data::joinable
 
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 
- Static Public Attributes inherited from jmmcg::sp_counter_itf_type< long >
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 
- Static Public Attributes inherited from jmmcg::sp_counter_type< long, thread_wk_base< OST, CFG >::lock_traits, Del, AtCtr >
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 
- Protected Member Functions inherited from jmmcg::ppd::private_::closure::thread_wk_async_t< generic_traits::return_data::joinable, OST, Del, AtCtr, CFG >
 ~thread_wk_async_t () noexcept(true) FORCE_INLINE
 
- Protected Member Functions inherited from jmmcg::ppd::private_::closure::thread_wk_base< OST, CFG >
constexpr thread_wk_base () noexcept(true) FORCE_INLINE
 
- Protected Member Functions inherited from jmmcg::intrusive::node_details_itf< OST::lock_traits >
 node_details_itf () noexcept(true) FORCE_INLINE
 
- Protected Member Functions inherited from jmmcg::sp_counter_itf_type< long >
constexpr sp_counter_itf_type () noexcept(true)
 
- Protected Member Functions inherited from jmmcg::sp_counter_type< long, thread_wk_base< OST, CFG >::lock_traits, Del, AtCtr >
constexpr sp_counter_type () noexcept(true)
 

Detailed Description

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
class jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >

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.

Member Typedef Documentation

◆ base_t

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

◆ cfg_details_type

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

◆ cfg_type

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

◆ closure_t

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

◆ lock_traits

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

◆ os_traits

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

◆ work_complete_t

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
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.

Constructor & Destructor Documentation

◆ algo_thread_wk()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
__stdcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::algo_thread_wk ( work_complete_t w,
typename closure_t::argument_type &&  tw,
typename cfg_details_type::params const &  p 
)
inline

Definition at line 847 of file thread_work_closure.hpp.

◆ ~algo_thread_wk()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::~algo_thread_wk ( )
inlinenoexcept

Definition at line 851 of file thread_work_closure.hpp.

Member Function Documentation

◆ closure() [1/2]

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
const closure_t& __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::closure ( ) const
inlinenoexcept

Definition at line 863 of file thread_work_closure.hpp.

◆ closure() [2/2]

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
closure_t& __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::closure ( )
inlinenoexcept

Definition at line 860 of file thread_work_closure.hpp.

◆ exception_thrown_in_thread()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
const os_traits::thread_exception& __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::exception_thrown_in_thread ( ) const
inlineoverridevirtualnoexcept

◆ operator<() [1/2]

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
bool __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::operator< ( algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG > const &  ctw) const
inlinenoexcept

Definition at line 856 of file thread_work_closure.hpp.

◆ operator<() [2/2]

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
bool jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::operator< ( typename base_t::base_t const &  cw) const
inlineoverridenoexcept

Definition at line 853 of file thread_work_closure.hpp.

◆ process_joinable()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
void __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::process_joinable ( typename cfg_type::node_property_t::value_type const  e_details)
inlineoverridevirtualnoexcept

◆ process_nonjoinable()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
void __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::process_nonjoinable ( typename cfg_type::node_property_t::value_type const  e_details)
inlineoverridevirtualnoexcept

◆ resize_output()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
void jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::resize_output ( typename work_complete_t::containers_type::size_type const  out_colln_size)
inlinenoexcept

Definition at line 899 of file thread_work_closure.hpp.

◆ throw_any_exception()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
void jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::throw_any_exception ( ) const
inlineoverridevirtualnoexcept

◆ to_string()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
tstring __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::to_string ( ) const
inlineoverridevirtualnoexcept

◆ update_edge()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
void jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::update_edge ( typename cfg_type::node_property_t::value_type const  e_details)
inlineoverridevirtualnoexcept

◆ work_complete()

template<typename OST, class ThrW, class WFlg, template< class > class Del, template< class > class AtCtr, class CFG>
work_complete_t* __fastcall jmmcg::ppd::private_::closure::algo_thread_wk< OST, ThrW, WFlg, Del, AtCtr, CFG >::work_complete ( )
inlinefinaloverridevirtualnoexcept

The documentation for this class was generated from the following file: