libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred > Class Template Reference

A modifier to allow joinably transferring the work to the pool. More...

#include <thread_pool_base.hpp>

Public Types

typedef Pred operation_type
 
typedef execution_context_algo_buff_stack_type< work_distribution_mode, pool_traits_type::result_traits_, pool_traits_type::template algo_thread_wk_buffered, gen_wk_t, work_typeexecution_context
 This is a useful typedef to get at the execution_context. More...
 

Public Member Functions

__stdcall swap_ranges_t (thread_pool_base &p, typename Colln::container_type::iterator b1, typename Colln::container_type::iterator e1, typename Colln::container_type::iterator b2, Pred const &pr) noexcept(true) FORCE_INLINE
 
execution_context process (cliques::element_type const cliques, typename pool_traits_type::thread_wk_elem_type::cfg_details_type::params const &cfg_parms) const FORCE_INLINE
 Joinably transfer the predicate to the pool. More...
 

Static Public Attributes

static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 

Detailed Description

template<class DM, pool_traits::size_mode_t Ps, typename PTT, class Pt>
template<class Colln, class Pred>
class jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred >

A modifier to allow joinably transferring the work to the pool.

Used internally be the library.

See also
swap_ranges(), for_each_work_type, swap_ranges_reduce, subdivide_n_gen_wk1

Definition at line 496 of file thread_pool_base.hpp.

Member Typedef Documentation

◆ execution_context

template<class DM, pool_traits::size_mode_t Ps, typename PTT, class Pt>
template<class Colln , class Pred >
typedef execution_context_algo_buff_stack_type<work_distribution_mode, pool_traits_type::result_traits_, pool_traits_type::template algo_thread_wk_buffered, gen_wk_t, work_type> jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred >::execution_context

This is a useful typedef to get at the execution_context.

The execution_context is created by joinably transferring work into the pool. It has various uses, but is primarily used to atomically and synchronously wait on the results of the work on the closure_base-derived closure-derived object, as specified by the thread_wk_t object transferred into the pool. But it can also pass back specified exceptions that may be thrown by the work. It can also be used to asynchronously test if the work has been completed, and delete the work from the pool, if it has not been started.

See also
create_direct
execution_context_algo_buff_stack_type
joinable_t
thread_wk_t
closure_base

Definition at line 1247 of file thread_pool_base_impl.hpp.

◆ operation_type

template<class DM, pool_traits::size_mode_t Ps, typename PTT, class Pt>
template<class Colln , class Pred >
typedef Pred jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred >::operation_type

Definition at line 1229 of file thread_pool_base_impl.hpp.

Constructor & Destructor Documentation

◆ swap_ranges_t()

template<class DM, pool_traits::size_mode_t Ps, typename PTT, class Pt>
template<class Colln , class Pred >
__stdcall jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred >::swap_ranges_t ( thread_pool_base p,
typename Colln::container_type::iterator  b1,
typename Colln::container_type::iterator  e1,
typename Colln::container_type::iterator  b2,
Pred const &  pr 
)
inlinenoexcept

Member Function Documentation

◆ process()

template<class DM, pool_traits::size_mode_t Ps, typename PTT, class Pt>
template<class Colln , class Pred >
execution_context jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred >::process ( cliques::element_type const  cliques,
typename pool_traits_type::thread_wk_elem_type::cfg_details_type::params const &  cfg_parms 
) const
inline

Joinably transfer the predicate to the pool.

See also
create_direct, execution_context, cliques, cliques_t

Definition at line 1269 of file thread_pool_base_impl.hpp.

Member Data Documentation

◆ memory_access_mode

template<class DM, pool_traits::size_mode_t Ps, typename PTT, class Pt>
template<class Colln , class Pred >
constexpr ppd::generic_traits::memory_access_modes jmmcg::ppd::private_::thread_pool_base< DM, Ps, PTT, Pt >::swap_ranges_t< Colln, Pred >::memory_access_mode
staticconstexpr

The documentation for this class was generated from the following files:
jmmcg::ppd::generic_traits::memory_access_modes::erew_memory_access
Exclusive-Read, Exclusive-Write memory access.
jmmcg::ppd::private_::subdivide_n_gen_wk< Ps, TPB, alg_wrapper2< TPB::pool_traits_type, Alg< Conts, UniOp >, TPB::pool_traits_type::result_traits_ > >::memory_access_mode
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
Definition: subdivide_n_gen_wk.hpp:466
jmmcg::ppd::private_::alg_wk_wrap::for_each_work_type::memory_access_mode
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
Definition: parallel_algorithms.hpp:133
jmmcg::ppd::generic_traits::memory_access_modes::crew_memory_access
Concurrent-Read, Exclusive-Write memory access.