Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args > Class Template Reference
Inheritance diagram for streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >:
Collaboration diagram for streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >:

Classes

class  run_finalize_func
 
class  run_kernel_func
 
class  send_func
 

Public Member Functions

 args_storage (const kernel_type &kernel, StreamFactory &f, Args &&... args)
 
 args_storage (const args_storage &k)
 
 args_storage (const args_storage_base &k, Args &&... args)
 
void enqueue (kernel_input_tuple &ip, output_ports_type &op, const streaming_node &n) __TBB_override
 
void send (device_type d) __TBB_override
 
args_storage_baseclone () const __TBB_override
 
- Public Member Functions inherited from streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base
virtual ~args_storage_base ()
 

Private Types

typedef args_storage_base::output_ports_type output_ports_type
 
typedef tbb::internal::stored_pack< Args... > args_pack_type
 

Private Member Functions

template<int N>
bool do_try_put (const kernel_input_tuple &ip, output_ports_type &op) const
 
template<int... S>
bool do_try_put (const kernel_input_tuple &ip, output_ports_type &op, internal::sequence< S... >) const
 

Static Private Member Functions

template<typename FinalizeFn >
static run_finalize_func< FinalizeFn > make_run_finalize_func (kernel_input_tuple &ip, StreamFactory &factory, FinalizeFn fn)
 

Private Attributes

args_pack_type my_args_pack
 

Additional Inherited Members

- Public Types inherited from streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base
typedef kernel_multifunction_node::output_ports_type output_ports_type
 
- Protected Member Functions inherited from streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base
 args_storage_base (const kernel_type &kernel, StreamFactory &f)
 
 args_storage_base (const args_storage_base &k)
 
- Protected Attributes inherited from streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base
const kernel_type my_kernel
 
StreamFactory & my_factory
 

Detailed Description

template<typename... Ports, typename JP, typename StreamFactory>
template<typename... Args>
class streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >

Definition at line 490 of file _flow_graph_streaming_node.h.

Member Typedef Documentation

◆ args_pack_type

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
typedef tbb::internal::stored_pack<Args...> streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::args_pack_type
private

Definition at line 629 of file _flow_graph_streaming_node.h.

◆ output_ports_type

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
typedef args_storage_base::output_ports_type streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::output_ports_type
private

Definition at line 491 of file _flow_graph_streaming_node.h.

Constructor & Destructor Documentation

◆ args_storage() [1/3]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::args_storage ( const kernel_type kernel,
StreamFactory &  f,
Args &&...  args 
)
inline

Definition at line 586 of file _flow_graph_streaming_node.h.

587  : args_storage_base( kernel, f )
588  , my_args_pack( std::forward<Args>(args)... )
589  {}

◆ args_storage() [2/3]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::args_storage ( const args_storage &  k)
inline

◆ args_storage() [3/3]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::args_storage ( const args_storage_base k,
Args &&...  args 
)
inline

Member Function Documentation

◆ clone()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
args_storage_base* streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::clone ( ) const
inlinevirtual

Implements streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base.

Definition at line 623 of file _flow_graph_streaming_node.h.

623  {
624  // Create new args_storage with copying constructor.
625  return new args_storage<Args...>( *this );
626  }
args_storage(const kernel_type &kernel, StreamFactory &f, Args &&... args)

◆ do_try_put() [1/2]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
template<int N>
bool streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::do_try_put ( const kernel_input_tuple ip,
output_ports_type op 
) const
inlineprivate

Definition at line 495 of file _flow_graph_streaming_node.h.

495  {
496  const auto& t = get<N + 1>( ip );
497  auto &port = get<N>( op );
498  return port.try_put( t );
499  }

◆ do_try_put() [2/2]

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
template<int... S>
bool streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::do_try_put ( const kernel_input_tuple ip,
output_ports_type op,
internal::sequence< S... >   
) const
inlineprivate

Definition at line 502 of file _flow_graph_streaming_node.h.

502  {
503  return internal::or_return_values( do_try_put<S>( ip, op )... );
504  }

References internal::or_return_values().

Here is the call graph for this function:

◆ enqueue()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
void streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::enqueue ( kernel_input_tuple ip,
output_ports_type op,
const streaming_node< tuple< Ports... >, JP, StreamFactory > &  n 
)
inlinevirtual

