tbb::flow::interface11::internal::async_helpers< T, typename > Struct Template Reference

`#include <flow_graph.h>`

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

## Public Types

typedef async_msg< T > | async_type
typedef T | filtered_type

## Static Public Member Functions

static const void * | to_void_ptr (const T &t)
static void * | to_void_ptr (T &t)
static const T & | from_void_ptr (const void *p)
static T & | from_void_ptr (void *p)
static task * | try_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::interface11::internal::async_helpers< T, typename >

Definition at line 223 of file flow_graph.h.

## Member Typedef Documentation

## async_type

template<typename T , typename = void>

typedef async_msg<T> tbb::flow::interface11::internal::async_helpers< T, typename >::async_type

Definition at line 224 of file flow_graph.h.

## filtered_type

template<typename T , typename = void>

typedef T tbb::flow::interface11::internal::async_helpers< T, typename >::filtered_type

Definition at line 225 of file flow_graph.h.

## Member Function Documentation

## from_void_ptr() [1/2]

template<typename T , typename = void>

static const T& tbb::flow::interface11::internal::async_helpers< T, typename >::from_void_ptr | ( | const void * | p | ) |

inline static

Definition at line 237 of file flow_graph.h.

{
return *static_cast<const T*>(p);
}
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91

References p.

Referenced by tbb::flow::interface11::internal::async_helpers< T, typename >::try_put_task_wrapper_impl(), and tbb::flow::interface11::internal::async_helpers< T, typename std::enable_if< std::is_base_of< async_msg< typename T::async_msg_data_type >, T >::value >::type >::try_put_task_wrapper_impl().

Here is the caller graph for this function:

## from_void_ptr() [2/2]

template<typename T , typename = void>

static T& tbb::flow::interface11::internal::async_helpers< T, typename >::from_void_ptr | ( | void * | p | ) |

inline static

Definition at line 241 of file flow_graph.h.

{
return *static_cast<T*>(p);
}

References p.

## to_void_ptr() [1/2]

template<typename T , typename = void>

static const void* tbb::flow::interface11::internal::async_helpers< T, typename >::to_void_ptr | ( | const T & | t | ) |

inline static

Definition at line 229 of file flow_graph.h.

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

## to_void_ptr() [2/2]

template<typename T , typename = void>

static void* tbb::flow::interface11::internal::async_helpers< T, typename >::to_void_ptr | ( | T & | t | ) |

inline static

Definition at line 233 of file flow_graph.h.

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

## try_put_task_wrapper_impl()

template<typename T , typename = void>

static task* tbb::flow::interface11::internal::async_helpers< T, typename >::try_put_task_wrapper_impl | ( | receiver< T > *const | this_recv,
|  | const void * | p,
|  | bool | is_async
| ) |  |

inline static

Definition at line 245 of file flow_graph.h.

{
if (is_async) {
// This (T) is NOT async and incoming 'A<X> t' IS async
// Get data from async_msg
const async_msg<filtered_type>& msg = async_helpers< async_msg<filtered_type> >::from_void_ptr(p);
task* const new_task = msg.my_storage->subscribe(*this_recv, this_recv->graph_reference());
// finalize() must be called after subscribe() because set() can be called in finalize()
// and 'this_recv' client must be subscribed by this moment
msg.finalize();
return new_task;
}
else {
// Incoming 't' is NOT async
return this_recv->try_put_task(from_void_ptr(p));
}
}
task
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
Definition: ittnotify_static.h:119
tbb::flow::interface11::internal::async_helpers::from_void_ptr
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:237

References tbb::flow::interface11::internal::async_helpers< T, typename >::from_void_ptr(), tbb::flow::interface11::internal::untyped_receiver::graph_reference(), p, and tbb::flow::interface11::receiver< T >::try_put_task().

Referenced by tbb::flow::interface11::receiver< T >::try_put_task_wrapper().

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

## Member Data Documentation

## is_async_type

template<typename T , typename = void>

const bool tbb::flow::interface11::internal::async_helpers< T, typename >::is_async_type = false

static

Definition at line 227 of file flow_graph.h.

The documentation for this struct was generated from the following file:

- flow_graph.h

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.