Enforce a sequential-consistency memory-model on the result data that this object manages, via the accessors to the result data.
More...
|
| 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...
|
|
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...
|
|
| horizontal_execution_itf (horizontal_execution_itf const &)=delete |
|
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.
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>
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.
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>
|
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<<().
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>
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<<().
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>
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.
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>
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<<().
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>
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.
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 |