tbb::flow::interface11::buffer_node< T, Allocator > Class Template Reference

Forwards messages in arbitrary order. More...

`#include <flow_graph.h>`

Inheritance diagram for tbb::flow::interface11::buffer_node< T, Allocator >:
Collaboration diagram for tbb::flow::interface11::buffer_node< T, Allocator >:

## Classes

class | buffer_operation

## Public Types

typedef T | input_type
typedef T | output_type
typedef receiver< input_type >::predecessor_type | predecessor_type
typedef sender< output_type >::successor_type | successor_type
typedef buffer_node< T, Allocator > | class_type
Public Types inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
enum | buffer_item_state
typedef T | item_type
Public Types inherited from tbb::flow::interface11::internal::untyped_receiver
typedef untyped_sender | predecessor_type
| The predecessor type for this node. More...
Public Types inherited from tbb::flow::interface11::internal::untyped_sender
typedef untyped_receiver | successor_type
| The successor type for this node. More...

## Public Member Functions

| __TBB_STATIC_ASSERT ((tbb::internal::is_same_type< Allocator, null_type >::value), "Allocator template parameter for flow graph nodes is deprecated and will be removed. " "Specify TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to temporary enable the deprecated interface.")
__TBB_NOINLINE_SYM | buffer_node (graph &g)
| Constructor. More...
__TBB_NOINLINE_SYM | buffer_node (const buffer_node &src)
| Copy constructor. More...
bool | register_successor (successor_type &r) __TBB_override
| Adds a new successor. More...
bool | remove_successor (successor_type &r) __TBB_override
| Removes a successor. More...
bool | try_get (T &v) __TBB_override
| Request an item from the buffer_node. More...
bool | try_reserve (T &v) __TBB_override
| Reserves an item. More...
bool | try_release () __TBB_override
| Release a reserved item. More...
bool | try_consume () __TBB_override
| Consumes a reserved item. More...
Public Member Functions inherited from tbb::flow::interface11::graph_node
| graph_node (graph &g)
virtual | ~graph_node ()
Public Member Functions inherited from internal::reservable_item_buffer< T, cache_aligned_allocator< T > >
| reservable_item_buffer ()
void | reset ()
Public Member Functions inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
| item_buffer ()
| Constructor. More...
| ~item_buffer ()
void | reset ()
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. More...
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. More...
template<typename X >
bool | try_put (const X &t)
| Put an item to the receiver. More...
virtual bool | register_predecessor (predecessor_type &)
| Add a predecessor to the node. More...
virtual bool | remove_predecessor (predecessor_type &)
| Remove a predecessor from the node. More...
Public Member Functions inherited from tbb::flow::interface11::internal::untyped_sender
virtual | ~untyped_sender ()

## Protected Types

enum | op_type { reg_succ , rem_succ , req_item , res_item , rel_res , con_res , put_item , try_fwd_task }
typedef size_t | size_type
typedef internal::aggregating_functor< class_type, buffer_operation > | handler_type
Protected Types inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
typedef size_t | size_type
typedef aligned_pair< item_type, buffer_item_state >::type | buffer_item_type
typedef tbb::internal::allocator_rebind< cache_aligned_allocator< T >, buffer_item_type >::type | allocator_type

## Protected Member Functions

virtual void | handle_operations (buffer_operation *op_list)
template<typename derived_type >
void | handle_operations_impl (buffer_operation *op_list, derived_type *derived)
task * | grab_forwarding_task (buffer_operation &op_data)
bool | enqueue_forwarding_task (buffer_operation &op_data)
virtual task * | forward_task ()
| This is executed by an enqueued task, the "forwarder". More...
virtual void | internal_reg_succ (buffer_operation *op)
| Register successor. More...
virtual void | internal_rem_succ (buffer_operation *op)
| Remove successor. More...
virtual void | internal_forward_task (buffer_operation *op)
| Tries to forward valid items to successors. More...
template<typename derived_type >
void | internal_forward_task_impl (buffer_operation *op, derived_type *derived)
virtual bool | internal_push (buffer_operation *op)
virtual void | internal_pop (buffer_operation *op)
virtual void | internal_reserve (buffer_operation *op)
virtual void | internal_consume (buffer_operation *op)
virtual void | internal_release (buffer_operation *op)
task * | try_put_task (const T &t) __TBB_override
| receive an item, return a task *if possible More...
graph & | graph_reference () const __TBB_override
void | reset_receiver (reset_flags) __TBB_override
| put receiver back in initial state More...
void | reset_node (reset_flags f) __TBB_override
Protected Member Functions inherited from internal::reservable_item_buffer< T, cache_aligned_allocator< T > >
bool | reserve_front (T &v)
void | consume_front ()
void | release_front ()
Protected Member Functions inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
bool | buffer_empty () const
buffer_item_type & | item (size_type i)
const buffer_item_type & | item (size_type i) const
bool | my_item_valid (size_type i) const
bool | my_item_reserved (size_type i) const
const item_type & | get_my_item (size_t i) const
void | set_my_item (size_t i, const item_type &o)
void | fetch_item (size_t i, item_type &o)
void | move_item (size_t to, size_t from)
bool | place_item (size_t here, const item_type &me)
void | swap_items (size_t i, size_t j)
void | destroy_item (size_type i)
const item_type & | front () const
const item_type & | back () const
void | reserve_item (size_type i)
void | release_item (size_type i)
void | destroy_front ()
void | destroy_back ()
size_type | size (size_t new_tail=0)
size_type | capacity ()
bool | buffer_full ()
void | grow_my_array (size_t minimum_size)
| Grows the internal array. More...
bool | push_back (item_type &v)
bool | pop_back (item_type &v)
bool | pop_front (item_type &v)
void | clean_up_buffer (bool reset_pointers)
Protected Member Functions inherited from tbb::flow::interface11::receiver< T >
virtual task * | try_put_task_wrapper (const void *p, bool is_async) __TBB_override
Protected Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
template<typename X >
task * | try_put_task (const X &t)
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. More...
template<typename X >
bool | try_reserve (X &t)
| Reserves an item in the sender. More...

