Intel(R) Threading Building Blocks Doxygen Documentation version 4.2.3
Loading...
Searching...
No Matches
tbb::flow::interface11::write_once_node< T > Class Template Reference

#include <flow_graph.h>

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

Public Types

typedef T input_type
 
typedef T output_type
 
typedef overwrite_node< T > base_type
 
typedef receiver< input_type >::predecessor_type predecessor_type
 
typedef sender< output_type >::successor_type successor_type
 
- Public Types inherited from tbb::flow::interface11::overwrite_node< T >
typedef T input_type
 
typedef T output_type
 
typedef receiver< input_type >::predecessor_type predecessor_type
 
typedef sender< output_type >::successor_type successor_type
 
- Public Types inherited from tbb::flow::interface11::internal::untyped_receiver
typedef untyped_sender predecessor_type
 The predecessor type for this node.
 
- Public Types inherited from tbb::flow::interface11::internal::untyped_sender
typedef untyped_receiver successor_type
 The successor type for this node.
 

Public Member Functions

__TBB_NOINLINE_SYM write_once_node (graph &g)
 Constructor.
 
__TBB_NOINLINE_SYM write_once_node (const write_once_node &src)
 Copy constructor: call base class copy constructor.
 
- Public Member Functions inherited from tbb::flow::interface11::overwrite_node< T >
__TBB_NOINLINE_SYM overwrite_node (graph &g)
 
__TBB_NOINLINE_SYM overwrite_node (const overwrite_node &src)
 Copy constructor; doesn't take anything from src; default won't work.
 
 ~overwrite_node ()
 
bool register_successor (successor_type &s) __TBB_override
 Add a new successor to this node.
 
bool remove_successor (successor_type &s) __TBB_override
 Removes a successor from this node.
 
bool try_get (input_type &v) __TBB_override
 Request an item from the sender.
 
bool try_reserve (T &v) __TBB_override
 Reserves an item.
 
bool try_release () __TBB_override
 Releases the reserved item.
 
bool try_consume () __TBB_override
 Consumes the reserved item.
 
bool is_valid ()
 
void clear ()
 
- Public Member Functions inherited from tbb::flow::interface11::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from tbb::flow::interface11::receiver< T >
bool try_put (const typename internal::async_helpers< T >::filtered_type &t)
 Put an item to the receiver.
 
bool try_put (const typename internal::async_helpers< T >::async_type &t)
 
- Public Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
virtual ~untyped_receiver ()
 Destructor.
 
template<typename X >
bool try_put (const X &t)
 Put an item to the receiver.
 
virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
virtual bool try_get (T &)
 Request an item from the sender.
 
virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
- 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.
 
virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node.
 
virtual bool try_release ()
 Releases the reserved item.
 
virtual bool try_consume ()
 Consumes the reserved item.
 

Protected Member Functions

tasktry_put_task (const T &v) __TBB_override
 Put item to successor; return task to run the successor if possible.
 
- Protected Member Functions inherited from tbb::flow::interface11::overwrite_node< T >
tasktry_put_task (const input_type &v) __TBB_override
 Put item to successor; return task to run the successor if possible.
 
tasktry_put_task_impl (const input_type &v)
 
graphgraph_reference () const __TBB_override
 
void reset_receiver (reset_flags) __TBB_override
 put receiver back in initial state
 
void reset_node (reset_flags f) __TBB_override
 
virtual void reset_node (reset_flags f=rf_reset_protocol)=0
 
- Protected Member Functions inherited from tbb::flow::interface11::receiver< T >
virtual tasktry_put_task_wrapper (const void *p, bool is_async) __TBB_override
 
virtual tasktry_put_task (const T &t)=0
 Put item to successor; return task to run the successor if possible.
 
- Protected Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
template<typename X >
tasktry_put_task (const X &t)
 
virtual tasktry_put_task_wrapper (const void *p, bool is_async)=0
 
virtual graphgraph_reference () const =0
 
virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 put receiver back in initial state
 
virtual bool is_continue_receiver ()
 
- Protected Member Functions inherited from tbb::flow::interface11::sender< T >
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.
 
template<typename X >
bool try_reserve (X &t)
 Reserves an item in the sender.
 
virtual bool try_get_wrapper (void *p, bool is_async)=0
 
virtual bool try_reserve_wrapper (void *p, bool is_async)=0
 

Friends

template<typename R , typename B >
class run_and_put_task
 
