Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::internal::async_helpers< T, typename > Struct Template Reference

#include <flow_graph.h>

Collaboration diagram for tbb::flow::interface10::internal::async_helpers< T, typename >:

Public Types

typedef async_msg< T > async_type
 
typedef T filtered_type
 

Static Public Member Functions

static const voidto_void_ptr (const T &t)
 
static voidto_void_ptr (T &t)
 
static const T & from_void_ptr (const void *p)
 
static T & from_void_ptr (void *p)
 
static tasktry_put_task_wrapper_impl (receiver< T > *const this_recv, const void *p, bool is_async)
 

Static Public Attributes

static const bool is_async_type = false
 

Detailed Description

template<typename T, typename = void>
struct tbb::flow::interface10::internal::async_helpers< T, typename >

Definition at line 195 of file flow_graph.h.

Member Typedef Documentation

◆ async_type

template<typename T, typename = void>
typedef async_msg<T> tbb::flow::interface10::internal::async_helpers< T, typename >::async_type

Definition at line 196 of file flow_graph.h.

◆ filtered_type

template<typename T, typename = void>
typedef T tbb::flow::interface10::internal::async_helpers< T, typename >::filtered_type

Definition at line 197 of file flow_graph.h.

Member Function Documentation

◆ from_void_ptr() [1/2]

template<typename T, typename = void>
static const T& tbb::flow::interface10::internal::async_helpers< T, typename >::from_void_ptr ( const void p)
inlinestatic

Definition at line 209 of file flow_graph.h.

209  {
210  return *static_cast<const T*>(p);
211  }
void const char const char int ITT_FORMAT __itt_group_sync p

◆ from_void_ptr() [2/2]

template<typename T, typename = void>
static T& tbb::flow::interface10::internal::async_helpers< T, typename >::from_void_ptr ( void p)
inlinestatic

Definition at line 213 of file flow_graph.h.

213  {
214  return *static_cast<T*>(p);
215  }
void const char const char int ITT_FORMAT __itt_group_sync p

◆ to_void_ptr() [1/2]

template<typename T, typename = void>
static const void* tbb::flow::interface10::internal::async_helpers< T, typename >::to_void_ptr ( const T &  t)
inlinestatic

Definition at line 201 of file flow_graph.h.

201  {
202  return static_cast<const void*>(&t);
203  }

◆ to_void_ptr() [2/2]

template<typename T, typename = void>
static void* tbb::flow::interface10::internal::async_helpers< T, typename >::to_void_ptr ( T &  t)
inlinestatic

Definition at line 205 of file flow_graph.h.

205  {
206  return static_cast<void*>(&t);
207  }

◆ try_put_task_wrapper_impl()

template<typename T, typename = void>
static task* tbb::flow::interface10::internal::async_helpers< T, typename >::try_put_task_wrapper_impl ( receiver< T > *const  this_recv,
const void p,
bool  is_async 
)
inlinestatic

Definition at line 217 of file flow_graph.h.

217  {
218  if (is_async) {
219  // This (T) is NOT async and incoming 'A<X> t' IS async
220  // Get data from async_msg
221  const async_msg<filtered_type>& msg = async_helpers< async_msg<filtered_type> >::from_void_ptr(p);
222  task* const new_task = msg.my_storage->subscribe(*this_recv, this_recv->graph_reference());
223  // finalize() must be called after subscribe() because set() can be called in finalize()
224  // and 'this_recv' client must be subscribed by this moment
225  msg.finalize();
226  return new_task;
227  }
228  else {
229  // Incoming 't' is NOT async
230  return this_recv->try_put_task(from_void_ptr(p));
231  }
232  }
async_storage_ptr my_storage
virtual void finalize() const
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:209
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 const char const char int ITT_FORMAT __itt_group_sync p

Member Data Documentation

◆ is_async_type

template<typename T, typename = void>
const bool tbb::flow::interface10::internal::async_helpers< T, typename >::is_async_type = false
static

Definition at line 199 of file flow_graph.h.


The documentation for this struct 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.