## Protected Attributes

internal::round_robin_cache< T, null_rw_mutex > | my_successors
bool | forwarder_busy
internal::aggregator< handler_type, buffer_operation > | my_aggregator
Protected Attributes inherited from tbb::flow::interface11::graph_node
graph & | my_graph
graph_node * | next
graph_node * | prev
Protected Attributes inherited from internal::reservable_item_buffer< T, cache_aligned_allocator< T > >
bool | my_reserved
Protected Attributes inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
buffer_item_type * | my_array
size_type | my_array_size
size_type | my_head
size_type | my_tail

## Private Types

typedef cache_aligned_allocator< T > | internals_allocator

## Private Member Functions

void | order ()
bool | is_item_valid ()
void | try_put_and_add_task (task *&last_task)

## Friends

class | internal::forward_task_bypass< class_type >
class | internal::aggregating_functor< class_type, buffer_operation >
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. More...
__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. More...
__TBB_DEPRECATED typedef internal::async_helpers< T >::filtered_type | filtered_type
Static Protected Attributes inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
static const size_type | initial_buffer_size

## Detailed Description

### template<typename T, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>
class tbb::flow::interface11::buffer_node< T, Allocator >

Forwards messages in arbitrary order.

Definition at line 2044 of file flow_graph.h.

## Member Typedef Documentation

## class_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef buffer_node<T, Allocator> tbb::flow::interface11::buffer_node< T, Allocator >::class_type

Definition at line 2062 of file flow_graph.h.

## handler_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef internal::aggregating_functor<class_type, buffer_operation> tbb::flow::interface11::buffer_node< T, Allocator >::handler_type

protected

Definition at line 2125 of file flow_graph.h.

## input_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef T tbb::flow::interface11::buffer_node< T, Allocator >::input_type

Definition at line 2058 of file flow_graph.h.

## internals_allocator

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef cache_aligned_allocator<T> tbb::flow::interface11::buffer_node< T, Allocator >::internals_allocator

private

Definition at line 2055 of file flow_graph.h.

## output_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef T tbb::flow::interface11::buffer_node< T, Allocator >::output_type

Definition at line 2059 of file flow_graph.h.

## predecessor_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef receiver<input_type>::predecessor_type tbb::flow::interface11::buffer_node< T, Allocator >::predecessor_type

Definition at line 2060 of file flow_graph.h.

## size_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef size_t tbb::flow::interface11::buffer_node< T, Allocator >::size_type

protected

Definition at line 2076 of file flow_graph.h.

## successor_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

typedef sender<output_type>::successor_type tbb::flow::interface11::buffer_node< T, Allocator >::successor_type

Definition at line 2061 of file flow_graph.h.

## Member Enumeration Documentation

## op_type

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

enum tbb::flow::interface11::buffer_node::op_type

protected

Enumerator
reg_succ |
rem_succ |
req_item |
res_item |
rel_res |
con_res |
put_item |
try_fwd_task |

Definition at line 2085 of file flow_graph.h.

{reg_succ, rem_succ, req_item, res_item, rel_res, con_res, put_item, try_fwd_task
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
, add_blt_succ, del_blt_succ,
add_blt_pred, del_blt_pred,
blt_succ_cnt, blt_pred_cnt,
blt_succ_cpy, blt_pred_cpy // create vector copies of preds and succs
#endif
};
tbb::flow::interface11::buffer_node::reg_succ
@ reg_succ
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::rem_succ
@ rem_succ
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::rel_res
@ rel_res
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::put_item
@ put_item
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::req_item
@ req_item
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::res_item
@ res_item
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::try_fwd_task
@ try_fwd_task
Definition: flow_graph.h:2085
tbb::flow::interface11::buffer_node::con_res
@ con_res
Definition: flow_graph.h:2085

