libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::thread_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P > Class Template Reference

This compatibility-pool has an unlimited size, and uses a master to execute the work. More...

#include <thread_pool_sequential.hpp>

Inheritance diagram for jmmcg::ppd::thread_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >:
[legend]
Collaboration diagram for jmmcg::ppd::thread_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >:
[legend]

Public Types

typedef private_::sequential_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P > base_t
 
typedef base_t::api_params_type api_params_type
 
- Public Types inherited from jmmcg::ppd::private_::sequential_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >
using pool_traits_type = P
 
using pool_type = std::vector< fake_thread * >
 A hack to give us a size_type member-typedef. More...
 
using work_distribution_mode = pool_traits::work_distribution_mode_t::one_thread_distributes<>
 
using signalled_work_queue_type = typename pool_traits_type::template signalled_work_queue_type< typename work_distribution_mode::queue_model >
 
using queue_size_type = typename signalled_work_queue_type::size_type
 
typedef pool_type::size_type pool_size_type
 
using statistics_type = typename pool_traits_type::template statistics_type< typename work_distribution_mode::queue_model >
 Just stub statistics - to support the interface. No actual statistics are collected. More...
 
typedef pool_traits_type::cfg_type cfg_type
 The type of the control-flow graph that will be generated at run-time, if supported. More...
 
typedef pool_traits_type::os_traits os_traits
 A useful typedef to easily get to the various OS traits. More...
 
typedef os_traits::exception_type exception_type
 
typedef os_traits::thread_traits thread_traits
 A useful typedef to easily get to the various OS specific thread-traits. More...
 
typedef thread_traits::api_params_type api_params_type
 A useful typedef to easily get to the various API details. More...
 
typedef api_params_type::priority_type priority_type
 A useful typedef to easily get to the various priorities. More...
 
typedef private_::nonjoinable_t< sequential_poolnonjoinable
 A useful typedef to easily get to the nonjoinable grammar element. More...
 
typedef private_::joinable_t< sequential_pooljoinable
 A useful typedef to easily get to the joinable grammar element. More...
 
typedef private_::nonjoinable_buff_t< sequential_poolnonjoinable_buff
 A useful typedef to easily get to the nonjoinable_buff grammar element. More...
 
typedef execution_context_stack< void_work > void_exec_cxt
 
typedef private_::stl_functor_result_type< boolboolean_result_type
 

Additional Inherited Members

- Public Member Functions inherited from jmmcg::ppd::private_::sequential_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >
constexpr __stdcall sequential_pool () noexcept(true) FORCE_INLINE
 
__stdcall sequential_pool (pool_size_type sz) noexcept(true) FORCE_INLINE
 
 sequential_pool (sequential_pool const &)=delete
 
__stdcall ~sequential_pool () FORCE_INLINE
 
constexpr pool_size_type __fastcall pool_size () const noexcept(true) FORCE_INLINE
 A stub just for compatibility. Always returns "0". More...
 
const statistics_type &__fastcall statistics () const noexcept(true) FORCE_INLINE
 A stub just for compatibility. More...
 
parallel_algorithm< algo_hack_stack_t > __fastcall FORCE_INLINE for_each (Colln const &c, Fn const &fn) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< count_if_t< Colln, Pred > > __fastcall FORCE_INLINE count_if (Colln &c, Pred const &p) const
 
