Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::internal Namespace Reference

Namespaces

 graph_policy_namespace
 

Classes

struct  aligned_pair
 
struct  alignment_of
 
class  apply_body_task_bypass
 A task that calls a node's apply_body_bypass function, passing in an input of type Input. More...
 
class  async_body
 
class  async_body_base
 
struct  async_helpers
 
struct  async_helpers< T, typename std::enable_if< std::is_base_of< async_msg< typename T::async_msg_data_type >, T >::value >::type >
 
class  async_storage
 
class  broadcast_cache
 A cache of successors that are broadcast to. More...
 
struct  buffer_element_type
 
struct  clear_element
 
struct  clear_element< 1 >
 
class  continue_input
 Implements methods for an executable node that takes continue_msg as input. More...
 
struct  convert_and_call_impl
 
struct  convert_and_call_impl< A1, Args1... >
 
struct  convert_and_call_impl<>
 
struct  count_element
 
class  decrementer
 
struct  default_constructed
 
struct  do_if
 
struct  do_if< T, false >
 
struct  do_if< T, true >
 
struct  emit_element
 
struct  emit_element< 1 >
 
struct  empty_body
 An empty functor that takes an Input and returns a default constructed Output. More...
 
struct  ERROR_Type_Not_allowed_In_Tagged_Msg_Not_Member_Of_Tuple
 
class  forward_task_bypass
 A task that calls a node's forward_task function. More...
 
struct  forwarding_base
 
class  function_body
 A functor that takes an Input and generates an Output. More...
 
class  function_body_leaf
 the leaf for function_body More...
 
class  function_body_leaf< continue_msg, continue_msg, B >
 the leaf for function_body specialized for Input and output of continue_msg More...
 
class  function_body_leaf< continue_msg, Output, B >
 the leaf for function_body specialized for Input of continue_msg More...
 
class  function_body_leaf< Input, continue_msg, B >
 the leaf for function_body specialized for Output of continue_msg More...
 
class  function_input
 Implements methods for a function node that takes a type Input as input and sends. More...
 
class  function_input_base
 Input and scheduling for a function node that takes a type Input as input. More...
 
class  function_input_queue
 
class  function_output
 Implements methods for both executable and function nodes that puts Output to its successors. More...
 
struct  graph_task_comparator
 
struct  has_policy
 
struct  has_policy< ExpectedPolicy, FirstPolicy, Policies... >
 
struct  has_policy< ExpectedPolicy, Policy< Policies... > >
 
struct  has_policy< ExpectedPolicy, SinglePolicy >
 
class  hash_buffer
 
struct  indexer_helper
 
struct  indexer_helper< TupleTypes, 1 >
 
class  indexer_input_port
 
class  indexer_node_base
 indexer_node_base More...
 
class  indexer_node_FE
 
struct  indexer_types
 
class  initializer_list_wrapper
 
struct  input_types
 
struct  input_types< 1, InputTuple >
 
struct  input_types< 10, InputTuple >
 
struct  input_types< 2, InputTuple >
 
struct  input_types< 3, InputTuple >
 
struct  input_types< 4, InputTuple >
 
struct  input_types< 5, InputTuple >
 
struct  input_types< 6, InputTuple >
 
struct  input_types< 7, InputTuple >
 
struct  input_types< 8, InputTuple >
 
struct  input_types< 9, InputTuple >
 
struct  is_element_of
 
struct  is_element_of< Q, 0, Tuple >
 
struct  is_port_ref
 
struct  is_port_ref_impl
 
struct  is_port_ref_impl< port_ref_impl< N1, N2 > >
 
struct  is_port_ref_impl< port_ref_impl< N1, N2 >(*)() >
 
class  item_buffer
 
struct  join_base
 
struct  join_base< N, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
struct  join_helper
 
struct  join_helper< 1 >
 
class  join_node_base
 join_node_base More...
 
class  join_node_FE
 join_node_FE : implements input port policy More...
 
class  join_node_FE< key_matching< K, KHash >, InputTuple, OutputTuple >
 
class  join_node_FE< queueing, InputTuple, OutputTuple >
 
class  join_node_FE< reserving, InputTuple, OutputTuple >
 
class  kernel_executor_helper
 