## Constructor & Destructor Documentation

## buffer_node() [1/2]

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

__TBB_NOINLINE_SYM tbb::flow::interface11::buffer_node< T, Allocator >::buffer_node | ( | graph & | g | ) |

inline explicit

Constructor.

Definition at line 2359 of file flow_graph.h.

: graph_node(g), internal::reservable_item_buffer<T, internals_allocator>(), receiver<T>(),
sender<T>(), forwarder_busy(false)
{
my_successors.set_owner(this);
my_aggregator.initialize_handler(handler_type(this));
tbb::internal::fgt_node( CODEPTR(), tbb::internal::FLOW_BUFFER_NODE, &this->my_graph,
static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );
}
CODEPTR
#define CODEPTR()
Definition: _flow_graph_trace_impl.h:297
tbb::internal::fgt_node
static void fgt_node(void *, string_index, void *, void *)
Definition: _flow_graph_trace_impl.h:326
tbb::flow::interface11::buffer_node::forwarder_busy
bool forwarder_busy
Definition: flow_graph.h:2124
tbb::flow::interface11::buffer_node::my_successors
internal::round_robin_cache< T, null_rw_mutex > my_successors
Definition: flow_graph.h:2077
tbb::flow::interface11::buffer_node::my_aggregator
internal::aggregator< handler_type, buffer_operation > my_aggregator
Definition: flow_graph.h:2127
tbb::flow::interface11::buffer_node::handler_type
internal::aggregating_functor< class_type, buffer_operation > handler_type
Definition: flow_graph.h:2125
tbb::flow::interface11::graph_node::my_graph
graph & my_graph
Definition: _flow_graph_impl.h:464
tbb::flow::interface11::graph_node::graph_node
graph_node(graph &g)
Definition: flow_graph.h:888
internal::reservable_item_buffer
item_buffer with reservable front-end. NOTE: if reserving, do not
Definition: _flow_graph_item_buffer_impl.h:247