parallel_algorithm< count_t< Colln > > __fastcall FORCE_INLINE count (Colln &c, typename Colln::value_type const &v) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< find_if_t< Colln, Pred > > __fastcall FORCE_INLINE find_if (Colln const &c, Pred const &p) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< find_t< Colln > > __fastcall FORCE_INLINE find (Colln const &c, typename Colln::value_type const &v) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE transform (CollnIn const &in, CollnOut &out, UniOp const &op) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE transform (CollnIn1 const &in1, CollnIn2 const &in2, CollnOut &out, BinOp const &op) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE copy (CollnIn const &in, CollnOut &out) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< accumulate_op_processor< Colln, BinOp > > __fastcall FORCE_INLINE accumulate (Colln const &c, typename BinOp::result_type const &v, BinOp const &binop) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< accumulate_processor< Colln, V > > __fastcall FORCE_INLINE accumulate (Colln const &c, V const &v) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE fill_n (Colln &c, typename Colln::size_type sz, typename Colln::value_type const &v) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE fill (Colln &c, typename Colln::value_type const &v) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE reverse (Colln &c) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< max_element_t< Colln, Comp > > __fastcall FORCE_INLINE max_element (Colln const &c, Comp const &comp) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< max_element_t< Colln, std::less< typename Colln::value_type > > > __fastcall FORCE_INLINE max_element (Colln const &c) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< min_element_t< Colln, Comp > > __fastcall FORCE_INLINE min_element (Colln const &c, Comp const &comp) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< min_element_t< Colln, std::less< typename Colln::value_type > > > __fastcall FORCE_INLINE min_element (Colln const &c) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE sort (Colln &c, Compare const &comp) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE sort (Colln &c) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE merge (CollnIn1 const &in1, CollnIn2 const &in2, CollnOut &out, Compare const &comp) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
parallel_algorithm< algo_hack_stack_t > FORCE_INLINE merge (CollnIn1 const &in1, CollnIn2 const &in2, CollnOut &out) const
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
execution_context_stack< typename private_::unary_fun_work_type< ArgT, UniFn, sequential_pool > > FORCE_INLINE unary_fun (ArgT &&a, UniFn const &op=UniFn())
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
execution_context_stack< typename private_::binary_fun_work_type< LHSArg, RHSArg, BinFn, sequential_pool > > FORCE_INLINE binary_fun (LHSArg &&lhs, RHSArg &&rhs, BinFn const &op=BinFn())
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
execution_context_stack< typename private_::binary_fun_work_type< T, T, std::logical_and< bool >, sequential_pool > > FORCE_INLINE logical_and (T &&lhs, T &&rhs)
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
execution_context_stack< typename private_::binary_fun_work_type< T, T, std::logical_or< bool >, sequential_pool > > FORCE_INLINE logical_or (T &&lhs, T &&rhs)
 This just forwards to the STL algorithm of the same name, for compatibility with the parallel version. More...
 
nonjoinable __fastcall operator<< (nonjoinable &&nj) noexcept(true) FORCE_INLINE
 Non-joinably transfer the closure_base-derived closure into the thread_pool. More...
 
nonjoinable_buff __fastcall operator<< (nonjoinable_buff &&njb) noexcept(true) FORCE_INLINE
 Non-joinably transfer the closure_base-derived closure into the thread_pool. More...
 
joinable_t< sequential_pool > __fastcall operator<< (joinable_t< sequential_pool > &&j) noexcept(true) FORCE_INLINE
 Joinably transfer the closure_base-derived closure into the thread_pool. More...
 
cfg_typecfg () noexcept(true) FORCE_INLINE
 Access the control-flow graph, if supported. More...
 
const cfg_typecfg () const noexcept(true) FORCE_INLINE
 Access the control-flow graph, if supported. More...
 
- Static Public Member Functions inherited from jmmcg::ppd::private_::sequential_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >
static constexpr bool __fastcall pool_empty () noexcept(true) FORCE_INLINE
 A stub just for compatibility. Always returns "true". More...
 
static constexpr bool __fastcall queue_empty () noexcept(true) FORCE_INLINE
 A stub just for compatibility. Always returns "true". More...
 
static constexpr pool_size_type __fastcall queue_size () noexcept(true) FORCE_INLINE
 A stub just for compatibility. Always returns "0". More...
 
static void __fastcall queue_clear () noexcept(true) FORCE_INLINE
 A stub just for compatibility. Always returns "0". More...
 
static constexpr unsigned long __fastcall min_time (generic_traits::memory_access_modes) noexcept(true) FORCE_INLINE
 Return the theoretical minimum time in computations required to complete the current work. More...
 
static constexpr unsigned long __fastcall FORCE_INLINE min_time (T) noexcept(true)
 
static constexpr unsigned long __fastcall min_processors (generic_traits::memory_access_modes) noexcept(true) FORCE_INLINE
 Return the theoretical minimum number of processors required to achieve the minimum computation time required to complete the current work. More...
 
static constexpr unsigned long __fastcall FORCE_INLINE min_processors (T) noexcept(true)
 
- Static Public Attributes inherited from jmmcg::ppd::private_::sequential_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >
static const pool_traits::size_mode_t size_mode
 

Detailed Description

template<class P>
class jmmcg::ppd::thread_pool< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits::size_mode_t::sequential, P >

This compatibility-pool has an unlimited size, and uses a master to execute the work.

There is no threading at all in this pool. It tries to be as fast as directly executing the methods on the closure_base-derived closure class. The idea of this class is that you can use it to provide both single & multi-threaded implementations within your objects and code, by just changing a typedef or a trait.

Definition at line 75 of file thread_pool_sequential.hpp.

Member Typedef Documentation

◆ api_params_type

◆ base_t


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