libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk > Class Template Reference

Enforce a sequential-consistency memory-model on the result data that this object manages, via the accessors to the result data. More...

#include <thread_client_context.hpp>

Inheritance diagram for jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >:
[legend]
Collaboration diagram for jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >:
[legend]

Public Types

typedef GenWk gen_wk_t
 
typedef eraseable_execution_context_base< typename gen_wk_t::thread_pool_type, noop_dtor, gen_wk_t::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr > base_t
 
typedef base_t::thread_pool_type thread_pool_type
 
typedef base_t::pool_traits_type pool_traits_type
 
typedef base_t::os_traits os_traits
 
typedef base_t::pool_type pool_type
 
typedef base_t::atomic_t atomic_t
 
typedef base_t::exception_type exception_type
 
typedef thread_pool_type::template create_direct< Wk > creator_t
 
typedef creator_t::result_type result_type
 
typedef stack_exec_ctx_helper::thread_wk_t thread_wk_t
 
typedef thread_wk_t::work_complete_t work_complete_t
 
- Public Types inherited from jmmcg::ppd::private_::eraseable_execution_context_base< GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
typedef horizontal_execution_itf< generic_traits::return_data::joinable, GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr > base_t
 
typedef base_t::thread_pool_type thread_pool_type
 
typedef base_t::pool_traits_type pool_traits_type
 The pool traits. More...
 
typedef base_t::os_traits os_traits
 
typedef base_t::pool_type pool_type
 
typedef base_t::atomic_t atomic_t
 
typedef base_t::exception_type exception_type
 
typedef base_t::thread_wk_t thread_wk_t
 
using signalled_work_queue_type = typename pool_traits_type::template signalled_work_queue_type< typename thread_pool_type::work_distribution_mode::queue_model >
 
- Public Types inherited from jmmcg::ppd::private_::horizontal_execution_itf< generic_traits::return_data::joinable, GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
typedef GenWk::thread_pool_type thread_pool_type
 
typedef thread_pool_type::pool_traits_type pool_traits_type
 The pool traits. More...
 
typedef thread_pool_type::os_traits os_traits
 
typedef thread_pool_type::pool_type pool_type
 
typedef os_traits::lock_traits::anon_event_type atomic_t
 
typedef os_traits::exception_type exception_type
 
typedef closure::thread_wk_async_t< RD, os_traits, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr, typename pool_traits_type::cfg_type > thread_wk_t
 
typedef thread_wk_t::work_complete_t 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 Member Functions

 execution_context_algo_buff_stack_type (thread_pool_type &pool, typename thread_wk_t::cfg_details_type::params const &p, typename thread_wk_t::closure_t::argument_type &&tw, typename work_complete_t::num_tasks_spawned_t::value_type const i, typename work_complete_t::containers_type const &c, const typename thread_pool_type::pool_type::size_type cliques, const unsigned short default_num_subranges) noexcept(false) FORCE_INLINE
 
 execution_context_algo_buff_stack_type (thread_pool_type &pool, typename thread_wk_t::cfg_details_type::params const &p, typename thread_wk_t::closure_t::argument_type &&tw, typename work_complete_t::num_tasks_spawned_t::value_type const i, typename work_complete_t::containers_type const &c, const typename thread_pool_type::pool_type::size_type cliques, const unsigned short default_num_subranges, typename work_complete_t::containers_type::size_type const out_colln_size) noexcept(false) FORCE_INLINE
 
 execution_context_algo_buff_stack_type (execution_context_algo_buff_stack_type const &)
 
 execution_context_algo_buff_stack_type (execution_context_algo_buff_stack_type &&)
 
 ~execution_context_algo_buff_stack_type () noexcept(false) FORCE_INLINE
 
void operator& ()=delete
 Can't automatically convert to a base-class address automatically - to maintain the concept that this is a stack allocated object. More...
 
template<class T >
 operator T () const =delete
 Attempt to remove the ability to subvert the safety by incorrectly casting the execution_context. More...
 
