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 > Struct Template Reference

`#include <flow_graph.h>`

Collaboration diagram for 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 >:

## Public Types

typedef T | async_type
typedef T::async_msg_data_type | 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 = true

## Detailed Description

### template<typename T>
struct 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 >

Definition at line 256 of file flow_graph.h.

## Member Typedef Documentation

## async_type

template<typename T >

typedef T 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 >::async_type

Definition at line 257 of file flow_graph.h.

## filtered_type

template<typename T >

typedef T::async_msg_data_type 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 >::filtered_type

Definition at line 258 of file flow_graph.h.

## Member Function Documentation

## from_void_ptr() [1/2]

template<typename T >

static const T& 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 >::from_void_ptr | ( | const void * | p | ) |

inline static

Definition at line 272 of file flow_graph.h.

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

References p.

## from_void_ptr() [2/2]

template<typename T >

static T& 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 >::from_void_ptr | ( | void * | p | ) |

inline static

Definition at line 276 of file flow_graph.h.

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

References p.

## to_void_ptr() [1/2]

template<typename T >

static const void* 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 >::to_void_ptr | ( | const T & | t | ) |

inline static

Definition at line 263 of file flow_graph.h.

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

## to_void_ptr() [2/2]

template<typename T >

static void* 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 >::to_void_ptr | ( | T & | t | ) |

inline static

Definition at line 267 of file flow_graph.h.

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

## try_put_task_wrapper_impl()

template<typename T >

static task* 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 | ( | receiver< T > *const | this_recv,
|  | const void * | p,
|  | bool | is_async
| ) |  |

inline static

Definition at line 281 of file flow_graph.h.

{
if (is_async) {
// Both are async
return this_recv->try_put_task(from_void_ptr(p));
}
else {
// This (T) is async and incoming 'X t' is NOT async
// Create async_msg for X
const filtered_type& t = async_helpers<filtered_type>::from_void_ptr(p);
const T msg(t);
return this_recv->try_put_task(msg);
}
}

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

Here is the call graph for this function:

## Member Data Documentation

## is_async_type

template<typename T >

const bool 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 >::is_async_type = true

static

Definition at line 260 of file flow_graph.h.

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

- flow_graph.h

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 >::filtered_type
T::async_msg_data_type filtered_type
Definition: flow_graph.h:258
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 >::from_void_ptr
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:272
tbb::flow::interface11::internal::async_helpers::from_void_ptr
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:229
async_msg
Definition: _flow_graph_async_msg_impl.h:121
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91

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.