class  kernel_executor_helper< StreamFactory, KernelInputTuple, typename tbb::internal::void_t< typename StreamFactory::range_type >::type >
 
struct  key_from_message_body
 
struct  key_from_message_body< K &, T >
 
struct  key_from_policy
 
struct  key_from_policy< key_matching< Key & > >
 
struct  key_from_policy< key_matching< Key > >
 
class  key_matching_port
 
struct  key_to_count_functor
 
struct  KeyTrait
 
struct  make_sequence
 
struct  make_sequence< 0, S... >
 
struct  matching_forwarding_base
 
class  multifunction_body
 function_body that takes an Input and a set of output ports More...
 
class  multifunction_body_leaf
 leaf for multifunction. OutputSet can be a std::tuple or a vector. More...
 
class  multifunction_input
 Implements methods for a function node that takes a type Input as input. More...
 
class  multifunction_output
 
class  node_cache
 A node_cache maintains a std::queue of elements of type T. Each operation is protected by a lock. More...
 
struct  num_arguments
 
struct  num_arguments< port_ref_impl< N1, N2 > >
 
struct  num_arguments< port_ref_impl< N1, N2 >(*)()>
 
struct  pick_max
 
struct  pick_one
 
struct  pick_one< false, T1, T2 >
 
struct  pick_one< true, T1, T2 >
 
struct  pick_tuple_max
 
struct  pick_tuple_max< 0, Tuple, Selector >
 
struct  Policy
 
struct  port_ref_impl
 
class  predecessor_cache
 A cache of predecessors that only supports try_get. More...
 
class  priority_task_selector
 
class  queueing_port
 queueing join_port More...
 
class  reservable_item_buffer
 item_buffer with reservable front-end. NOTE: if reserving, do not More...
 
class  reservable_predecessor_cache
 An cache of predecessors that supports requests and reservations. More...
 
class  reserving_port
 The two-phase join port. More...
 
class  round_robin_cache
 A cache of successors that are put in a round-robin fashion. More...
 
class  sequence
 
struct  size_of
 
class  source_body
 A functor that takes no input and generates a value of type Output. More...
 
class  source_body_leaf
 The leaf for source_body. More...
 
class  source_task_bypass
 A task that calls a node's apply_body_bypass function with no input. More...
 
class  streaming_device_with_key
 
struct  streaming_node_traits
 
class  successor_cache
 An abstract cache of successors. More...
 
class  successor_cache< continue_msg >
 An abstract cache of successors, specialized to continue_msg. More...
 
class  tagged_msg
 
struct  tagged_null_type
 
struct  type_plus_align
 type mimicking std::pair but with trailing fill to ensure each element of an array More...
 
struct  type_plus_align< T1, T2, 0 >
 
class  type_to_key_function_body
 
class  type_to_key_function_body< Input, Output & >
 
class  type_to_key_function_body_leaf
 
class  type_to_key_function_body_leaf< Input, Output &, B >
 
class  unfolded_indexer_node
 
class  unfolded_join_node
 unfolded_join_node : passes input_ports_type to join_node_base. We build the input port type More...
 
class  unfolded_join_node< 10, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 2, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 3, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 4, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 5, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 6, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 7, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 8, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  unfolded_join_node< 9, key_matching_port, OutputTuple, key_matching< K, KHash > >
 
class  untyped_receiver
 
class  untyped_sender
 
struct  wrap_key_tuple_elements
 
struct  wrap_key_tuple_elements< 1, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 10, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 2, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 3, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 4, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 5, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 6, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 7, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 8, PT, KeyTraits, TypeTuple >
 
struct  wrap_key_tuple_elements< 9, PT, KeyTraits, TypeTuple >
 
struct  wrap_tuple_elements
 
struct  wrap_tuple_elements< 1, PT, TypeTuple >
 
struct  wrap_tuple_elements< 10, PT, TypeTuple >
 
struct  wrap_tuple_elements< 2, PT, TypeTuple >
 
struct  wrap_tuple_elements< 3, PT, TypeTuple >
 
struct  wrap_tuple_elements< 4, PT, TypeTuple >
 
struct  wrap_tuple_elements< 5, PT, TypeTuple >
 
struct  wrap_tuple_elements< 6, PT, TypeTuple >
 
