Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor > Class Template Reference
Inheritance diagram for tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >:
Collaboration diagram for tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >:

Classes

struct  epoch_desc
 

Public Member Functions

 device_selector (UserFunctor uf, streaming_node &n, StreamFactory &f)
 
void operator() (const indexer_node_output_type &v, typename device_selector_node::output_ports_type &op) __TBB_override
 
device_selector_base * clone (streaming_node &n) const __TBB_override
 
- Public Member Functions inherited from tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector_base
virtual ~device_selector_base ()
 

Private Types

typedef void(device_selector< UserFunctor >::* send_and_put_fn_type) (size_t &, const indexer_node_output_type &, typename device_selector_node::output_ports_type &)
 
typedef std::array< send_and_put_fn_type, NUM_INPUTSdispatch_funcs_type
 

Private Member Functions

template<typename T >
key_type get_key (std::false_type, const T &, size_t &epoch)
 
template<typename T >
key_type get_key (std::true_type, const T &t, size_t &)
 
template<int N>
void send_and_put_impl (size_t &epoch, const indexer_node_output_type &v, typename device_selector_node::output_ports_type &op)
 
template<typename DevicePort >
device_type get_device (key_type key, DevicePort &dp)
 

Static Private Member Functions

template<int... S>
static dispatch_funcs_type create_dispatch_funcs (internal::sequence< S... >)
 

Private Attributes

std::unordered_map< typename std::decay< key_type >::type, epoch_desc > my_devices
 
std::array< size_t, NUM_INPUTSmy_port_epoches
 
dispatch_funcs_type my_dispatch_funcs
 
UserFunctor my_user_functor
 
streaming_nodemy_node
 
StreamFactory & my_factory
 

Detailed Description

template<typename... Ports, typename JP, typename StreamFactory>
template<typename UserFunctor>
class tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >

Definition at line 376 of file flow_graph.h.

Member Typedef Documentation

◆ dispatch_funcs_type

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
typedef std::array< send_and_put_fn_type, NUM_INPUTS > tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::dispatch_funcs_type
private

Definition at line 396 of file flow_graph.h.

◆ send_and_put_fn_type

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
typedef void(device_selector<UserFunctor>::* tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::send_and_put_fn_type) (size_t &, const indexer_node_output_type &, typename device_selector_node::output_ports_type &)
private

Definition at line 395 of file flow_graph.h.

Constructor & Destructor Documentation

◆ device_selector()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::device_selector ( UserFunctor  uf,
streaming_node< tuple< Ports... >, JP, StreamFactory > &  n,
StreamFactory &  f 
)
inline

Definition at line 378 of file flow_graph.h.

390  { return false; }

Member Function Documentation

◆ clone()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
device_selector_base* tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::clone ( streaming_node< tuple< Ports... >, JP, StreamFactory > &  n) const
inlinevirtual

Implements tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector_base.

Definition at line 391 of file flow_graph.h.

397  : public internal::untyped_sender {

◆ create_dispatch_funcs()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<int... S>
static dispatch_funcs_type tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::create_dispatch_funcs ( internal::sequence< S... >  )
inlinestaticprivate

Definition at line 399 of file flow_graph.h.

405  { return false; }

◆ get_device()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<typename DevicePort >
device_type tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::get_device ( key_type  key,
DevicePort &  dp 
)
inlineprivate

Definition at line 426 of file flow_graph.h.

434  : public internal::untyped_receiver {
435  template< typename > friend class internal::async_storage;
436  template< typename, typename > friend struct internal::async_helpers;
437 public:
439  typedef T input_type;

◆ get_key() [1/2]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<typename T >
key_type tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::get_key ( std::false_type  ,
const T &  ,
size_t &  epoch 
)
inlineprivate

Definition at line 405 of file flow_graph.h.

405  { return false; }
406 
408  virtual bool try_reserve( T & ) { return false; }

◆ get_key() [2/2]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<typename T >
key_type tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::get_key ( std::true_type  ,
const T &  t,
size_t &   
)
inlineprivate

Definition at line 411 of file flow_graph.h.

411  {
412  // Both async OR both are NOT async
413  if ( internal::async_helpers<T>::is_async_type == is_async ) {
414  return try_get( internal::async_helpers<T>::from_void_ptr(p) );
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:209
void const char const char int ITT_FORMAT __itt_group_sync p

◆ operator()()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
void tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::operator() ( const indexer_node_output_type v,
typename device_selector_node::output_ports_type op 
)
inlinevirtual

◆ send_and_put_impl()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<int N>
void tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::send_and_put_impl ( size_t &  epoch,
const indexer_node_output_type v,
typename device_selector_node::output_ports_type op 
)
inlineprivate

Definition at line 417 of file flow_graph.h.

421  {
422  // Both async OR both are NOT async
423  if ( internal::async_helpers<T>::is_async_type == is_async ) {

Member Data Documentation

◆ my_devices

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
std::unordered_map<typename std::decay<key_type>::type, epoch_desc> tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::my_devices
private

Definition at line 447 of file flow_graph.h.

◆ my_dispatch_funcs

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
dispatch_funcs_type tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::my_dispatch_funcs
private

Definition at line 449 of file flow_graph.h.

◆ my_factory

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
StreamFactory& tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::my_factory
private

Definition at line 452 of file flow_graph.h.

◆ my_node

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
streaming_node& tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::my_node
private

Definition at line 451 of file flow_graph.h.

◆ my_port_epoches

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
std::array<size_t, NUM_INPUTS> tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::my_port_epoches
private

Definition at line 448 of file flow_graph.h.

◆ my_user_functor

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
UserFunctor tbb::flow::interface10::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >::my_user_functor
private

Definition at line 450 of file flow_graph.h.


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

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.