References CODEPTR, tbb::internal::fgt_node(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface11::buffer_node< T, Allocator >::my_successors.

Here is the call graph for this function:

## buffer_node() [2/2]

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

__TBB_NOINLINE_SYM tbb::flow::interface11::buffer_node< T, Allocator >::buffer_node | ( | const buffer_node< T, Allocator > & | src | ) |

inline

Copy constructor.

Definition at line 2377 of file flow_graph.h.

: graph_node(src.my_graph), internal::reservable_item_buffer<T, internals_allocator>(),
receiver<T>(), sender<T>(), forwarder_busy(false)
{
my_successors.set_owner(this);
my_aggregator.initialize_handler(handler_type(this));
tbb::internal::fgt_node( CODEPTR(), tbb::internal::FLOW_BUFFER_NODE, &this->my_graph,
static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );
}

References CODEPTR, tbb::internal::fgt_node(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface11::buffer_node< T, Allocator >::my_successors.

Here is the call graph for this function:

## Member Function Documentation

## __TBB_STATIC_ASSERT()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

tbb::flow::interface11::buffer_node< T, Allocator >::__TBB_STATIC_ASSERT | ( | (tbb::internal::is_same_type< Allocator, null_type >::value) | ,
|  | "Allocator template parameter for flow graph nodes is deprecated and will be removed. " "Specify TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to temporary enable the deprecated interface." |
| ) |  |

## enqueue_forwarding_task()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task | ( | buffer_operation & | op_data | ) |

inline protected

Definition at line 2186 of file flow_graph.h.

{
task *ft = grab_forwarding_task(op_data);
if(ft) {
internal::spawn_in_graph_arena(graph_reference(), *ft);
return true;
}
return false;
}
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::spawn_in_graph_arena
void spawn_in_graph_arena(tbb::flow::interface10::graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
Definition: _flow_graph_impl.h:521
tbb::flow::interface11::buffer_node::graph_reference
graph & graph_reference() const __TBB_override
Definition: flow_graph.h:2538
tbb::flow::interface11::buffer_node::grab_forwarding_task
task * grab_forwarding_task(buffer_operation &op_data)
Definition: flow_graph.h:2182

References tbb::flow::interface11::buffer_node< T, Allocator >::grab_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::graph_reference(), and tbb::flow::interface11::internal::spawn_in_graph_arena().

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::register_successor(), tbb::flow::interface11::buffer_node< T, Allocator >::remove_successor(), tbb::flow::interface11::buffer_node< T, Allocator >::try_consume(), tbb::flow::interface11::buffer_node< T, Allocator >::try_get(), tbb::flow::interface11::buffer_node< T, Allocator >::try_release(), and tbb::flow::interface11::buffer_node< T, Allocator >::try_reserve().

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

## forward_task()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual task* tbb::flow::interface11::buffer_node< T, Allocator >::forward_task | ( |  | ) |

inline protected virtual

This is executed by an enqueued task, the "forwarder".

Definition at line 2196 of file flow_graph.h.

{
buffer_operation op_data(try_fwd_task);
task *last_task = NULL;
do {
op_data.status = internal::WAIT;
op_data.ltask = NULL;
my_aggregator.execute(&op_data);
// workaround for icc bug
tbb::task *xtask = op_data.ltask;
graph& g = this->my_graph;
last_task = combine_tasks(g, last_task, xtask);
} while (op_data.status ==internal::SUCCEEDED);
return last_task;
}
tbb::flow::interface11::combine_tasks
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
Definition: flow_graph.h:199
internal::WAIT
@ WAIT
Definition: _flow_graph_types_impl.h:719
internal::SUCCEEDED
@ SUCCEEDED
Definition: _flow_graph_types_impl.h:719
tbb::flow::interface11::graph_node::graph
friend class graph
Definition: _flow_graph_impl.h:455
tbb::task
Base class for user-defined tasks.
Definition: task.h:615

References tbb::flow::interface11::combine_tasks(), tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::ltask, tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::graph_node::my_graph, tbb::interface6::internal::aggregated_operation< Derived >::status, internal::SUCCEEDED, tbb::flow::interface11::buffer_node< T, Allocator >::try_fwd_task, and internal::WAIT.

Here is the call graph for this function:

## grab_forwarding_task()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

task* tbb::flow::interface11::buffer_node< T, Allocator >::grab_forwarding_task | ( | buffer_operation & | op_data | ) |

inline protected

Definition at line 2182 of file flow_graph.h.

{
return op_data.ltask;
}

References tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::ltask.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), and tbb::flow::interface11::buffer_node< T, Allocator >::try_put_task().

Here is the caller graph for this function:

## graph_reference()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

graph& tbb::flow::interface11::buffer_node< T, Allocator >::graph_reference | ( |  | ) | const

inline protected virtual

Implements tbb::flow::interface11::internal::untyped_receiver.

Definition at line 2538 of file flow_graph.h.

{
return my_graph;
}

References tbb::flow::interface11::graph_node::my_graph.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), and tbb::flow::interface11::buffer_node< T, Allocator >::try_put_task().

Here is the caller graph for this function:

## handle_operations()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations | ( | buffer_operation * | op_list | ) |

inline protected virtual

Definition at line 2129 of file flow_graph.h.

{
handle_operations_impl(op_list, this);
}
tbb::flow::interface11::buffer_node::handle_operations_impl
void handle_operations_impl(buffer_operation *op_list, derived_type *derived)
Definition: flow_graph.h:2134

References tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

Here is the call graph for this function:

## handle_operations_impl()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>
template<typename derived_type >

void tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl | ( | buffer_operation * | op_list,
|  | derived_type * | derived
| ) |  |

inline protected

Definition at line 2134 of file flow_graph.h.

{
__TBB_ASSERT(static_cast<class_type*>(derived) == this, "'this' is not a base class for derived");
buffer_operation *tmp = NULL;
bool try_forwarding = false;
while (op_list) {
tmp = op_list;
op_list = op_list->next;
switch (tmp->type) {
case reg_succ: internal_reg_succ(tmp); try_forwarding = true; break;
case rem_succ: internal_rem_succ(tmp); break;
case req_item: internal_pop(tmp); break;
case res_item: internal_reserve(tmp); break;
case rel_res: internal_release(tmp); try_forwarding = true; break;
case con_res: internal_consume(tmp); try_forwarding = true; break;
case put_item: try_forwarding = internal_push(tmp); break;
case try_fwd_task: internal_forward_task(tmp); break;
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
// edge recording
case add_blt_succ: internal_add_built_succ(tmp); break;
case del_blt_succ: internal_del_built_succ(tmp); break;
case add_blt_pred: internal_add_built_pred(tmp); break;
case del_blt_pred: internal_del_built_pred(tmp); break;
case blt_succ_cnt: internal_succ_cnt(tmp); break;
case blt_pred_cnt: internal_pred_cnt(tmp); break;
case blt_succ_cpy: internal_copy_succs(tmp); break;
case blt_pred_cpy: internal_copy_preds(tmp); break;
#endif
}
}
derived->order();
if (try_forwarding && !forwarder_busy) {
if(internal::is_graph_active(this->my_graph)) {
forwarder_busy = true;
task *new_task = new(task::allocate_additional_child_of(*(this->my_graph.root_task()))) internal::
forward_task_bypass<class_type>(*this);
// tmp should point to the last item handled by the aggregator. This is the operation
// the handling thread enqueued. So modifying that record will be okay.
// workaround for icc bug
tbb::task *z = tmp->ltask;
graph &g = this->my_graph;
tmp->ltask = combine_tasks(g, z, new_task); // in case the op generated a task
}
}
} // handle_operations
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::flow::interface11::internal::is_graph_active
bool is_graph_active(tbb::flow::interface10::graph &g)
Definition: _flow_graph_impl.h:494
tbb::flow::interface11::buffer_node::internal_push
virtual bool internal_push(buffer_operation *op)
Definition: flow_graph.h:2323
tbb::flow::interface11::buffer_node::internal_rem_succ
virtual void internal_rem_succ(buffer_operation *op)
Remove successor.
Definition: flow_graph.h:2219
tbb::flow::interface11::buffer_node::internal_consume
virtual void internal_consume(buffer_operation *op)
Definition: flow_graph.h:2347
tbb::flow::interface11::buffer_node::internal_pop
virtual void internal_pop(buffer_operation *op)
Definition: flow_graph.h:2329
tbb::flow::interface11::buffer_node::internal_reserve
virtual void internal_reserve(buffer_operation *op)
Definition: flow_graph.h:2338
tbb::flow::interface11::buffer_node::class_type
buffer_node< T, Allocator > class_type
Definition: flow_graph.h:2062
tbb::flow::interface11::buffer_node::internal_forward_task
virtual void internal_forward_task(buffer_operation *op)
Tries to forward valid items to successors.
Definition: flow_graph.h:2294
tbb::flow::interface11::buffer_node::internal_reg_succ
virtual void internal_reg_succ(buffer_operation *op)
Register successor.
Definition: flow_graph.h:2213
tbb::flow::interface11::buffer_node::internal_release
virtual void internal_release(buffer_operation *op)
Definition: flow_graph.h:2352
tbb::flow::interface10::graph::root_task
__TBB_DEPRECATED tbb::task * root_task()
Returns the root task of the graph.
Definition: _flow_graph_impl.h:374

References __TBB_ASSERT, tbb::flow::interface11::combine_tasks(), tbb::flow::interface11::buffer_node< T, Allocator >::con_res, tbb::flow::interface11::buffer_node< T, Allocator >::forwarder_busy, tbb::flow::interface11::buffer_node< T, Allocator >::internal_consume(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_pop(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_push(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_reg_succ(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_release(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_rem_succ(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_reserve(), tbb::flow::interface11::internal::is_graph_active(), tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::ltask, tbb::flow::interface11::graph_node::my_graph, tbb::interface6::internal::aggregated_operation< Derived >::next, tbb::flow::interface11::buffer_node< T, Allocator >::put_item, tbb::flow::interface11::buffer_node< T, Allocator >::reg_succ, tbb::flow::interface11::buffer_node< T, Allocator >::rel_res, tbb::flow::interface11::buffer_node< T, Allocator >::rem_succ, tbb::flow::interface11::buffer_node< T, Allocator >::req_item, tbb::flow::interface11::buffer_node< T, Allocator >::res_item, tbb::flow::interface10::graph::root_task(), tbb::flow::interface11::buffer_node< T, Allocator >::try_fwd_task, and tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::type.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations().

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

## internal_consume()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_consume | ( | buffer_operation * | op | ) |

inline protected virtual

Definition at line 2347 of file flow_graph.h.

{
this->consume_front();
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}
tbb::internal::__TBB_store_with_release
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:716
internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::consume_front
void consume_front()
Definition: _flow_graph_item_buffer_impl.h:266

References tbb::internal::__TBB_store_with_release(), internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::consume_front(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_forward_task()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task | ( | buffer_operation * | op | ) |

inline protected virtual

Tries to forward valid items to successors.

Definition at line 2294 of file flow_graph.h.

{
internal_forward_task_impl(op, this);
}
tbb::flow::interface11::buffer_node::internal_forward_task_impl
void internal_forward_task_impl(buffer_operation *op, derived_type *derived)
Definition: flow_graph.h:2299

References tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task_impl().

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_forward_task_impl()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>
template<typename derived_type >

void tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task_impl | ( | buffer_operation * | op,
|  | derived_type * | derived
| ) |  |

inline protected

Definition at line 2299 of file flow_graph.h.

{
__TBB_ASSERT(static_cast<class_type*>(derived) == this, "'this' is not a base class for derived");
if (this->my_reserved || !derived->is_item_valid()) {
__TBB_store_with_release(op->status, internal::FAILED);
this->forwarder_busy = false;
return;
}
// Try forwarding, giving each successor a chance
task * last_task = NULL;
size_type counter = my_successors.size();
for (; counter > 0 && derived->is_item_valid(); --counter)
derived->try_put_and_add_task(last_task);
op->ltask = last_task; // return task
if (last_task && !counter) {
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}
else {
__TBB_store_with_release(op->status, internal::FAILED);
forwarder_busy = false;
}
}
internal::FAILED
@ FAILED
Definition: _flow_graph_types_impl.h:719
tbb::flow::interface11::buffer_node::size_type
size_t size_type
Definition: flow_graph.h:2076
internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::my_reserved
bool my_reserved
Definition: _flow_graph_item_buffer_impl.h:278

References __TBB_ASSERT, tbb::internal::__TBB_store_with_release(), internal::FAILED, tbb::flow::interface11::buffer_node< T, Allocator >::forwarder_busy, tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::ltask, internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::my_reserved, tbb::flow::interface11::buffer_node< T, Allocator >::my_successors, tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task().

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

## internal_pop()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_pop | ( | buffer_operation * | op | ) |

inline protected virtual

Definition at line 2329 of file flow_graph.h.

{
if(this->pop_back(*(op->elem))) {
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}
else {
__TBB_store_with_release(op->status, internal::FAILED);
}
}
internal::item_buffer< T, cache_aligned_allocator< T > >::pop_back
bool pop_back(item_type &v)
Definition: _flow_graph_item_buffer_impl.h:194

References tbb::internal::__TBB_store_with_release(), tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::elem, internal::FAILED, internal::item_buffer< T, cache_aligned_allocator< T > >::pop_back(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_push()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual bool tbb::flow::interface11::buffer_node< T, Allocator >::internal_push | ( | buffer_operation * | op | ) |

inline protected virtual

Definition at line 2323 of file flow_graph.h.

{
this->push_back(*(op->elem));
__TBB_store_with_release(op->status, internal::SUCCEEDED);
return true;
}
internal::item_buffer< T, cache_aligned_allocator< T > >::push_back
bool push_back(item_type &v)
Definition: _flow_graph_item_buffer_impl.h:185

References tbb::internal::__TBB_store_with_release(), tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::elem, internal::item_buffer< T, cache_aligned_allocator< T > >::push_back(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_reg_succ()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_reg_succ | ( | buffer_operation * | op | ) |

inline protected virtual

Register successor.

Definition at line 2213 of file flow_graph.h.

{
my_successors.register_successor(*(op->r));
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}

References tbb::internal::__TBB_store_with_release(), tbb::flow::interface11::buffer_node< T, Allocator >::my_successors, tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::r, tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_release()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_release | ( | buffer_operation * | op | ) |

inline protected virtual

Definition at line 2352 of file flow_graph.h.

{
this->release_front();
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}
internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::release_front
void release_front()
Definition: _flow_graph_item_buffer_impl.h:272

References tbb::internal::__TBB_store_with_release(), internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::release_front(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_rem_succ()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_rem_succ | ( | buffer_operation * | op | ) |

inline protected virtual

Remove successor.

Definition at line 2219 of file flow_graph.h.

{
my_successors.remove_successor(*(op->r));
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}

References tbb::internal::__TBB_store_with_release(), tbb::flow::interface11::buffer_node< T, Allocator >::my_successors, tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::r, tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## internal_reserve()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

virtual void tbb::flow::interface11::buffer_node< T, Allocator >::internal_reserve | ( | buffer_operation * | op | ) |

inline protected virtual

Definition at line 2338 of file flow_graph.h.

{
if(this->reserve_front(*(op->elem))) {
__TBB_store_with_release(op->status, internal::SUCCEEDED);
}
else {
__TBB_store_with_release(op->status, internal::FAILED);
}
}
internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::reserve_front
bool reserve_front(T &v)
Definition: _flow_graph_item_buffer_impl.h:257

References tbb::internal::__TBB_store_with_release(), tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::elem, internal::FAILED, internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::reserve_front(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl().

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

## is_item_valid()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::is_item_valid | ( |  | ) |

inline private

Definition at line 2278 of file flow_graph.h.

{
return this->my_item_valid(this->my_tail - 1);
}
internal::item_buffer< T, cache_aligned_allocator< T > >::my_tail
size_type my_tail
Definition: _flow_graph_item_buffer_impl.h:52
internal::item_buffer< T, cache_aligned_allocator< T > >::my_item_valid
bool my_item_valid(size_type i) const
Definition: _flow_graph_item_buffer_impl.h:68

References internal::item_buffer< T, cache_aligned_allocator< T > >::my_item_valid(), and internal::item_buffer< T, cache_aligned_allocator< T > >::my_tail.

Here is the call graph for this function:

## order()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

void tbb::flow::interface11::buffer_node< T, Allocator >::order | ( |  | ) |

inline private

Definition at line 2276 of file flow_graph.h.

{}

## register_successor()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::register_successor | ( | successor_type & | r | ) |

inline virtual

Adds a new successor.

Adds successor r to the list of successors; may forward tasks.

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

Definition at line 2399 of file flow_graph.h.

{
buffer_operation op_data(reg_succ);
op_data.r = &r;
my_aggregator.execute(&op_data);
(void)enqueue_forwarding_task(op_data);
return true;
}
void
void
Definition: ittnotify_static.h:91
tbb::flow::interface11::buffer_node::enqueue_forwarding_task
bool enqueue_forwarding_task(buffer_operation &op_data)
Definition: flow_graph.h:2186

References tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::r, tbb::flow::interface11::buffer_node< T, Allocator >::reg_succ, and void.

Here is the call graph for this function:

## remove_successor()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::remove_successor | ( | successor_type & | r | ) |

inline virtual

Removes a successor.

Removes successor r from the list of successors. It also calls r.remove_predecessor(*this) to remove this node as a predecessor.

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

Definition at line 2461 of file flow_graph.h.

{
r.remove_predecessor(*this);
buffer_operation op_data(rem_succ);
op_data.r = &r;
my_aggregator.execute(&op_data);
// even though this operation does not cause a forward, if we are the handler, and
// a forward is scheduled, we may be the first to reach this point after the aggregator,
// and so should check for the task.
(void)enqueue_forwarding_task(op_data);
return true;
}

References tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::r, tbb::flow::interface11::buffer_node< T, Allocator >::rem_succ, and void.

Here is the call graph for this function:

## reset_node()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

void tbb::flow::interface11::buffer_node< T, Allocator >::reset_node | ( | reset_flags | f | ) |

inline protected virtual

Implements tbb::flow::interface11::graph_node.

Reimplemented in tbb::flow::interface11::queue_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >.

Definition at line 2553 of file flow_graph.h.

{
internal::reservable_item_buffer<T, internals_allocator>::reset();
// TODO: just clear structures
if (f&rf_clear_edges) {
my_successors.clear();
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
my_built_predecessors.clear();
#endif
}
forwarder_busy = false;
}
tbb::flow::interface11::rf_clear_edges
@ rf_clear_edges
Definition: _flow_graph_impl.h:161
internal::reservable_item_buffer::reset
void reset()
Definition: _flow_graph_item_buffer_impl.h:254

References tbb::flow::interface11::buffer_node< T, Allocator >::forwarder_busy, tbb::flow::interface11::buffer_node< T, Allocator >::my_successors, internal::reservable_item_buffer< T, A >::reset(), and tbb::flow::interface11::rf_clear_edges.

Referenced by tbb::flow::interface11::queue_node< T, Allocator >::reset_node(), and tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::reset_node().

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

## reset_receiver()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

void tbb::flow::interface11::buffer_node< T, Allocator >::reset_receiver | ( | reset_flags | f | ) |

inline protected virtual

put receiver back in initial state

Implements tbb::flow::interface11::internal::untyped_receiver.

Definition at line 2542 of file flow_graph.h.

{ }

## try_consume()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::try_consume | ( |  | ) |

inline virtual

Consumes a reserved item.

true = item is removed from sender and reservation removed

Reimplemented from tbb::flow::interface11::internal::untyped_sender.

Definition at line 2506 of file flow_graph.h.

{
buffer_operation op_data(con_res);
my_aggregator.execute(&op_data);
(void)enqueue_forwarding_task(op_data);
return true;
}

References tbb::flow::interface11::buffer_node< T, Allocator >::con_res, tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, and void.

Here is the call graph for this function:

## try_get()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::try_get | ( | T & | v | ) |

inline virtual

Request an item from the buffer_node.

true = v contains the returned item
false = no item has been returned

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

Definition at line 2476 of file flow_graph.h.

{
buffer_operation op_data(req_item);
op_data.elem = &v;
my_aggregator.execute(&op_data);
(void)enqueue_forwarding_task(op_data);
return (op_data.status==internal::SUCCEEDED);
}

References tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::elem, tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::buffer_node< T, Allocator >::req_item, tbb::interface6::internal::aggregated_operation< Derived >::status, internal::SUCCEEDED, and void.

Here is the call graph for this function:

## try_put_and_add_task()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

void tbb::flow::interface11::buffer_node< T, Allocator >::try_put_and_add_task | ( | task *& | last_task | ) |

inline private

Definition at line 2282 of file flow_graph.h.

{
task *new_task = my_successors.try_put_task(this->back());
if (new_task) {
// workaround for icc bug
graph& g = this->my_graph;
last_task = combine_tasks(g, last_task, new_task);
this->destroy_back();
}
}
internal::item_buffer< T, cache_aligned_allocator< T > >::back
const item_type & back() const
Definition: _flow_graph_item_buffer_impl.h:136
internal::item_buffer< T, cache_aligned_allocator< T > >::destroy_back
void destroy_back()
Definition: _flow_graph_item_buffer_impl.h:147

References internal::item_buffer< T, cache_aligned_allocator< T > >::back(), tbb::flow::interface11::combine_tasks(), internal::item_buffer< T, cache_aligned_allocator< T > >::destroy_back(), tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface11::buffer_node< T, Allocator >::my_successors.

Here is the call graph for this function:

## try_put_task()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

task* tbb::flow::interface11::buffer_node< T, Allocator >::try_put_task | ( | const T & | t | ) |

inline protected virtual

receive an item, return a task *if possible

Implements tbb::flow::interface11::receiver< T >.

Definition at line 2519 of file flow_graph.h.

{
buffer_operation op_data(t, put_item);
my_aggregator.execute(&op_data);
task *ft = grab_forwarding_task(op_data);
// sequencer_nodes can return failure (if an item has been previously inserted)
// We have to spawn the returned task if our own operation fails.
if(ft && op_data.status ==internal::FAILED) {
// we haven't succeeded queueing the item, but for some reason the
// call returned a task (if another request resulted in a successful
// forward this could happen.) Queue the task and reset the pointer.
internal::spawn_in_graph_arena(graph_reference(), *ft); ft = NULL;
}
else if(!ft && op_data.status ==internal::SUCCEEDED) {
ft = SUCCESSFULLY_ENQUEUED;
}
return ft;
}
tbb::flow::internal::SUCCESSFULLY_ENQUEUED
static tbb::task *const SUCCESSFULLY_ENQUEUED
Definition: _flow_graph_impl.h:61

References internal::FAILED, tbb::flow::interface11::buffer_node< T, Allocator >::grab_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::graph_reference(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::buffer_node< T, Allocator >::put_item, tbb::flow::interface11::internal::spawn_in_graph_arena(), tbb::interface6::internal::aggregated_operation< Derived >::status, internal::SUCCEEDED, and tbb::flow::internal::SUCCESSFULLY_ENQUEUED.

Here is the call graph for this function:

## try_release()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::try_release | ( |  | ) |

inline virtual

Release a reserved item.

true = item has been released and so remains in sender

Reimplemented from tbb::flow::interface11::internal::untyped_sender.

Definition at line 2497 of file flow_graph.h.

{
buffer_operation op_data(rel_res);
my_aggregator.execute(&op_data);
(void)enqueue_forwarding_task(op_data);
return true;
}

References tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::buffer_node< T, Allocator >::rel_res, and void.

Here is the call graph for this function:

## try_reserve()

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::try_reserve | ( | T & | v | ) |

inline virtual

Reserves an item.

false = no item can be reserved
true = an item is reserved

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

Definition at line 2487 of file flow_graph.h.

{
buffer_operation op_data(res_item);
op_data.elem = &v;
my_aggregator.execute(&op_data);
(void)enqueue_forwarding_task(op_data);
return (op_data.status==internal::SUCCEEDED);
}

References tbb::flow::interface11::buffer_node< T, Allocator >::buffer_operation::elem, tbb::flow::interface11::buffer_node< T, Allocator >::enqueue_forwarding_task(), tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator, tbb::flow::interface11::buffer_node< T, Allocator >::res_item, tbb::interface6::internal::aggregated_operation< Derived >::status, internal::SUCCEEDED, and void.

Here is the call graph for this function:

## Friends And Related Function Documentation

## internal::aggregating_functor< class_type, buffer_operation >

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

friend class internal::aggregating_functor< class_type, buffer_operation >

friend

Definition at line 2125 of file flow_graph.h.

## internal::broadcast_cache

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>
template<typename X , typename Y >

friend class internal::broadcast_cache

friend

Definition at line 2516 of file flow_graph.h.

## internal::forward_task_bypass< class_type >

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

friend class internal::forward_task_bypass< class_type >

friend

Definition at line 2077 of file flow_graph.h.

## internal::round_robin_cache

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>
template<typename X , typename Y >

friend class internal::round_robin_cache

friend

Definition at line 2517 of file flow_graph.h.

## run_and_put_task

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>
template<typename R , typename B >

friend class run_and_put_task

friend

Definition at line 2515 of file flow_graph.h.

## Member Data Documentation

## forwarder_busy

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

bool tbb::flow::interface11::buffer_node< T, Allocator >::forwarder_busy

protected

Definition at line 2124 of file flow_graph.h.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task_impl(), and tbb::flow::interface11::buffer_node< T, Allocator >::reset_node().

## my_aggregator

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

internal::aggregator< handler_type, buffer_operation> tbb::flow::interface11::buffer_node< T, Allocator >::my_aggregator

protected

Definition at line 2127 of file flow_graph.h.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::buffer_node(), tbb::flow::interface11::buffer_node< T, Allocator >::forward_task(), tbb::flow::interface11::buffer_node< T, Allocator >::register_successor(), tbb::flow::interface11::buffer_node< T, Allocator >::remove_successor(), tbb::flow::interface11::buffer_node< T, Allocator >::try_consume(), tbb::flow::interface11::buffer_node< T, Allocator >::try_get(), tbb::flow::interface11::buffer_node< T, Allocator >::try_put_task(), tbb::flow::interface11::buffer_node< T, Allocator >::try_release(), and tbb::flow::interface11::buffer_node< T, Allocator >::try_reserve().

## my_successors

template<typename T , typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(T)>

internal::round_robin_cache< T, null_rw_mutex > tbb::flow::interface11::buffer_node< T, Allocator >::my_successors

protected

Definition at line 2077 of file flow_graph.h.

Referenced by tbb::flow::interface11::buffer_node< T, Allocator >::buffer_node(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task_impl(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_reg_succ(), tbb::flow::interface11::buffer_node< T, Allocator >::internal_rem_succ(), tbb::flow::interface11::buffer_node< T, Allocator >::reset_node(), and tbb::flow::interface11::buffer_node< T, Allocator >::try_put_and_add_task().

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