struct  wrap_tuple_elements< 7, PT, TypeTuple >
 
struct  wrap_tuple_elements< 8, PT, TypeTuple >
 
struct  wrap_tuple_elements< 9, PT, TypeTuple >
 
struct  Wrapper
 
struct  Wrapper< T[N]>
 
struct  WrapperBase
 

Typedefs

typedef tbb::internal::uint64_t tag_value
 
typedef tbb::concurrent_priority_queue< graph_task *, graph_task_comparatorgraph_task_priority_queue_t
 

Enumerations

enum  op_stat { WAIT = 0, SUCCEEDED, FAILED }
 

Functions

template<typename V , typename T >
const V & cast_to (T const &t)
 
template<typename V , typename T >
bool is_a (T const &t)
 
template<size_t N, typename MOP >
tbb::flow::tuple_element< N, typename MOP::output_ports_type >::typeoutput_port (MOP &op)
 
void check_task_and_spawn (graph &g, task *t)
 
template<typename CompositeType >
void add_nodes_impl (CompositeType *, bool)
 
template<typename CompositeType , typename NodeType1 , typename... NodeTypes>
void add_nodes_impl (CompositeType *c_node, bool visible, const NodeType1 &n1, const NodeTypes &... n)
 
template<size_t N, typename JNT >
tbb::flow::tuple_element< N, typename JNT::input_ports_type >::typeinput_port (JNT &jn)
 templated function to refer to input ports of the join node More...
 
template<typename IndexerNodeBaseType , typename T , size_t K>
taskdo_try_put (const T &v, void *p)
 
template<typename... Args>
void ignore_return_values (Args &&...)
 
template<typename T >
or_return_values (T &&t)
 
template<typename T , typename... Rest>
or_return_values (T &&t, Rest &&... rest)
 
opencl_device_list find_available_devices ()
 
void activate_graph (graph &g)
 
void deactivate_graph (graph &g)
 
bool is_graph_active (graph &g)
 
void spawn_in_graph_arena (graph &g, tbb::task &arena_task)
 Spawns a task inside graph arena. More...
 
void add_task_to_graph_reset_list (graph &g, tbb::task *tp)
 
template<typename F >
void execute_in_graph_arena (graph &g, F &f)
 Executes custom functor inside graph arena. More...
 

Typedef Documentation

◆ graph_task_priority_queue_t

◆ tag_value

typedef tbb::internal::uint64_t tbb::flow::interface10::internal::tag_value

Definition at line 29 of file flow_graph.h.

Enumeration Type Documentation

◆ op_stat

Enumerator
WAIT 
SUCCEEDED 
FAILED 

Definition at line 706 of file flow_graph.h.

