libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT > Class Template Reference

An adaptor to allow STL binary functions to be operated upon in the thread_pool. More...

#include <parallel_algorithms.hpp>

Classes

struct  arg_contexts_t
 

Public Types

typedef PT pool_type
 
typedef BinFn operation_type
 
typedef stl_functor_result_type< typename operation_type::result_type > result_type
 
typedef ArgT1 first_argument_type
 
typedef ArgT2 second_argument_type
 

Public Member Functions

__stdcall binary_fun_work_type (first_argument_type &&lhs, second_argument_type &&rhs, operation_type const &o, pool_type &pool) noexcept(false) FORCE_INLINE
 
void __fastcall process (result_type &r) FORCE_INLINE
 
bool __fastcall operator< (binary_fun_work_type const &rhs) const noexcept(true) FORCE_INLINE
 
template<class Arg1 >
constexpr bool __fastcall FORCE_INLINE operator< (Arg1 const &) const noexcept(true)
 

Static Public Attributes

static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 

Detailed Description

template<class ArgT1, class ArgT2, class BinFn, class PT>
class jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >

An adaptor to allow STL binary functions to be operated upon in the thread_pool.

Note that the inputs are evaluated by transferring them into the pool, and the execution_context that holds the result has an automatic conversion to the result_type.

Definition at line 1071 of file parallel_algorithms.hpp.

Member Typedef Documentation

◆ first_argument_type

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
typedef ArgT1 jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::first_argument_type

Definition at line 1076 of file parallel_algorithms.hpp.

◆ operation_type

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
typedef BinFn jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::operation_type

Definition at line 1074 of file parallel_algorithms.hpp.

◆ pool_type

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
typedef PT jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::pool_type

Definition at line 1073 of file parallel_algorithms.hpp.

◆ result_type

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
typedef stl_functor_result_type<typename operation_type::result_type> jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::result_type

Definition at line 1075 of file parallel_algorithms.hpp.

◆ second_argument_type

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
typedef ArgT2 jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::second_argument_type

Definition at line 1077 of file parallel_algorithms.hpp.

Constructor & Destructor Documentation

◆ binary_fun_work_type()

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::binary_fun_work_type ( first_argument_type &&  lhs,
second_argument_type &&  rhs,
operation_type const &  o,
pool_type pool 
)
inlinenoexcept

Definition at line 561 of file parallel_algorithms_impl.hpp.

Member Function Documentation

◆ operator<() [1/2]

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
template<class Arg1 >
constexpr bool __fastcall FORCE_INLINE jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::operator< ( Arg1 const &  ) const
inlineconstexprnoexcept

Definition at line 1104 of file parallel_algorithms.hpp.

◆ operator<() [2/2]

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
bool jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::operator< ( binary_fun_work_type< ArgT1, ArgT2, BinFn, PT > const &  rhs) const
inlinenoexcept

Definition at line 572 of file parallel_algorithms_impl.hpp.

◆ process()

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
void jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::process ( result_type r)
inline

Definition at line 566 of file parallel_algorithms_impl.hpp.

Member Data Documentation

◆ memory_access_mode

template<class ArgT1 , class ArgT2 , class BinFn , class PT >
constexpr ppd::generic_traits::memory_access_modes jmmcg::ppd::private_::binary_fun_work_type< ArgT1, ArgT2, BinFn, PT >::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::shared_ptr< arg_contexts_t, api_lock_traits< platform_api, sequential_mode > >::memory_access_mode
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
Definition: shared_ptr.hpp:180
jmmcg::ppd::generic_traits::memory_access_modes::crew_memory_access
Concurrent-Read, Exclusive-Write memory access.