template<class T >
 operator T ()=delete
 Attempt to remove the ability to subvert the safety by incorrectly casting the execution_context. More...
 
void operator= (execution_context_algo_buff_stack_type const &)=delete
 
void operator= (execution_context_algo_buff_stack_type &&)=delete
 
dereference_ops::const_ref_result_type __fastcall operator* () const noexcept(false) FORCE_INLINE
 A (potentially blocking) access to the results, but only after they are written. More...
 
dereference_ops::ref_result_type __fastcall operator* () noexcept(false) FORCE_INLINE
 A (potentially blocking) access to the results, but only after they are written. More...
 
dereference_ops::const_addr_result_type __fastcall operator-> () const noexcept(false) FORCE_INLINE
 A (potentially blocking) access to the results, but only after they are written, or process other work from the signalled_work_queue or batch whilst wait for the core_work to be processed. More...
 
dereference_ops::addr_result_type __fastcall operator-> () noexcept(false) FORCE_INLINE
 A (potentially blocking) access to the results, but only after they are written, or process other work from the signalled_work_queue or batch whilst wait for the core_work to be processed. More...
 
const execution_context_algo_buff_stack_type *__fastcall operator& () const noexcept(true) override FORCE_INLINE
 Ensure that if an execution context is passed to another function, only a constant version may be passed. More...
 
- Public Member Functions inherited from jmmcg::ppd::private_::eraseable_execution_context_base< GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
bool __fastcall erase () noexcept(false) FORCE_INLINE
 Erase the thread_wk_t item from the queue in the thread_pool, if it is still in there. More...
 
- Public Member Functions inherited from jmmcg::ppd::private_::horizontal_execution_itf< generic_traits::return_data::joinable, GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
 horizontal_execution_itf (horizontal_execution_itf const &)=delete
 

Static Public Attributes

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::ppd::private_::eraseable_execution_context_base< GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 
- Static Public Attributes inherited from jmmcg::ppd::private_::horizontal_execution_itf< generic_traits::return_data::joinable, GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
static constexpr generic_traits::return_data result_traits_
 
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 

Protected Member Functions

const thread_wk_t &__fastcall core_work () const noexcept(true) final override FORCE_INLINE
 
work_complete_t &__fastcall work_complete () noexcept(true) final override FORCE_INLINE
 
work_complete_t &__fastcall work_complete () const noexcept(true) final override FORCE_INLINE
 
- Protected Member Functions inherited from jmmcg::ppd::private_::eraseable_execution_context_base< GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
 eraseable_execution_context_base () noexcept(false) FORCE_INLINE
 
 ~eraseable_execution_context_base () noexcept(false) FORCE_INLINE
 Can't be used polymorphically - to maintain the concept that this is a stack allocated object. More...
 
const signalled_work_queue_type::value_type &__fastcall wk_queue_item () const noexcept(true)=delete
 A counted reference to the item of work that has been transferred to the pool for execution. More...
 
signalled_work_queue_type::value_type &__fastcall wk_queue_item () noexcept(true)=delete
 A counted reference to the item of work that has been transferred to the pool for execution. More...
 
bool __fastcall has_work () const noexcept(true) FORCE_INLINE
 
- Protected Member Functions inherited from jmmcg::ppd::private_::horizontal_execution_itf< generic_traits::return_data::joinable, GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >
constexpr horizontal_execution_itf () noexcept(true) FORCE_INLINE
 
 ~horizontal_execution_itf () noexcept(true) FORCE_INLINE
 Can't be used polymorphically - to maintain the concept that this is a stack allocated object. More...
 
bool __fastcall work_done () const noexcept(true) FORCE_INLINE
 Check to see if the work has been completed. More...
 
virtual void __fastcall wait_or_horizontal_thread () const noexcept(false) FORCE_INLINE
 

Protected Attributes

work_complete_t work_complete_
 
thread_wk_t core_work_
 