template<typename X , typename Y >
class internal::broadcast_cache
 
template<typename X , typename Y >
class internal::round_robin_cache
 

Additional Inherited Members

- Public Attributes inherited from tbb::flow::interface11::receiver< T >
__TBB_DEPRECATED typedef T input_type
 The input type of this receiver.
 
__TBB_DEPRECATED typedef internal::async_helpers< T >::filtered_type filtered_type
 
- Public Attributes inherited from tbb::flow::interface11::sender< T >
__TBB_DEPRECATED typedef T output_type
 The output type of this sender.
 
__TBB_DEPRECATED typedef internal::async_helpers< T >::filtered_type filtered_type
 
- Protected Attributes inherited from tbb::flow::interface11::overwrite_node< T >
spin_mutex my_mutex
 
internal::broadcast_cache< input_type, null_rw_mutexmy_successors
 
input_type my_buffer
 
bool my_buffer_is_valid
 
- Protected Attributes inherited from tbb::flow::interface11::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 

Detailed Description

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

Definition at line 4622 of file flow_graph.h.

Member Typedef Documentation

◆ base_type

template<typename T >
typedef overwrite_node<T> tbb::flow::interface11::write_once_node< T >::base_type

Definition at line 4626 of file flow_graph.h.

◆ input_type

template<typename T >
typedef T tbb::flow::interface11::write_once_node< T >::input_type

Definition at line 4624 of file flow_graph.h.

◆ output_type

template<typename T >
typedef T tbb::flow::interface11::write_once_node< T >::output_type

Definition at line 4625 of file flow_graph.h.

◆ predecessor_type

template<typename T >
typedef receiver<input_type>::predecessor_type tbb::flow::interface11::write_once_node< T >::predecessor_type

Definition at line 4627 of file flow_graph.h.

◆ successor_type

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

Definition at line 4628 of file flow_graph.h.

Constructor & Destructor Documentation

◆ write_once_node() [1/2]

template<typename T >
__TBB_NOINLINE_SYM tbb::flow::interface11::write_once_node< T >::write_once_node ( graph g)
inlineexplicit

Constructor.

Definition at line 4631 of file flow_graph.h.

4631 : base_type(g) {
4632 tbb::internal::fgt_node( CODEPTR(), tbb::internal::FLOW_WRITE_ONCE_NODE, &(this->my_graph),
4633 static_cast<receiver<input_type> *>(this),
4634 static_cast<sender<output_type> *>(this) );
4635 }
#define CODEPTR()
static void fgt_node(void *, string_index, void *, void *)

References CODEPTR, and tbb::internal::fgt_node().

Here is the call graph for this function:

◆ write_once_node() [2/2]

template<typename T >
__TBB_NOINLINE_SYM tbb::flow::interface11::write_once_node< T >::write_once_node ( const write_once_node< T > &  src)
inline

Copy constructor: call base class copy constructor.

Definition at line 4645 of file flow_graph.h.

4645 : base_type(src) {
4646 tbb::internal::fgt_node( CODEPTR(), tbb::internal::FLOW_WRITE_ONCE_NODE, &(this->my_graph),
4647 static_cast<receiver<input_type> *>(this),
4648 static_cast<sender<output_type> *>(this) );
4649 }

References CODEPTR, and tbb::internal::fgt_node().

Here is the call graph for this function:

Member Function Documentation

◆ try_put_task()

template<typename T >
task * tbb::flow::interface11::write_once_node< T >::try_put_task ( const T &  t)
inlineprotectedvirtual

Put item to successor; return task to run the successor if possible.

Reimplemented from tbb::flow::interface11::overwrite_node< T >.

Definition at line 4661 of file flow_graph.h.

4661 {
4662 spin_mutex::scoped_lock l( this->my_mutex );
4663 return this->my_buffer_is_valid ? NULL : this->try_put_task_impl(v);
4664 }
task * try_put_task_impl(const input_type &v)

Friends And Related Symbol Documentation

◆ internal::broadcast_cache

template<typename T >
template<typename X , typename Y >
friend class internal::broadcast_cache
friend

Definition at line 4659 of file flow_graph.h.

◆ internal::round_robin_cache

template<typename T >
template<typename X , typename Y >
friend class internal::round_robin_cache
friend

Definition at line 4660 of file flow_graph.h.

◆ run_and_put_task

template<typename T >
template<typename R , typename B >
friend class run_and_put_task
friend

Definition at line 4658 of file flow_graph.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.