internal::reservable_item_buffer< T, A > Class Template Reference

item_buffer with reservable front-end. NOTE: if reserving, do not More...

`#include <_flow_graph_item_buffer_impl.h>`

Inheritance diagram for internal::reservable_item_buffer< T, A >:
Collaboration diagram for internal::reservable_item_buffer< T, A >:

## Public Member Functions

| 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 ()

## Protected Member Functions

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 Attributes

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

## Additional Inherited Members

Public Types inherited from internal::item_buffer< T, cache_aligned_allocator< T > >
enum | buffer_item_state
typedef T | item_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
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 A = cache_aligned_allocator<T>>
class internal::reservable_item_buffer< T, A >

item_buffer with reservable front-end. NOTE: if reserving, do not

Definition at line 247 of file _flow_graph_item_buffer_impl.h.

## Constructor & Destructor Documentation

## reservable_item_buffer()

template<typename T , typename A = cache_aligned_allocator<T>>

internal::reservable_item_buffer< T, A >::reservable_item_buffer | ( |  | ) |

inline

Definition at line 253 of file _flow_graph_item_buffer_impl.h.

: item_buffer<T, A>(), my_reserved(false) {}
internal::reservable_item_buffer::my_reserved
bool my_reserved
Definition: _flow_graph_item_buffer_impl.h:278

## Member Function Documentation

## consume_front()

template<typename T , typename A = cache_aligned_allocator<T>>

void internal::reservable_item_buffer< T, A >::consume_front | ( |  | ) |

inline protected

Definition at line 266 of file _flow_graph_item_buffer_impl.h.

{
__TBB_ASSERT(my_reserved, "Attempt to consume a non-reserved item");
this->destroy_front();
my_reserved = false;
}
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
internal::item_buffer< T, cache_aligned_allocator< T > >::destroy_front
void destroy_front()
Definition: _flow_graph_item_buffer_impl.h:146

References __TBB_ASSERT, internal::item_buffer< T, cache_aligned_allocator< T > >::destroy_front(), and internal::reservable_item_buffer< T, A >::my_reserved.

Here is the call graph for this function:

## release_front()

template<typename T , typename A = cache_aligned_allocator<T>>

void internal::reservable_item_buffer< T, A >::release_front | ( |  | ) |

inline protected

Definition at line 272 of file _flow_graph_item_buffer_impl.h.

{
__TBB_ASSERT(my_reserved, "Attempt to release a non-reserved item");
this->release_item(this->my_head);
my_reserved = false;
}
internal::item_buffer< T, cache_aligned_allocator< T > >::my_head
size_type my_head
Definition: _flow_graph_item_buffer_impl.h:51
internal::item_buffer< T, cache_aligned_allocator< T > >::release_item
void release_item(size_type i)
Definition: _flow_graph_item_buffer_impl.h:144

References __TBB_ASSERT, internal::item_buffer< T, cache_aligned_allocator< T > >::my_head, internal::reservable_item_buffer< T, A >::my_reserved, and internal::item_buffer< T, cache_aligned_allocator< T > >::release_item().

Here is the call graph for this function:

## reserve_front()

template<typename T , typename A = cache_aligned_allocator<T>>

bool internal::reservable_item_buffer< T, A >::reserve_front | ( | T & | v | ) |

inline protected

Definition at line 257 of file _flow_graph_item_buffer_impl.h.

{
if(my_reserved || !my_item_valid(this->my_head)) return false;
my_reserved = true;
// reserving the head
v = this->front();
this->reserve_item(this->my_head);
return true;
}
internal::item_buffer< T, cache_aligned_allocator< T > >::front
const item_type & front() const
Definition: _flow_graph_item_buffer_impl.h:129
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
internal::item_buffer< T, cache_aligned_allocator< T > >::reserve_item
void reserve_item(size_type i)
Definition: _flow_graph_item_buffer_impl.h:143

References internal::item_buffer< T, cache_aligned_allocator< T > >::front(), internal::item_buffer< T, cache_aligned_allocator< T > >::my_head, internal::item_buffer< T, cache_aligned_allocator< T > >::my_item_valid(), internal::reservable_item_buffer< T, A >::my_reserved, and internal::item_buffer< T, cache_aligned_allocator< T > >::reserve_item().

Here is the call graph for this function:

## reset()

template<typename T , typename A = cache_aligned_allocator<T>>

void internal::reservable_item_buffer< T, A >::reset | ( |  | ) |

inline

Definition at line 254 of file _flow_graph_item_buffer_impl.h.

{my_reserved = false; item_buffer<T,A>::reset(); }
internal::item_buffer::reset
void reset()
Definition: _flow_graph_item_buffer_impl.h:239

References internal::reservable_item_buffer< T, A >::my_reserved, and internal::item_buffer< T, A >::reset().

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

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

## Member Data Documentation

## my_reserved

template<typename T , typename A = cache_aligned_allocator<T>>

bool internal::reservable_item_buffer< T, A >::my_reserved

protected

Definition at line 278 of file _flow_graph_item_buffer_impl.h.

Referenced by internal::reservable_item_buffer< T, A >::consume_front(), internal::reservable_item_buffer< T, A >::release_front(), internal::reservable_item_buffer< T, A >::reserve_front(), and internal::reservable_item_buffer< T, A >::reset().

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

- _flow_graph_item_buffer_impl.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.