Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes > Class Template Reference

indexer_node_base More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >:
Collaboration diagram for tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >:

Classes

class  indexer_node_base_operation
 

Public Types

typedef OutputType output_type
 
typedef StructTypes tuple_types
 
typedef sender< output_type >::successor_type successor_type
 
typedef indexer_node_FE< InputTuple, output_type, StructTypes > input_ports_type
 
- Public Types inherited from tbb::flow::interface10::internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
typedef OutputType output_type
 
typedef InputTuple input_type
 
- Public Types inherited from tbb::flow::interface10::sender< OutputType >
typedef OutputType output_type
 The output type of this sender. More...
 
typedef internal::async_helpers< OutputType >::filtered_type filtered_type
 
- Public Types inherited from tbb::flow::interface10::internal::untyped_sender
typedef untyped_receiver successor_type
 The successor type for this node. More...
 

Public Member Functions

 indexer_node_base (graph &g)
 
 indexer_node_base (const indexer_node_base &other)
 
bool register_successor (successor_type &r) __TBB_override
 Add a new successor to this node. More...
 
bool remove_successor (successor_type &r) __TBB_override
 Removes a successor from this node. More...
 
tasktry_put_task (output_type const *v)
 
- Public Member Functions inherited from tbb::flow::interface10::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from tbb::flow::interface10::internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
 indexer_node_FE ()
 
input_typeinput_ports ()
 
- Public Member Functions inherited from tbb::flow::interface10::sender< OutputType >
virtual bool try_get (OutputType &)
 Request an item from the sender. More...
 
virtual bool try_reserve (OutputType &)
 Reserves an item in the sender. More...
 
- Public Member Functions inherited from tbb::flow::interface10::internal::untyped_sender
virtual ~untyped_sender ()
 
virtual bool try_release ()
 Releases the reserved item. More...
 
virtual bool try_consume ()
 Consumes the reserved item. More...
 

Static Public Attributes

static const size_t N = tbb::flow::tuple_size<InputTuple>::value
 
- Static Public Attributes inherited from tbb::flow::interface10::internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
static const int N = tbb::flow::tuple_size<InputTuple>::value
 

Protected Member Functions

void reset_node (reset_flags f) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::sender< OutputType >
virtual bool try_get_wrapper (void *p, bool is_async) __TBB_override
 
virtual bool try_reserve_wrapper (void *p, bool is_async) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::internal::untyped_sender
template<typename X >
bool try_get (X &t)
 Request an item from the sender. More...
 
template<typename X >
bool try_reserve (X &t)
 Reserves an item in the sender. More...
 

Protected Attributes

graphmy_graph
 
- Protected Attributes inherited from tbb::flow::interface10::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 
- Protected Attributes inherited from tbb::flow::interface10::internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
input_type my_inputs
 

Private Types

enum  op_type { reg_succ, rem_succ, try__put_task }
 
typedef indexer_node_base< InputTuple, output_type, StructTypes > class_type
 
typedef internal::aggregating_functor< class_type, indexer_node_base_operationhandler_type
 

Private Member Functions

void handle_operations (indexer_node_base_operation *op_list)
 

Private Attributes

aggregator< handler_type, indexer_node_base_operationmy_aggregator
 
broadcast_cache< output_type, null_rw_mutexmy_successors
 

Friends

class internal::aggregating_functor< class_type, indexer_node_base_operation >
 

Detailed Description

template<typename InputTuple, typename OutputType, typename StructTypes>
class tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >

indexer_node_base

Definition at line 173 of file flow_graph.h.

Member Typedef Documentation

◆ class_type

template<typename InputTuple , typename OutputType , typename StructTypes >
typedef indexer_node_base<InputTuple,output_type,StructTypes> tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::class_type
private

Definition at line 196 of file flow_graph.h.

◆ handler_type

template<typename InputTuple , typename OutputType , typename StructTypes >
typedef internal::aggregating_functor<class_type, indexer_node_base_operation> tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::handler_type
private

Definition at line 217 of file flow_graph.h.

◆ input_ports_type

template<typename InputTuple , typename OutputType , typename StructTypes >
typedef indexer_node_FE<InputTuple, output_type,StructTypes> tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::input_ports_type

Definition at line 182 of file flow_graph.h.

◆ output_type

template<typename InputTuple , typename OutputType , typename StructTypes >
typedef OutputType tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::output_type

Definition at line 179 of file flow_graph.h.

◆ successor_type

template<typename InputTuple , typename OutputType , typename StructTypes >
typedef sender<output_type>::successor_type tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::successor_type

Definition at line 181 of file flow_graph.h.

◆ tuple_types

template<typename InputTuple , typename OutputType , typename StructTypes >
typedef StructTypes tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::tuple_types

Definition at line 180 of file flow_graph.h.

Member Enumeration Documentation

◆ op_type

template<typename InputTuple , typename OutputType , typename StructTypes >
enum tbb::flow::interface10::internal::indexer_node_base::op_type
private
Enumerator
reg_succ 
rem_succ 
try__put_task 

Definition at line 190 of file flow_graph.h.