Implements streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base.

Definition at line 595 of file _flow_graph_streaming_node.h.

595  {
596  // Make const qualified args_pack (from non-const)
597  const args_pack_type& const_args_pack = my_args_pack;
598  // factory.enqure_kernel() gets
599  // - 'ip' tuple elements by reference and updates it (and 'ip') with dependencies
600  // - arguments (from my_args_pack) by const-reference via const_args_pack
601  tbb::internal::call( run_kernel_func( ip, n, *this ), const_args_pack );
602 
603  if (! do_try_put( ip, op, input_sequence() ) ) {
604  graph& g = n.my_graph;
605  // No one message was passed to successors so set a callback to extend the graph lifetime until the kernel completion.
606  g.increment_wait_count();
607 
608  // factory.finalize() gets
609  // - 'ip' tuple elements by reference, so 'ip' might be changed
610  // - arguments (from my_args_pack) by const-reference via const_args_pack
612  g.decrement_wait_count();
613  }), const_args_pack );
614  }
615  }
void call(F &&f, Pack &&p)
Calls the given function with arguments taken from a stored_pack.
static run_finalize_func< FinalizeFn > make_run_finalize_func(kernel_input_tuple &ip, StreamFactory &factory, FinalizeFn fn)
internal::make_sequence< NUM_INPUTS >::type input_sequence
bool do_try_put(const kernel_input_tuple &ip, output_ports_type &op) const

References tbb::internal::call(), and tbb::flow::interface11::internal::do_try_put().

Here is the call graph for this function:

◆ make_run_finalize_func()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
template<typename FinalizeFn >
static run_finalize_func<FinalizeFn> streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::make_run_finalize_func ( kernel_input_tuple ip,
StreamFactory &  factory,
FinalizeFn  fn 
)
inlinestaticprivate

Definition at line 567 of file _flow_graph_streaming_node.h.

567  {
568  return run_finalize_func<FinalizeFn>( ip, factory, fn );
569  }
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_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d __itt_event ITT_FORMAT __itt_group_mark d void const wchar_t const wchar_t int ITT_FORMAT __itt_group_sync __itt_group_fsync x void const wchar_t int const wchar_t int int ITT_FORMAT __itt_group_sync __itt_group_fsync x void ITT_FORMAT __itt_group_sync __itt_group_fsync p void ITT_FORMAT __itt_group_sync __itt_group_fsync p void size_t ITT_FORMAT lu no args __itt_obj_prop_t __itt_obj_state_t ITT_FORMAT d const char ITT_FORMAT s const char ITT_FORMAT s __itt_frame ITT_FORMAT p __itt_counter ITT_FORMAT p __itt_counter unsigned long long ITT_FORMAT lu __itt_counter unsigned long long ITT_FORMAT lu __itt_counter __itt_clock_domain unsigned long long void ITT_FORMAT p const wchar_t ITT_FORMAT S __itt_mark_type const wchar_t ITT_FORMAT S __itt_mark_type const char ITT_FORMAT s __itt_mark_type ITT_FORMAT d __itt_caller ITT_FORMAT p __itt_caller ITT_FORMAT p no args const __itt_domain __itt_clock_domain unsigned long long __itt_id ITT_FORMAT lu const __itt_domain __itt_clock_domain unsigned long long __itt_id __itt_id void * fn

References fn.

◆ send()

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
void streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::send ( device_type  d)
inlinevirtual

Implements streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage_base.

Definition at line 617 of file _flow_graph_streaming_node.h.

617  {
618  // factory.send() gets arguments by reference and updates these arguments with dependencies
619  // (it gets but usually ignores port_ref-s)
620  tbb::internal::call( send_func( this->my_factory, d ), my_args_pack );
621  }
void call(F &&f, Pack &&p)
Calls the given function with arguments taken from a stored_pack.
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

References tbb::internal::call(), and d.

Here is the call graph for this function:

Member Data Documentation

◆ my_args_pack

template<typename... Ports, typename JP , typename StreamFactory >
template<typename... Args>
args_pack_type streaming_node< tuple< Ports... >, JP, StreamFactory >::args_storage< Args >::my_args_pack
private

Definition at line 630 of file _flow_graph_streaming_node.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.