Friends

template<class ExCxt >
class call_push_back
 

Detailed Description

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk, class Wk, template< class > class Deref, template< class > class InitCoreWk>
class jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >

Enforce a sequential-consistency memory-model on the result data that this object manages, via the accessors to the result data.

The execution_context stores the thread_wk_t inside it, so it is allocated on the stack, not on the heap, which is only useful for classic, joinable, data-flow operations. This optimisation saves allocating the thread_wk_t on the heap, and also the shared_ptr in it can have a dummy sp_counter_type, noop_atomic_ctr, because the counter doesn't do anything, for a greater saving on atomic operations. No horizontal threading is done in this specialisation, because a master thread distributes the work.

Todo:
Add an extra template parameter to supply modifiable functionality to operator*() & operator->(), with a no-op default. Then accumulate, count & find may use this class.
See also
horizontal_execution

Definition at line 1396 of file thread_client_context.hpp.

Member Typedef Documentation

◆ atomic_t

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef base_t::atomic_t jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::atomic_t

Definition at line 1404 of file thread_client_context.hpp.

◆ base_t

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef eraseable_execution_context_base<typename gen_wk_t::thread_pool_type, noop_dtor, gen_wk_t::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr> jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::base_t

Definition at line 1399 of file thread_client_context.hpp.

◆ creator_t

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef thread_pool_type::template create_direct<Wk> jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::creator_t

Definition at line 1406 of file thread_client_context.hpp.

◆ exception_type

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef base_t::exception_type jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::exception_type

Definition at line 1405 of file thread_client_context.hpp.

◆ gen_wk_t

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef GenWk jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::gen_wk_t

Definition at line 1398 of file thread_client_context.hpp.

◆ os_traits

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef base_t::os_traits jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::os_traits

Definition at line 1402 of file thread_client_context.hpp.

◆ pool_traits_type

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef base_t::pool_traits_type jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::pool_traits_type

Definition at line 1401 of file thread_client_context.hpp.

◆ pool_type

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef base_t::pool_type jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::pool_type

Definition at line 1403 of file thread_client_context.hpp.

◆ result_type

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef creator_t::result_type jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::result_type

Definition at line 1407 of file thread_client_context.hpp.

◆ thread_pool_type

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef base_t::thread_pool_type jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::thread_pool_type

Definition at line 1400 of file thread_client_context.hpp.

◆ thread_wk_t

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef stack_exec_ctx_helper::thread_wk_t jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::thread_wk_t

Definition at line 1454 of file thread_client_context.hpp.

◆ work_complete_t

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
typedef thread_wk_t::work_complete_t jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::work_complete_t

Definition at line 1455 of file thread_client_context.hpp.

Constructor & Destructor Documentation

◆ execution_context_algo_buff_stack_type() [1/4]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::execution_context_algo_buff_stack_type ( thread_pool_type pool,
typename thread_wk_t::cfg_details_type::params const &  p,
typename thread_wk_t::closure_t::argument_type &&  tw,
typename work_complete_t::num_tasks_spawned_t::value_type const  i,
typename work_complete_t::containers_type const &  c,
const typename thread_pool_type::pool_type::size_type  cliques,
const unsigned short  default_num_subranges 
)
inlinenoexcept

Definition at line 1468 of file thread_client_context.hpp.

◆ execution_context_algo_buff_stack_type() [2/4]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::execution_context_algo_buff_stack_type ( thread_pool_type pool,
typename thread_wk_t::cfg_details_type::params const &  p,
typename thread_wk_t::closure_t::argument_type &&  tw,
typename work_complete_t::num_tasks_spawned_t::value_type const  i,
typename work_complete_t::containers_type const &  c,
const typename thread_pool_type::pool_type::size_type  cliques,
const unsigned short  default_num_subranges,
typename work_complete_t::containers_type::size_type const  out_colln_size 
)
inlinenoexcept

