Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::internal::indexer_node_base< InputTuple, OutputType, StructTypes > Class Template Reference

indexer_node_base More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::internal::indexer_node_base< InputTuple, OutputType, StructTypes >:
Collaboration diagram for tbb::flow::interface11::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::interface11::internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
typedef OutputType output_type
 
typedef InputTuple input_type
 
- Public Types inherited from tbb::flow::interface11::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::interface11::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from tbb::flow::interface11::internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
 indexer_node_FE ()
 
input_typeinput_ports ()
 
- Public Member Functions inherited from tbb::flow::interface11::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::interface11::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::interface11::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::interface11::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::interface11::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::interface11::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 
- Protected Attributes inherited from tbb::flow::interface11::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 >
 

Additional Inherited Members

- Public Attributes inherited from tbb::flow::interface11::sender< OutputType >
__TBB_DEPRECATED typedef OutputType output_type
 The output type of this sender. More...
 
__TBB_DEPRECATED typedef internal::async_helpers< OutputType >::filtered_type filtered_type
 

Detailed Description

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

indexer_node_base

Definition at line 169 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::interface11::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::class_type
private

Definition at line 192 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::interface11::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::handler_type
private

Definition at line 213 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::interface11::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::input_ports_type

Definition at line 178 of file flow_graph.h.

◆ output_type

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

Definition at line 175 of file flow_graph.h.

◆ successor_type

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

Definition at line 177 of file flow_graph.h.

◆ tuple_types

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

Definition at line 176 of file flow_graph.h.

Member Enumeration Documentation

◆ op_type

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

Definition at line 186 of file flow_graph.h.

194  {

Constructor & Destructor Documentation

◆ indexer_node_base() [1/2]

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

Definition at line 261 of file flow_graph.h.

264  {
265  typedef T async_type;

◆ indexer_node_base() [2/2]

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

Definition at line 267 of file flow_graph.h.

271  {

Member Function Documentation

◆ handle_operations()

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

Definition at line 217 of file flow_graph.h.

218  {
219 
220 template < typename T > class async_storage;
221 
222 template< typename T, typename = void >
223 struct async_helpers {
224  typedef async_msg<T> async_type;
225  typedef T filtered_type;
226 
227  static const bool is_async_type = false;
228 
229  static const void* to_void_ptr(const T& t) {
230  return static_cast<const void*>(&t);
231  }
232 
233  static void* to_void_ptr(T& t) {
234  return static_cast<void*>(&t);
235  }
236 
237  static const T& from_void_ptr(const void* p) {
238  return *static_cast<const T*>(p);
239  }
240 
241  static T& from_void_ptr(void* p) {
242  return *static_cast<T*>(p);
243  }
244 
245  static task* try_put_task_wrapper_impl(receiver<T>* const this_recv, const void *p, bool is_async) {
246  if (is_async) {
247  // This (T) is NOT async and incoming 'A<X> t' IS async
248  // Get data from async_msg
249  const async_msg<filtered_type>& msg = async_helpers< async_msg<filtered_type> >::from_void_ptr(p);
250  task* const new_task = msg.my_storage->subscribe(*this_recv, this_recv->graph_reference());
251  // finalize() must be called after subscribe() because set() can be called in finalize()
252  // and 'this_recv' client must be subscribed by this moment
253  msg.finalize();
254  return new_task;
255  }
256  else {
257  // Incoming 't' is NOT async
258  return this_recv->try_put_task(from_void_ptr(p));
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
__TBB_DEPRECATED typedef internal::async_helpers< OutputType >::filtered_type filtered_type
Definition: flow_graph.h:430
virtual void finalize() const
async_storage_ptr my_storage

◆ register_successor()

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

Add a new successor to this node.

Implements tbb::flow::interface11::internal::untyped_sender.

Definition at line 273 of file flow_graph.h.

275  {
276  return static_cast<void*>(&static_cast<async_msg<filtered_type>&>(t));
277  }

◆ remove_successor()

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

Removes a successor from this node.

Implements tbb::flow::interface11::internal::untyped_sender.

Definition at line 279 of file flow_graph.h.

280  {
281  return *static_cast<const T*>(static_cast<const async_msg<filtered_type>*>(p));
282  }
283 
void const char const char int ITT_FORMAT __itt_group_sync p

◆ reset_node()

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

Implements tbb::flow::interface11::graph_node.

Definition at line 322 of file flow_graph.h.

326  { return false; }
327 

◆ try_put_task()

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

Definition at line 285 of file flow_graph.h.

289  {

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 214 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::interface11::internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_aggregator
private

Definition at line 215 of file flow_graph.h.

◆ my_graph

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

Definition at line 464 of file _flow_graph_impl.h.

◆ my_successors

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

Definition at line 330 of file flow_graph.h.

◆ N

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

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