|
constexpr | joinable_t (const cliques::element_type c=1) noexcept(true) FORCE_INLINE |
|
template<class T > |
constexpr FORCE_INLINE | joinable_t (T const *parent, typename pool_traits_type::thread_wk_elem_type::cfg_type::node_property_t::value_type const details[], const cliques::element_type c=1) noexcept(true) |
|
constexpr | joinable_t (thread_pool_type &p, const cliques::element_type c, typename pool_traits_type::thread_wk_elem_type::cfg_details_type::params const &cfg_p) noexcept(true) FORCE_INLINE |
|
constexpr | joinable_t (joinable_t const &j, thread_pool_type &p) noexcept(true) FORCE_INLINE |
|
template<class InpWk > |
thread_pool_type::template execution_context_stack< InpWk > __fastcall FORCE_INLINE | push_back (InpWk &&wk) noexcept(false) |
| Joinably transfer the closure_base-derived closure to the thread_pool. More...
|
|
template<class Alg > |
Alg::execution_context __fastcall FORCE_INLINE | push_back (parallel_algorithm< Alg > &&wk) noexcept(false) |
|
template<class R , class F , class L > |
thread_pool_type::template execution_context_stack< wrap_boost_bind_t< boost::_bi::bind_t< R, F, L > > > FORCE_INLINE | operator<< (boost::_bi::bind_t< R, F, L > &&wk) noexcept(false) |
|
template<template< class, class, class > class B, class R , class F , class L , class Test = typename std::enable_if<std::is_bind_expression<B<R, F, L>>::value>::type> |
thread_pool_type::template execution_context_stack< wrap_std_bind_t< B< R, F, L > > > FORCE_INLINE | operator<< (B< R, F, L > &&wk) noexcept(false) |
|
template<class InpWk > |
thread_pool_type::template execution_context_stack< InpWk > FORCE_INLINE | operator<< (InpWk &&wk) noexcept(false) |
|
template<class Alg > |
Alg::execution_context __fastcall FORCE_INLINE | operator<< (parallel_algorithm< Alg > &&wk) noexcept(false) |
|
template<typename thread_pool_type::priority_type Pri> |
priority_t< joinable_t, TPB, Pri > __fastcall FORCE_INLINE | operator<< (typename thread_pool_type::template priority< Pri >) noexcept(true) |
| Joinably transfer the closure_base-derived closure, which will be process()ed at the specified priority. More...
|
|
cliques_t< joinable_t > __fastcall FORCE_INLINE | operator<< (cliques &&c) noexcept(true) |
| Joinably transfer the closure_base-derived closure, using a sub-set of the pool_threads within the thread_pool. More...
|
|
template<class TPB>
class jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::private_::joinable_t< TPB >
A modifier to allow joinably transferring the work to the pool.
If this is used to add work to a pool, and an execution_context does not capture the result, then the result is UB.
- Todo:
- Clearly the above is undesirable, and it would be better if we could somehow force the compiler to emit an error if the user fails to capture the result.
Definition at line 658 of file thread_dsel_types.hpp.
template<class TPB >
template<class InpWk >
Joinably transfer the closure_base-derived closure to the thread_pool.
Verify that the closure_base-derived closure has not been previously transferred, if it has, throw an exception_type. If the implementation-defined result is not captured, the transferred closure_base-derived closure will not be process()ed.
This operation requires no memory allocations, in addition to those required for the operation of the parallel algorithm.
- Todo:
- JMG: Hubert Matthews suggested that potentially expression templates could be used here to concatenate the thread_wk_t's that are transferred into the pool; also as an implementation of back_batching, i.e. GSS(k) scheduling.
- Parameters
-
wk | The closure_base-derived closure, to be asynchronously executed. The result_type of the closure_base-derived closure is taken from a member typedef. The default mutator function is called process(result_type &) or process(), but you could provide an alternative member-function name if desired, as long as the signature is correct via the declaration of mutator. Note that the process(result_type &) or process() member-function must not be overloaded, or this will not work, also that it must use the __fastcall calling-convention on those platforms that support it. |
- Returns
- An opaque type, derived from an execution_context_stack, that must be captured using "auto const &" or "auto &&"; for requesting the results from the asynchronously process()'d closure_base-derived closure.
- See also
- create_direct, execution_context_stack
Definition at line 696 of file thread_dsel_types.hpp.