Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor > Class Template Reference
Inheritance diagram for tbb::flow::interface11::streaming_node< tuple< Ports... >, JP, StreamFactory >::device_selector< UserFunctor >:
Collaboration diagram for tbb::flow::interface11::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::interface11::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)
 
- Private Member Functions inherited from tbb::internal::no_assign
void operator= (const no_assign &)=delete
 
 no_assign (const no_assign &)=default
 
 no_assign ()=default
 

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::interface11::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::interface11::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::interface11::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::interface11::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.

381  { return false; }
382 

Member Function Documentation

◆ clone()

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

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

Definition at line 391 of file flow_graph.h.

395  :
396  template<typename X>

◆ create_dispatch_funcs()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<int... S>
static dispatch_funcs_type tbb::flow::interface11::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.

410  { return false; }

◆ get_device()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<typename DevicePort >
device_type tbb::flow::interface11::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.

428  { return false; }
429 
430 protected:
431  virtual bool try_get_wrapper( void* p, bool is_async ) __TBB_override {
432  // Both async OR both are NOT async
433  if ( internal::async_helpers<T>::is_async_type == is_async ) {
434  return try_get( internal::async_helpers<T>::from_void_ptr(p) );
435  }
436  // Else: this (T) is async OR incoming 't' is async
437  __TBB_ASSERT(false, "async_msg interface does not support 'pull' protocol in try_get()");
438  return false;
439  }
void const char const char int ITT_FORMAT __itt_group_sync p
#define __TBB_override
Definition: tbb_stddef.h:240
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:229
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

◆ get_key() [1/2]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<typename T >
key_type tbb::flow::interface11::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.

410  { return false; }

◆ get_key() [2/2]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<typename T >
key_type tbb::flow::interface11::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.

417  : public internal::untyped_sender {

◆ operator()()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
void tbb::flow::interface11::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

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

Definition at line 385 of file flow_graph.h.

395  :
396  template<typename X>

◆ send_and_put_impl()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename UserFunctor >
template<int N>
void tbb::flow::interface11::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.

417  : public internal::untyped_sender {
418 public:
420  __TBB_DEPRECATED typedef T output_type;
421 
422  __TBB_DEPRECATED typedef typename internal::async_helpers<T>::filtered_type filtered_type;
423 
#define __TBB_DEPRECATED
Definition: tbb_config.h:636

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::interface11::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::interface11::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::interface11::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::interface11::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::interface11::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::interface11::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-2020 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.