◆ execution_context_algo_buff_stack_type() [3/4]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::execution_context_algo_buff_stack_type ( execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk > const &  )

This needs to be declared, to be standards compliant, but needn't be defined, as cctor elision doesn't require the definition.

◆ execution_context_algo_buff_stack_type() [4/4]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::execution_context_algo_buff_stack_type ( execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk > &&  )

◆ ~execution_context_algo_buff_stack_type()

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::~execution_context_algo_buff_stack_type ( )
inlinenoexcept

In case the user didn't specifically call wait(), operator*() or operator->() for some reason, throw any registered exception. (I don't throw the exception in the thread's destructor in the thread pool, as this is too late, and makes evil memory leaks in the thread pool destructor.)

Definition at line 1497 of file thread_client_context.hpp.

Member Function Documentation

◆ core_work()

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
const thread_wk_t& __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::core_work ( ) const
inlinefinaloverrideprotectedvirtualnoexcept

◆ operator T() [1/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
template<class T >
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator T ( ) const
delete

Attempt to remove the ability to subvert the safety by incorrectly casting the execution_context.

◆ operator T() [2/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
template<class T >
jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator T ( )
delete

Attempt to remove the ability to subvert the safety by incorrectly casting the execution_context.

◆ operator&() [1/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
const execution_context_algo_buff_stack_type* __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator& ( ) const
inlineoverridevirtualnoexcept

Ensure that if an execution context is passed to another function, only a constant version may be passed.

This function allows read access to the results, but only after the other thread has written, thus implying a sequential ordering of memory operations by the current thread. i.e. only one thread can write to the results, but many can read. Because multiple read operations do not require locking with respect to each other. Note that if the results are accessed, then that call will block, as necessary, until the results are written, thus ensuring that all reads follow any writes to the contained data.

Implements jmmcg::ppd::private_::eraseable_execution_context_base< GenWk::thread_pool_type, noop_dtor, GenWk::thread_pool_type::os_traits::lock_traits::template noop_atomic_ctr >.

Definition at line 1553 of file thread_client_context.hpp.

References jmmcg::ppd::private_::priority_t< joinable_t, TPB, Pri >::operator<<().

◆ operator&() [2/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
void jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator& ( )
delete

Can't automatically convert to a base-class address automatically - to maintain the concept that this is a stack allocated object.

◆ operator*() [1/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
dereference_ops::const_ref_result_type __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator* ( ) const
inlinenoexcept

A (potentially blocking) access to the results, but only after they are written.

Obtain the results of the mutation of the input work. Note that this is a potentially blocking call: it will return only when the mutation has been signalled as completed. i.e. the work has been transferred, joinably to the pool, then executed, and not erased beforehand. Also note that this may throw an exception of the type specified by any of the exception specifications that may have been used when transferring the work to the pool. This function allows read access to the results, but only after the other thread has written, thus implying a sequential ordering of memory operations. Throws if the work has been previously erased.

See also
work_done()

Definition at line 1517 of file thread_client_context.hpp.

References jmmcg::ppd::private_::priority_t< joinable_t, TPB, Pri >::operator<<().

◆ operator*() [2/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
dereference_ops::ref_result_type __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator* ( )
inlinenoexcept

A (potentially blocking) access to the results, but only after they are written.

Obtain the results of the mutation of the input work. Note that this is a potentially blocking call: it will return only when the mutation has been signalled as completed. i.e. the work has been transferred, joinably to the pool, then executed, and not erased beforehand. Also note that this may throw an exception of the type specified by any of the exception specifications that may have been used when transferring the work to the pool. This function allows write access to the results (in the current stack-frame, i.e. thread), but only after the other thread has written, thus implying a sequential ordering of memory operations by the current thread. Throws if the work has been previously erased.

See also
work_done()

Definition at line 1526 of file thread_client_context.hpp.

◆ operator->() [1/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
dereference_ops::const_addr_result_type __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator-> ( ) const
inlinenoexcept

A (potentially blocking) access to the results, but only after they are written, or process other work from the signalled_work_queue or batch whilst wait for the core_work to be processed.

Obtain the results of the mutation of the input work. Note that this is a potentially blocking call: it will return only when the mutation has been signalled as completed. i.e. the work has been transferred, joinably to the pool, then executed, and not erased beforehand. Also note that this may throw an exception of the type specified by any of the exception specifications that may have been used when transferring the work to the pool. This function allows read access to the results, but only after the other thread has written, thus implying a sequential ordering of memory operations by the current thread. (This operator has been provided to allow chaining of "operator->()"s by the compiler.) Throws if the work has been previously erased.

See also
work_done(), get_results(), wait_or_horizontal_thread(), pool::batch_details

Definition at line 1536 of file thread_client_context.hpp.

References jmmcg::ppd::private_::priority_t< joinable_t, TPB, Pri >::operator<<().

◆ operator->() [2/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
dereference_ops::addr_result_type __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator-> ( )
inlinenoexcept

A (potentially blocking) access to the results, but only after they are written, or process other work from the signalled_work_queue or batch whilst wait for the core_work to be processed.

Obtain the results of the mutation of the input work. Note that this is a potentially blocking call: it will return only when the mutation has been signalled as completed. i.e. the work has been transferred, joinably to the pool, then executed, and not erased beforehand. Also note that this may throw an exception of the type specified by any of the exception specifications that may have been used when transferring the work to the pool. This function allows write access to the results (in the current stack-frame, i.e. thread), but only after the other thread has written, thus implying a sequential ordering of memory operations by the current thread. (This operator has been provided to allow chaining of "operator->()"s by the compiler.) Throws if the work has been previously erased.

See also
work_done(), get_results(), wait_or_horizontal_thread(), pool::batch_details

Definition at line 1545 of file thread_client_context.hpp.

◆ operator=() [1/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
void jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator= ( execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk > &&  )
delete

◆ operator=() [2/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
void jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::operator= ( execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk > const &  )
delete

◆ work_complete() [1/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
work_complete_t& __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::work_complete ( ) const
inlinefinaloverrideprotectedvirtualnoexcept

◆ work_complete() [2/2]

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
work_complete_t& __fastcall jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::work_complete ( )
inlinefinaloverrideprotectedvirtualnoexcept

Friends And Related Function Documentation

◆ call_push_back

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
template<class ExCxt >
friend class call_push_back
friend

Definition at line 1572 of file thread_client_context.hpp.

Member Data Documentation

◆ core_work_

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
thread_wk_t jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::core_work_
protected

Definition at line 1559 of file thread_client_context.hpp.

◆ memory_access_mode

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
constexpr ppd::generic_traits::memory_access_modes jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::memory_access_mode
staticconstexpr
Initial value:

To assist in allowing compile-time computation of the algorithmic order of the threading model.

Definition at line 1460 of file thread_client_context.hpp.

◆ result_traits_

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
constexpr generic_traits::return_data jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::result_traits_ =generic_traits::return_data::joinable
staticconstexpr

Definition at line 1408 of file thread_client_context.hpp.

◆ work_complete_

template<template< class, class, class, template< class > class, template< class > class > class AlgCoreWk, class GenWk , class Wk , template< class > class Deref, template< class > class InitCoreWk>
work_complete_t jmmcg::ppd::private_::execution_context_algo_buff_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, generic_traits::return_data::joinable, AlgCoreWk, GenWk, Wk, Deref, InitCoreWk >::work_complete_
mutableprotected

Definition at line 1558 of file thread_client_context.hpp.


The documentation for this class was generated from the following file:
jmmcg::ppd::generic_traits::memory_access_modes::erew_memory_access
Exclusive-Read, Exclusive-Write memory access.
jmmcg::ppd::generic_traits::memory_access_modes::crew_memory_access
Concurrent-Read, Exclusive-Write memory access.