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

indexer_node_base More...

#include <_flow_graph_indexer_impl.h>

Inheritance diagram for internal::indexer_node_base< InputTuple, OutputType, StructTypes >:
Collaboration diagram for 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 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 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 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...
 

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_mutex > my_successors
 

Friends

class internal::aggregating_functor< class_type, indexer_node_base_operation >
 

Additional Inherited Members

- Protected Attributes inherited from internal::indexer_node_FE< InputTuple, OutputType, StructTypes >
input_type my_inputs
 

Detailed Description

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

indexer_node_base

Definition at line 173 of file _flow_graph_indexer_impl.h.

Member Typedef Documentation

◆ class_type

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

Definition at line 196 of file _flow_graph_indexer_impl.h.

◆ handler_type

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

Definition at line 217 of file _flow_graph_indexer_impl.h.

◆ input_ports_type

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

Definition at line 182 of file _flow_graph_indexer_impl.h.

◆ output_type

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

Definition at line 179 of file _flow_graph_indexer_impl.h.

◆ successor_type

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

Definition at line 181 of file _flow_graph_indexer_impl.h.

◆ tuple_types

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

Definition at line 180 of file _flow_graph_indexer_impl.h.

Member Enumeration Documentation

◆ op_type

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

Definition at line 190 of file _flow_graph_indexer_impl.h.

191 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
192  , add_blt_succ, del_blt_succ,
193  blt_succ_cnt, blt_succ_cpy
194 #endif
195  };

Constructor & Destructor Documentation

◆ indexer_node_base() [1/2]

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

Definition at line 265 of file _flow_graph_indexer_impl.h.

265  : graph_node(g), input_ports_type() {
267  my_successors.set_owner(this);
268  my_aggregator.initialize_handler(handler_type(this));
269  }
indexer_node_FE< InputTuple, output_type, StructTypes > input_ports_type
internal::aggregating_functor< class_type, indexer_node_base_operation > handler_type
aggregator< handler_type, indexer_node_base_operation > my_aggregator
broadcast_cache< output_type, null_rw_mutex > my_successors
void set_owner(owner_type *owner)
static void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBaseType *p, graph &g)

References internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_aggregator, internal::indexer_node_FE< InputTuple, OutputType, StructTypes >::my_inputs, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_successors, internal::indexer_helper< TupleTypes, N >::set_indexer_node_pointer(), and internal::successor_cache< T, M >::set_owner().

Here is the call graph for this function:

◆ indexer_node_base() [2/2]

template<typename InputTuple , typename OutputType , typename StructTypes >
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_indexer_impl.h.

271  : graph_node(other.my_graph), input_ports_type(), sender<output_type>() {
273  my_successors.set_owner(this);
274  my_aggregator.initialize_handler(handler_type(this));
275  }
indexer_node_FE< InputTuple, output_type, StructTypes > input_ports_type
internal::aggregating_functor< class_type, indexer_node_base_operation > handler_type
aggregator< handler_type, indexer_node_base_operation > my_aggregator
broadcast_cache< output_type, null_rw_mutex > my_successors
void set_owner(owner_type *owner)
static void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBaseType *p, graph &g)

References internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_aggregator, internal::indexer_node_FE< InputTuple, OutputType, StructTypes >::my_inputs, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_successors, internal::indexer_helper< TupleTypes, N >::set_indexer_node_pointer(), and internal::successor_cache< T, M >::set_owner().

Here is the call graph for this function:

Member Function Documentation

◆ handle_operations()

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

Definition at line 221 of file _flow_graph_indexer_impl.h.

221  {
222  indexer_node_base_operation *current;
223  while(op_list) {
224  current = op_list;
225  op_list = op_list->next;
226  switch(current->type) {
227 
228  case reg_succ:
229  my_successors.register_successor(*(current->my_succ));
230  __TBB_store_with_release(current->status, SUCCEEDED);
231  break;
232 
233  case rem_succ:
234  my_successors.remove_successor(*(current->my_succ));
235  __TBB_store_with_release(current->status, SUCCEEDED);
236  break;
237  case try__put_task: {
238  current->bypass_t = my_successors.try_put_task(*(current->my_arg));
239  __TBB_store_with_release(current->status, SUCCEEDED); // return of try_put_task actual return value
240  }
241  break;
242 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
243  case add_blt_succ:
244  my_successors.internal_add_built_successor(*(current->my_succ));
245  __TBB_store_with_release(current->status, SUCCEEDED);
246  break;
247  case del_blt_succ:
248  my_successors.internal_delete_built_successor(*(current->my_succ));
249  __TBB_store_with_release(current->status, SUCCEEDED);
250  break;
251  case blt_succ_cnt:
252  current->cnt_val = my_successors.successor_count();
253  __TBB_store_with_release(current->status, SUCCEEDED);
254  break;
255  case blt_succ_cpy:
256  my_successors.copy_successors(*(current->succv));
257  __TBB_store_with_release(current->status, SUCCEEDED);
258  break;
259 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
260  }
261  }
262  }
void register_successor(successor_type &r)
broadcast_cache< output_type, null_rw_mutex > my_successors
void remove_successor(successor_type &r)
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:717
task * try_put_task(const T &t) __TBB_override

References tbb::internal::__TBB_store_with_release(), internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base_operation::bypass_t, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base_operation::my_arg, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base_operation::my_succ, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_successors, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::reg_succ, internal::successor_cache< T, M >::register_successor(), internal::indexer_node_base< InputTuple, OutputType, StructTypes >::rem_succ, internal::successor_cache< T, M >::remove_successor(), SUCCEEDED, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::try__put_task, internal::broadcast_cache< T, M >::try_put_task(), and internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base_operation::type.

Here is the call graph for this function:

◆ register_successor()

template<typename InputTuple , typename OutputType , typename StructTypes >
bool 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_indexer_impl.h.

277  {
278  indexer_node_base_operation op_data(r, reg_succ);
279  my_aggregator.execute(&op_data);
280  return op_data.status == SUCCEEDED;
281  }
aggregator< handler_type, indexer_node_base_operation > my_aggregator

References internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_aggregator, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::reg_succ, and SUCCEEDED.

◆ remove_successor()

template<typename InputTuple , typename OutputType , typename StructTypes >
bool 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_indexer_impl.h.

283  {
284  indexer_node_base_operation op_data(r, rem_succ);
285  my_aggregator.execute(&op_data);
286  return op_data.status == SUCCEEDED;
287  }
aggregator< handler_type, indexer_node_base_operation > my_aggregator

References internal::indexer_node_base< InputTuple, OutputType, StructTypes >::my_aggregator, internal::indexer_node_base< InputTuple, OutputType, StructTypes >::rem_succ, and SUCCEEDED.

◆ reset_node()

template<typename InputTuple , typename OutputType , typename StructTypes >
void internal::indexer_node_base< InputTuple, OutputType, StructTypes >::reset_node ( reset_flags  f)
inlineprotected

◆ try_put_task()

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

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_indexer_impl.h.

Member Data Documentation

◆ my_aggregator

◆ my_successors

◆ N

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

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