libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg > Class Template Reference

Distribute the input range [begin, end) across the thread_pool_type recursively as a collection of tasks. More...

#include <subdivide_n_gen_wk.hpp>

Classes

struct  algo_work_heap_type
 

Public Types

typedef TPB thread_pool_type
 
typedef thread_pool_type::pool_traits_type pool_traits_type
 
typedef void result_type
 
typedef Alg alg_wrap_t
 
typedef alg_wrap_t::container_type container_type
 
typedef alg_wrap_t::os_traits os_traits
 
typedef alg_wrap_t::work_wrap::in_iterator in_iterator
 
typedef alg_wrap_t::work_wrap::operation_type operation_type
 
typedef alg_wrap_t::ensure_wk_complete_t ensure_wk_complete_t
 An object that signals to the execution_context when all of the closure_base-derived closures has been process()ed, including being distributed across the threads_per_clique in the thread_pool via the tasks spawned by subdivide_n_gen_wk::process(). More...
 

Static Public Member Functions

static constexpr thread_pool_type::pool_type::size_type compute_threads_per_clique (typename thread_pool_type::pool_type::size_type, typename thread_pool_type::pool_type::size_type const) noexcept(true) FORCE_INLINE
 
static constexpr thread_pool_type::pool_type::size_type compute_buffer_items (typename thread_pool_type::pool_type::size_type const) noexcept(true) FORCE_INLINE
 

Public Attributes

const thread_pool_type::pool_type::size_type threads_per_clique
 

Static Public Attributes

static constexpr ppd::generic_traits::memory_access_modes memory_access_mode =alg_wrap_t::memory_access_mode
 

Protected Member Functions

__stdcall subdivide_n_gen_wk (thread_pool_type &p, operation_type &f, typename alg_wrap_t::work_complete_t &w) noexcept(true) FORCE_INLINE
 
__stdcall subdivide_n_gen_wk (thread_pool_type &p, operation_type &f, typename alg_wrap_t::work_complete_t &w, in_iterator const &b, in_iterator const &e) noexcept(true) FORCE_INLINE
 
virtual ~subdivide_n_gen_wk () FORCE_INLINE
 

Protected Attributes

thread_pool_typepool
 
operation_typefn
 
alg_wrap_t::work_complete_t & all_done
 
const in_iterator begin
 
const in_iterator end
 

Detailed Description

template<class TPB, class Alg>
class jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >

Distribute the input range [begin, end) across the thread_pool_type recursively as a collection of tasks.

Definition at line 552 of file subdivide_n_gen_wk.hpp.

Member Typedef Documentation

◆ alg_wrap_t

template<class TPB , class Alg >
typedef Alg jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::alg_wrap_t

Definition at line 557 of file subdivide_n_gen_wk.hpp.

◆ container_type

template<class TPB , class Alg >
typedef alg_wrap_t::container_type jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::container_type

Definition at line 558 of file subdivide_n_gen_wk.hpp.

◆ ensure_wk_complete_t

template<class TPB , class Alg >
typedef alg_wrap_t::ensure_wk_complete_t jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::ensure_wk_complete_t

An object that signals to the execution_context when all of the closure_base-derived closures has been process()ed, including being distributed across the threads_per_clique in the thread_pool via the tasks spawned by subdivide_n_gen_wk::process().

This is used so that we don't have to generate an execution_context at each branch, and wait upon it, thus causing vertical pool_threads to be held, i.e. increasing resources consumed.

Definition at line 566 of file subdivide_n_gen_wk.hpp.

◆ in_iterator

template<class TPB , class Alg >
typedef alg_wrap_t::work_wrap::in_iterator jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::in_iterator

Definition at line 560 of file subdivide_n_gen_wk.hpp.

◆ operation_type

template<class TPB , class Alg >
typedef alg_wrap_t::work_wrap::operation_type jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::operation_type

Definition at line 561 of file subdivide_n_gen_wk.hpp.

◆ os_traits

template<class TPB , class Alg >
typedef alg_wrap_t::os_traits jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::os_traits

Definition at line 559 of file subdivide_n_gen_wk.hpp.

◆ pool_traits_type

template<class TPB , class Alg >
typedef thread_pool_type::pool_traits_type jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::pool_traits_type

Definition at line 555 of file subdivide_n_gen_wk.hpp.

◆ result_type

template<class TPB , class Alg >
typedef void jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::result_type

Definition at line 556 of file subdivide_n_gen_wk.hpp.

◆ thread_pool_type

template<class TPB , class Alg >
typedef TPB jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::thread_pool_type

Definition at line 554 of file subdivide_n_gen_wk.hpp.

Constructor & Destructor Documentation

◆ subdivide_n_gen_wk() [1/2]

template<class TPB , class Alg >
jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::subdivide_n_gen_wk ( thread_pool_type p,
operation_type f,
typename alg_wrap_t::work_complete_t &  w 
)
inlineprotectednoexcept

Definition at line 308 of file subdivide_n_gen_wk_impl.hpp.

◆ subdivide_n_gen_wk() [2/2]

template<class TPB , class Alg >
jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::subdivide_n_gen_wk ( thread_pool_type p,
operation_type f,
typename alg_wrap_t::work_complete_t &  w,
in_iterator const &  b,
in_iterator const &  e 
)
inlineprotectednoexcept

◆ ~subdivide_n_gen_wk()

template<class TPB , class Alg >
virtual jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::~subdivide_n_gen_wk ( )
inlineprotectedvirtual

Definition at line 601 of file subdivide_n_gen_wk.hpp.

Member Function Documentation

◆ compute_buffer_items()

◆ compute_threads_per_clique()

Member Data Documentation

◆ all_done

template<class TPB , class Alg >
alg_wrap_t::work_complete_t& jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::all_done
protected

Definition at line 585 of file subdivide_n_gen_wk.hpp.

◆ begin

template<class TPB , class Alg >
const in_iterator jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::begin
protected

Definition at line 586 of file subdivide_n_gen_wk.hpp.

◆ end

template<class TPB , class Alg >
const in_iterator jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::end
protected

Definition at line 587 of file subdivide_n_gen_wk.hpp.

◆ fn

template<class TPB , class Alg >
operation_type& jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::fn
protected

Definition at line 584 of file subdivide_n_gen_wk.hpp.

◆ memory_access_mode

template<class TPB , class Alg >
constexpr ppd::generic_traits::memory_access_modes jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::memory_access_mode =alg_wrap_t::memory_access_mode
staticconstexpr

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

Definition at line 572 of file subdivide_n_gen_wk.hpp.

◆ pool

template<class TPB , class Alg >
thread_pool_type& jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::pool
protected

Definition at line 583 of file subdivide_n_gen_wk.hpp.

◆ threads_per_clique

template<class TPB , class Alg >
const thread_pool_type::pool_type::size_type jmmcg::ppd::private_::subdivide_n_gen_wk< pool_traits::size_mode_t::infinite, TPB, Alg >::threads_per_clique

Definition at line 574 of file subdivide_n_gen_wk.hpp.


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