190  {
191 
192 template < typename T > class async_storage;
193 
194 template< typename T, typename = void >
195 struct async_helpers {

Constructor & Destructor Documentation

◆ indexer_node_base() [1/2]

template<typename InputTuple , typename OutputType , typename StructTypes >
tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base ( graph g)
inline

Definition at line 265 of file flow_graph.h.

266  {
267  // This (T) is async and incoming 'X t' is NOT async
268  // Create async_msg for X
void const char const char int ITT_FORMAT __itt_group_sync p
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:209
internal::async_helpers< OutputType >::filtered_type filtered_type
Definition: flow_graph.h:403

◆ indexer_node_base() [2/2]

template<typename InputTuple , typename OutputType , typename StructTypes >
tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base ( const indexer_node_base< InputTuple, OutputType, StructTypes > &  other)
inline

Definition at line 271 of file flow_graph.h.

278  {

Member Function Documentation

◆ handle_operations()

template<typename InputTuple , typename OutputType , typename StructTypes >
void tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::handle_operations ( indexer_node_base_operation op_list)
inlineprivate

Definition at line 221 of file flow_graph.h.

228  {
229  // Incoming 't' is NOT async
230  return this_recv->try_put_task(from_void_ptr(p));
231  }
232  }
233 };
234 
235 template< typename T >
236 struct async_helpers< T, typename std::enable_if< std::is_base_of<async_msg<typename T::async_msg_data_type>, T>::value >::type > {
237  typedef T async_type;
238  typedef typename T::async_msg_data_type filtered_type;
239 
240  static const bool is_async_type = true;
241 
242  // Receiver-classes use const interfaces
243  static const void* to_void_ptr(const T& t) {
244  return static_cast<const void*>(&static_cast<const async_msg<filtered_type>&>(t));
245  }
246 
247  static void* to_void_ptr(T& t) {
248  return static_cast<void*>(&static_cast<async_msg<filtered_type>&>(t));
249  }
250 
251  // Sender-classes use non-const interfaces
252  static const T& from_void_ptr(const void* p) {
253  return *static_cast<const T*>(static_cast<const async_msg<filtered_type>*>(p));
254  }
255 
256  static T& from_void_ptr(void* p) {
257  return *static_cast<T*>(static_cast<async_msg<filtered_type>*>(p));
258  }
259 
260  // Used in receiver<T> class
261  static task* try_put_task_wrapper_impl(receiver<T>* const this_recv, const void *p, bool is_async) {
262  if (is_async) {
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
void const char const char int ITT_FORMAT __itt_group_sync p
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task * task
internal::async_helpers< OutputType >::filtered_type filtered_type
Definition: flow_graph.h:403

◆ register_successor()

template<typename InputTuple , typename OutputType , typename StructTypes >
bool tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::register_successor ( successor_type r)
inlinevirtual

Add a new successor to this node.

Implements tbb::flow::interface10::internal::untyped_sender.

Definition at line 277 of file flow_graph.h.

278  {
279  template< typename, typename > friend class internal::predecessor_cache;
280  template< typename, typename > friend class internal::reservable_predecessor_cache;
281 public:
A cache of predecessors that only supports try_get.
An cache of predecessors that supports requests and reservations.

◆ remove_successor()

template<typename InputTuple , typename OutputType , typename StructTypes >
bool tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::remove_successor ( successor_type r)
inlinevirtual

Removes a successor from this node.

Implements tbb::flow::interface10::internal::untyped_sender.

Definition at line 283 of file flow_graph.h.

285  {}
286 
287  // NOTE: Following part of PUBLIC section is copy-paste from original sender<T> class

◆ reset_node()

template<typename InputTuple , typename OutputType , typename StructTypes >
void tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::reset_node ( reset_flags  f)
inlineprotectedvirtual

Implements tbb::flow::interface10::graph_node.

Definition at line 326 of file flow_graph.h.

330  {
331  template< typename, typename > friend class run_and_put_task;

◆ try_put_task()

template<typename InputTuple , typename OutputType , typename StructTypes >
task* tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::try_put_task ( output_type const *  v)
inline

Definition at line 289 of file flow_graph.h.

298  { return false; }

Friends And Related Function Documentation

◆ internal::aggregating_functor< class_type, indexer_node_base_operation >

template<typename InputTuple , typename OutputType , typename StructTypes >
friend class internal::aggregating_functor< class_type, indexer_node_base_operation >
friend

Definition at line 218 of file flow_graph.h.

Member Data Documentation

◆ my_aggregator

template<typename InputTuple , typename OutputType , typename StructTypes >
aggregator<handler_type, indexer_node_base_operation> tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_aggregator
private

Definition at line 219 of file flow_graph.h.

◆ my_graph

template<typename InputTuple , typename OutputType , typename StructTypes >
graph& tbb::flow::interface10::graph_node::my_graph
protected

Definition at line 432 of file _flow_graph_impl.h.

◆ my_successors

template<typename InputTuple , typename OutputType , typename StructTypes >
broadcast_cache<output_type, null_rw_mutex> tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_successors
private

Definition at line 334 of file flow_graph.h.

◆ N

template<typename InputTuple , typename OutputType , typename StructTypes >
const size_t tbb::flow::interface10::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::N = tbb::flow::tuple_size<InputTuple>::value
static

Definition at line 178 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.