706 {

Function Documentation

◆ activate_graph()

void tbb::flow::interface10::internal::activate_graph ( graph g)
inline

Definition at line 450 of file _flow_graph_impl.h.

450  {
451  g.my_is_active = true;
452 }

References tbb::flow::interface10::graph::my_is_active.

Referenced by tbb::flow::interface10::graph::reset().

Here is the caller graph for this function:

◆ add_nodes_impl() [1/2]

◆ add_nodes_impl() [2/2]

template<typename CompositeType , typename NodeType1 , typename... NodeTypes>
void tbb::flow::interface10::internal::add_nodes_impl ( CompositeType *  c_node,
bool  visible,
const NodeType1 &  n1,
const NodeTypes &...  n 
)

Definition at line 882 of file flow_graph.h.

884  {
885  my_successors.set_owner(this);
886  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_SOURCE_NODE, &this->my_graph,
887  static_cast<sender<output_type> *>(this), this->my_body );
static void fgt_node_with_body(string_index, void *, void *, void *)

References tbb::internal::fgt_node_with_body(), tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::source_node< Output >::my_successors, and tbb::flow::interface10::internal::successor_cache< T, M >::set_owner().

Here is the call graph for this function:

◆ add_task_to_graph_reset_list()

void tbb::flow::interface10::internal::add_task_to_graph_reset_list ( graph g,
tbb::task tp 
)
inline

Definition at line 491 of file _flow_graph_impl.h.

491  {
492  g.my_reset_task_list.push_back(tp);
493 }

References tbb::flow::interface10::graph::my_reset_task_list.

◆ cast_to()

template<typename V , typename T >
const V& tbb::flow::interface10::internal::cast_to ( T const &  t)

Definition at line 701 of file flow_graph.h.

705 {

◆ check_task_and_spawn()

void tbb::flow::interface10::internal::check_task_and_spawn ( graph g,
task t 
)
inline

Definition at line 648 of file flow_graph.h.

652  }
static tbb::task *const SUCCESSFULLY_ENQUEUED

◆ deactivate_graph()

void tbb::flow::interface10::internal::deactivate_graph ( graph g)
inline

Definition at line 454 of file _flow_graph_impl.h.

454  {
455  g.my_is_active = false;
456 }

References tbb::flow::interface10::graph::my_is_active.

Referenced by tbb::flow::interface10::graph::reset().

Here is the caller graph for this function:

◆ do_try_put()

template<typename IndexerNodeBaseType , typename T , size_t K>
task* tbb::flow::interface10::internal::do_try_put ( const T &  v,
void p 
)

Definition at line 34 of file flow_graph.h.

◆ execute_in_graph_arena()

template<typename F >
void tbb::flow::interface10::internal::execute_in_graph_arena ( graph g,
F &  f 
)
inline

Executes custom functor inside graph arena.

Definition at line 464 of file _flow_graph_impl.h.

464  {
465  if (is_graph_active(g)) {
466  __TBB_ASSERT(g.my_task_arena && g.my_task_arena->is_active(), NULL);
467  g.my_task_arena->execute(f);
468  }
469 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT, tbb::interface7::task_arena::execute(), tbb::interface7::task_arena::is_active(), is_graph_active(), and tbb::flow::interface10::graph::my_task_arena.

Referenced by spawn_in_graph_arena(), and tbb::flow::interface10::async_node< Input, Output, Policy, Allocator >::try_put_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_available_devices()

opencl_device_list tbb::flow::interface10::internal::find_available_devices ( )
inline

Definition at line 280 of file flow_graph_opencl_node.h.

280  {
281  opencl_device_list opencl_devices;
282 
283  cl_uint num_platforms;
284  enforce_cl_retcode(clGetPlatformIDs(0, NULL, &num_platforms), "clGetPlatformIDs failed");
285 
286  std::vector<cl_platform_id> platforms(num_platforms);
287  enforce_cl_retcode(clGetPlatformIDs(num_platforms, platforms.data(), NULL), "clGetPlatformIDs failed");
288 
289  cl_uint num_devices;
290  std::vector<cl_platform_id>::iterator platforms_it = platforms.begin();
291  cl_uint num_all_devices = 0;
292  while (platforms_it != platforms.end()) {
293  cl_int err = clGetDeviceIDs(*platforms_it, CL_DEVICE_TYPE_ALL, 0, NULL, &num_devices);
294  if (err == CL_DEVICE_NOT_FOUND) {
295  platforms_it = platforms.erase(platforms_it);
296  }
297  else {
298  enforce_cl_retcode(err, "clGetDeviceIDs failed");
299  num_all_devices += num_devices;
300  ++platforms_it;
301  }
302  }
303 
304  std::vector<cl_device_id> devices(num_all_devices);
305  std::vector<cl_device_id>::iterator devices_it = devices.begin();
306  for (auto p = platforms.begin(); p != platforms.end(); ++p) {
307  enforce_cl_retcode(clGetDeviceIDs((*p), CL_DEVICE_TYPE_ALL, (cl_uint)std::distance(devices_it, devices.end()), &*devices_it, &num_devices), "clGetDeviceIDs failed");
308  devices_it += num_devices;
309  }
310 
311  for (auto d = devices.begin(); d != devices.end(); ++d) {
312  opencl_devices.add(opencl_device((*d)));
313  }
314 
315  return opencl_devices;
316 }
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 const char const char int ITT_FORMAT __itt_group_sync p
void enforce_cl_retcode(cl_int err, std::string msg)

References tbb::flow::interface10::opencl_device_list::add(), d, tbb::flow::interface10::enforce_cl_retcode(), and p.

Referenced by tbb::flow::interface10::opencl_info::available_devices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ignore_return_values()

template<typename... Args>
void tbb::flow::interface10::internal::ignore_return_values ( Args &&  ...)

Definition at line 64 of file flow_graph.h.

80 {

◆ input_port()

template<size_t N, typename JNT >
tbb::flow::tuple_element<N, typename JNT::input_ports_type>::type& tbb::flow::interface10::internal::input_port ( JNT &  jn)

templated function to refer to input ports of the join node

Definition at line 1993 of file flow_graph.h.

◆ is_a()

template<typename V , typename T >
bool tbb::flow::interface10::internal::is_a ( T const &  t)

Definition at line 704 of file flow_graph.h.

705 {

◆ is_graph_active()

◆ or_return_values() [1/2]

template<typename T >
T tbb::flow::interface10::internal::or_return_values ( T &&  t)

Definition at line 67 of file flow_graph.h.

80 {

◆ or_return_values() [2/2]

template<typename T , typename... Rest>
T tbb::flow::interface10::internal::or_return_values ( T &&  t,
Rest &&...  rest 
)

Definition at line 69 of file flow_graph.h.

80  {

◆ output_port()

template<size_t N, typename MOP >
tbb::flow::tuple_element<N, typename MOP::output_ports_type>::type& tbb::flow::interface10::internal::output_port ( MOP &  op)

Definition at line 644 of file flow_graph.h.

static tbb::task *const SUCCESSFULLY_ENQUEUED

◆ spawn_in_graph_arena()

void tbb::flow::interface10::internal::spawn_in_graph_arena ( graph g,
tbb::task arena_task 
)
inline

Spawns a task inside graph arena.

Non-preemptive priority pattern. The original task is submitted as a work item to the priority queue, and a new critical task is created to take and execute a work item with the highest known priority. The reference counting responsibility is transferred (via allocate_continuation) to the new task.

Non-preemptive priority pattern. The original task is submitted as a work item to the priority queue, and a new critical task is created to take and execute a work item with the highest known priority. The reference counting responsibility is transferred (via allocate_continuation) to the new task.

Definition at line 472 of file _flow_graph_impl.h.

472  {
473  task* task_to_spawn = &arena_task;
474 #if __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
475  // TODO: change flow graph's interfaces to work with graph_task type instead of tbb::task.
476  graph_task* t = static_cast<graph_task*>(&arena_task);
477  if( t->priority != no_priority ) {
482  task_to_spawn = new( t->allocate_continuation() ) priority_task_selector(g.my_priority_queue);
483  tbb::internal::make_critical( *task_to_spawn );
484  g.my_priority_queue.push(t);
485  }
486 #endif /* __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES */
487  graph::spawn_functor s_fn(*task_to_spawn);
488  execute_in_graph_arena(g, s_fn);
489 }
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
void execute_in_graph_arena(graph &g, F &f)
Executes custom functor inside graph arena.
void make_critical(task &t)
Definition: task.h:957
static const node_priority_t no_priority

References tbb::task::allocate_continuation(), execute_in_graph_arena(), tbb::internal::make_critical(), tbb::flow::interface10::graph::my_priority_queue, tbb::flow::internal::no_priority, tbb::flow::interface10::graph_task::priority, and tbb::interface5::concurrent_priority_queue< T, Compare, A >::push().

Referenced by internal::function_input< Input, Output, Policy, A >::apply_body_impl_bypass(), check_task_and_spawn(), internal::join_node_FE< reserving, InputTuple, OutputTuple >::decrement_port_count(), internal::join_node_FE< queueing, InputTuple, OutputTuple >::decrement_port_count(), internal::join_node_FE< key_matching< K, KHash >, InputTuple, OutputTuple >::fill_output_buffer(), tbb::flow::interface10::limiter_node< T >::forward_task(), internal::join_node_base< JP, InputTuple, OutputTuple >::handle_operations(), tbb::flow::interface10::limiter_node< T >::register_predecessor(), tbb::flow::interface10::limiter_node< T >::register_successor(), tbb::flow::interface10a::overwrite_node< T >::register_successor(), tbb::flow::interface10::graph::reset(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::spawn_forward_task(), and tbb::flow::interface10::source_node< Output >::spawn_put().

Here is the call graph for this function:
Here is the caller graph for this function:

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.