Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::sender< T > Class Template Reference

Forward declaration section. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::sender< T >:
Collaboration diagram for tbb::flow::interface11::sender< T >:

Public Member Functions

virtual bool try_get (T &)
 Request an item from the sender. More...
 
virtual bool try_reserve (T &)
 Reserves an item in the sender. More...
 
- Public Member Functions inherited from tbb::flow::interface11::internal::untyped_sender
virtual ~untyped_sender ()
 
virtual bool register_successor (successor_type &r)=0
 Add a new successor to this node. More...
 
virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node. More...
 
virtual bool try_release ()
 Releases the reserved item. More...
 
virtual bool try_consume ()
 Consumes the reserved item. More...
 

Public Attributes

__TBB_DEPRECATED typedef T output_type
 The output type of this sender. More...
 
__TBB_DEPRECATED typedef internal::async_helpers< T >::filtered_type filtered_type
 

Protected Member Functions

virtual bool try_get_wrapper (void *p, bool is_async) __TBB_override
 
virtual bool try_reserve_wrapper (void *p, bool is_async) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface11::internal::untyped_sender
template<typename X >
bool try_get (X &t)
 Request an item from the sender. More...
 
template<typename X >
bool try_reserve (X &t)
 Reserves an item in the sender. More...
 

Additional Inherited Members

- Public Types inherited from tbb::flow::interface11::internal::untyped_sender
typedef untyped_receiver successor_type
 The successor type for this node. More...
 

Detailed Description

template<typename T>
class tbb::flow::interface11::sender< T >

Forward declaration section.

Pure virtual template class that defines a sender of messages of type T.

Definition at line 116 of file flow_graph.h.

Member Function Documentation

◆ try_get()

template<typename T>
virtual bool tbb::flow::interface11::sender< T >::try_get ( T &  )
inlinevirtual

Request an item from the sender.

Reimplemented in tbb::flow::interface11::buffer_node< T, Allocator >, tbb::flow::interface11::source_node< Output >, tbb::flow::interface11::input_node< Output >, and tbb::flow::interface11::overwrite_node< T >.

Definition at line 432 of file flow_graph.h.

432 { return false; }

Referenced by tbb::flow::interface11::sender< Output >::try_get_wrapper().

Here is the caller graph for this function:

◆ try_get_wrapper()

template<typename T>
virtual bool tbb::flow::interface11::sender< T >::try_get_wrapper ( void p,
bool  is_async 
)
inlineprotectedvirtual

Implements tbb::flow::interface11::internal::untyped_sender.

Definition at line 438 of file flow_graph.h.

438  {
439  // Both async OR both are NOT async
440  if ( internal::async_helpers<T>::is_async_type == is_async ) {
442  }
443  // Else: this (T) is async OR incoming 't' is async
444  __TBB_ASSERT(false, "async_msg interface does not support 'pull' protocol in try_get()");
445  return false;
446  }

◆ try_reserve()

template<typename T>
virtual bool tbb::flow::interface11::sender< T >::try_reserve ( T &  )
inlinevirtual

Reserves an item in the sender.

Reimplemented in tbb::flow::interface11::overwrite_node< T >, tbb::flow::interface11::buffer_node< T, Allocator >, tbb::flow::interface11::source_node< Output >, and tbb::flow::interface11::input_node< Output >.

Definition at line 435 of file flow_graph.h.

435 { return false; }

Referenced by tbb::flow::interface11::sender< Output >::try_reserve_wrapper().

Here is the caller graph for this function:

◆ try_reserve_wrapper()

template<typename T>
virtual bool tbb::flow::interface11::sender< T >::try_reserve_wrapper ( void p,
bool  is_async 
)
inlineprotectedvirtual

Implements tbb::flow::interface11::internal::untyped_sender.

Definition at line 448 of file flow_graph.h.

448  {
449  // Both async OR both are NOT async
450  if ( internal::async_helpers<T>::is_async_type == is_async ) {
452  }
453  // Else: this (T) is async OR incoming 't' is async
454  __TBB_ASSERT(false, "async_msg interface does not support 'pull' protocol in try_reserve()");
455  return false;
456  }

Member Data Documentation

◆ filtered_type

template<typename T>
__TBB_DEPRECATED typedef internal::async_helpers<T>::filtered_type tbb::flow::interface11::sender< T >::filtered_type

Definition at line 429 of file flow_graph.h.

◆ output_type

template<typename T>
__TBB_DEPRECATED typedef T tbb::flow::interface11::sender< T >::output_type

The output type of this sender.

Definition at line 427 of file flow_graph.h.


The documentation for this class was generated from the following file:
tbb::flow::interface11::internal::async_helpers< T >::is_async_type
static const bool is_async_type
Definition: flow_graph.h:226
tbb::flow::interface11::internal::async_helpers< T >::from_void_ptr
static const T & from_void_ptr(const void *p)
Definition: flow_graph.h:236
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::flow::interface11::sender::try_get
virtual bool try_get(T &)
Request an item from the sender.
Definition: flow_graph.h:432
tbb::flow::interface11::sender::try_reserve
virtual bool try_reserve(T &)
Reserves an item in the sender.
Definition: flow_graph.h:435
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.