Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
For internal use only. More...
#include <_concurrent_queue_impl.h>
Classes | |
struct | padded_page |
struct | page |
Prefix on a page. More... | |
Protected Types | |
enum | copy_specifics { copy, move } |
Protected Member Functions | |
__TBB_EXPORTED_METHOD | concurrent_queue_base_v3 (size_t item_size) |
virtual __TBB_EXPORTED_METHOD | ~concurrent_queue_base_v3 () |
void __TBB_EXPORTED_METHOD | internal_push (const void *src) |
Enqueue item at tail of queue using copy operation. More... | |
void __TBB_EXPORTED_METHOD | internal_pop (void *dst) |
Dequeue item from head of queue. More... | |
void __TBB_EXPORTED_METHOD | internal_abort () |
Abort all pending queue operations. More... | |
bool __TBB_EXPORTED_METHOD | internal_push_if_not_full (const void *src) |
Attempt to enqueue item onto queue using copy operation. More... | |
bool __TBB_EXPORTED_METHOD | internal_pop_if_present (void *dst) |
Attempt to dequeue item from queue. More... | |
ptrdiff_t __TBB_EXPORTED_METHOD | internal_size () const |
Get size of queue. More... | |
bool __TBB_EXPORTED_METHOD | internal_empty () const |
Check if the queue is empty. More... | |
void __TBB_EXPORTED_METHOD | internal_set_capacity (ptrdiff_t capacity, size_t element_size) |
Set the queue capacity. More... | |
virtual page * | allocate_page ()=0 |
custom allocator More... | |
virtual void | deallocate_page (page *p)=0 |
custom de-allocator More... | |
void __TBB_EXPORTED_METHOD | internal_finish_clear () |
free any remaining pages More... | |
void __TBB_EXPORTED_METHOD | internal_throw_exception () const |
throw an exception More... | |
void __TBB_EXPORTED_METHOD | assign (const concurrent_queue_base_v3 &src) |
copy internal representation More... | |
void | internal_swap (concurrent_queue_base_v3 &src) |
swap queues More... | |
void | internal_insert_item (const void *src, copy_specifics op_type) |
Enqueues item at tail of queue using specified operation (copy or move) More... | |
bool | internal_insert_if_not_full (const void *src, copy_specifics op_type) |
Attempts to enqueue at tail of queue using specified operation (copy or move) More... | |
void | internal_assign (const concurrent_queue_base_v3 &src, copy_specifics op_type) |
Assigns one queue to another using specified operation (copy or move) More... | |
Protected Attributes | |
ptrdiff_t | my_capacity |
Capacity of the queue. More... | |
size_t | items_per_page |
Always a power of 2. More... | |
size_t | item_size |
Size of an item. More... | |
Private Member Functions | |
virtual void | copy_item (page &dst, size_t index, const void *src)=0 |
virtual void | assign_and_destroy_item (void *dst, page &src, size_t index)=0 |
virtual void | copy_page_item (page &dst, size_t dindex, const page &src, size_t sindex)=0 |
![]() | |
no_copy (const no_copy &)=delete | |
no_copy ()=default | |
Private Attributes | |
concurrent_queue_rep * | my_rep |
Internal representation. More... | |
Friends | |
class | concurrent_queue_rep |
struct | micro_queue |
class | micro_queue_pop_finalizer |
class | concurrent_queue_iterator_rep |
class | concurrent_queue_iterator_base_v3 |
For internal use only.
Type-independent portion of concurrent_queue.
Definition at line 826 of file _concurrent_queue_impl.h.
|
protected |
Enumerator | |
---|---|
copy | |
move |
Definition at line 852 of file _concurrent_queue_impl.h.
|
protected |
Definition at line 337 of file concurrent_queue.cpp.
References __TBB_ASSERT, tbb::cache_aligned_allocator< T >::allocate(), tbb::internal::concurrent_queue_rep::array, tbb::internal::concurrent_queue_rep::head_counter, tbb::internal::is_aligned(), item_size, tbb::internal::concurrent_queue_rep::items_avail, items_per_page, my_capacity, my_rep, tbb::internal::NFS_GetLineSize(), tbb::internal::concurrent_queue_rep::slots_avail, and tbb::internal::concurrent_queue_rep::tail_counter.
|
protectedvirtual |
Definition at line 356 of file concurrent_queue.cpp.
References __TBB_ASSERT, tbb::internal::concurrent_queue_rep::array, tbb::cache_aligned_allocator< T >::deallocate(), my_rep, tbb::internal::concurrent_queue_rep::n_queue, and tbb::internal::micro_queue::tail_page.
|
protectedpure virtual |
custom allocator
Implemented in tbb::concurrent_bounded_queue< T, A >.
Referenced by tbb::internal::micro_queue::make_copy(), and tbb::internal::micro_queue::push().
|
protected |
copy internal representation
Referenced by tbb::concurrent_bounded_queue< T, A >::concurrent_bounded_queue().
|
privatepure virtual |
Implemented in tbb::concurrent_bounded_queue< T, A >.
Referenced by tbb::internal::micro_queue::pop().
|
privatepure virtual |
Implemented in tbb::concurrent_bounded_queue< T, A >.
Referenced by tbb::internal::micro_queue::push().
|
privatepure virtual |
Implemented in tbb::concurrent_bounded_queue< T, A >.
Referenced by tbb::internal::micro_queue::make_copy().
|
protectedpure virtual |
custom de-allocator
Implemented in tbb::concurrent_bounded_queue< T, A >.
Referenced by internal_finish_clear(), and tbb::internal::micro_queue_pop_finalizer::~micro_queue_pop_finalizer().
|
protected |
Abort all pending queue operations.
Definition at line 460 of file concurrent_queue.cpp.
References tbb::internal::concurrent_monitor::abort_all(), tbb::internal::concurrent_queue_rep::abort_counter, tbb::internal::concurrent_queue_rep::items_avail, my_rep, and tbb::internal::concurrent_queue_rep::slots_avail.
|
protected |
Assigns one queue to another using specified operation (copy or move)
Definition at line 551 of file concurrent_queue.cpp.
References __TBB_ASSERT, tbb::internal::concurrent_queue_rep::abort_counter, tbb::internal::concurrent_queue_rep::array, tbb::internal::micro_queue::assign(), tbb::internal::concurrent_queue_rep::head_counter, items_per_page, my_capacity, my_rep, tbb::internal::concurrent_queue_rep::n_invalid_entries, tbb::internal::concurrent_queue_rep::n_queue, and tbb::internal::concurrent_queue_rep::tail_counter.
Referenced by tbb::internal::concurrent_queue_base_v8::move_content().
|
protected |
Check if the queue is empty.
Definition at line 524 of file concurrent_queue.cpp.
References tbb::internal::concurrent_queue_rep::head_counter, my_rep, tbb::internal::concurrent_queue_rep::n_invalid_entries, and tbb::internal::concurrent_queue_rep::tail_counter.
Referenced by tbb::concurrent_bounded_queue< T, A >::empty().
|
protected |
free any remaining pages
Definition at line 535 of file concurrent_queue.cpp.
References __TBB_ASSERT, tbb::internal::concurrent_queue_rep::array, deallocate_page(), tbb::internal::micro_queue::head_page, my_rep, tbb::internal::concurrent_queue_rep::n_queue, tbb::internal::static_invalid_page, and tbb::internal::micro_queue::tail_page.
|
protected |
Attempts to enqueue at tail of queue using specified operation (copy or move)
Definition at line 499 of file concurrent_queue.cpp.
References tbb::internal::concurrent_queue_rep::choose(), tbb::internal::concurrent_queue_rep::head_counter, tbb::internal::concurrent_queue_rep::items_avail, my_capacity, my_rep, tbb::internal::concurrent_monitor::notify(), tbb::internal::micro_queue::push(), and tbb::internal::concurrent_queue_rep::tail_counter.
Referenced by internal_push_if_not_full(), and tbb::internal::concurrent_queue_base_v8::internal_push_move_if_not_full().
|
protected |
Enqueues item at tail of queue using specified operation (copy or move)
Definition at line 371 of file concurrent_queue.cpp.
References __TBB_ASSERT, __TBB_CATCH, __TBB_RETHROW, __TBB_TRY, tbb::internal::concurrent_queue_rep::abort_counter, tbb::internal::micro_queue::abort_push(), tbb::internal::concurrent_monitor::cancel_wait(), tbb::internal::concurrent_queue_rep::choose(), tbb::internal::concurrent_monitor::commit_wait(), tbb::internal::eid_user_abort, tbb::internal::concurrent_queue_rep::head_counter, tbb::internal::concurrent_queue_rep::items_avail, ITT_NOTIFY, my_capacity, my_rep, tbb::internal::concurrent_monitor::notify(), tbb::internal::concurrent_monitor::prepare_wait(), tbb::internal::micro_queue::push(), tbb::internal::concurrent_queue_rep::slots_avail, tbb::internal::concurrent_queue_rep::tail_counter, and tbb::internal::throw_exception().
Referenced by internal_push(), and tbb::internal::concurrent_queue_base_v8::internal_push_move().
Dequeue item from head of queue.
Definition at line 414 of file concurrent_queue.cpp.
References __TBB_ASSERT, __TBB_CATCH, __TBB_RETHROW, __TBB_TRY, tbb::internal::concurrent_queue_rep::abort_counter, tbb::internal::concurrent_monitor::cancel_wait(), tbb::internal::concurrent_queue_rep::choose(), tbb::internal::concurrent_monitor::commit_wait(), tbb::internal::eid_user_abort, tbb::internal::concurrent_queue_rep::head_counter, tbb::internal::concurrent_queue_rep::items_avail, ITT_NOTIFY, my_rep, tbb::internal::concurrent_monitor::notify(), tbb::internal::micro_queue::pop(), tbb::internal::concurrent_monitor::prepare_wait(), tbb::internal::concurrent_queue_rep::slots_avail, tbb::internal::concurrent_queue_rep::tail_counter, and tbb::internal::throw_exception().
Referenced by tbb::concurrent_bounded_queue< T, A >::pop().
|
protected |
Attempt to dequeue item from queue.
NULL if there was no item to dequeue.
Definition at line 467 of file concurrent_queue.cpp.
References tbb::internal::concurrent_queue_rep::choose(), tbb::internal::concurrent_queue_rep::head_counter, my_rep, tbb::internal::concurrent_monitor::notify(), tbb::internal::micro_queue::pop(), tbb::internal::concurrent_queue_rep::slots_avail, and tbb::internal::concurrent_queue_rep::tail_counter.
Referenced by tbb::concurrent_bounded_queue< T, A >::try_pop().
Enqueue item at tail of queue using copy operation.
Definition at line 363 of file concurrent_queue.cpp.
References copy, and internal_insert_item().
Referenced by tbb::concurrent_bounded_queue< T, A >::push().
|
protected |
Attempt to enqueue item onto queue using copy operation.
Definition at line 491 of file concurrent_queue.cpp.
References copy, and internal_insert_if_not_full().
Referenced by tbb::concurrent_bounded_queue< T, A >::concurrent_bounded_queue(), and tbb::concurrent_bounded_queue< T, A >::try_push().
|
protected |
Set the queue capacity.
Definition at line 531 of file concurrent_queue.cpp.
References tbb::internal::concurrent_queue_rep::infinite_capacity, and my_capacity.
Referenced by tbb::concurrent_bounded_queue< T, A >::set_capacity().
|
protected |
Get size of queue.
Definition at line 519 of file concurrent_queue.cpp.
References __TBB_ASSERT, tbb::internal::concurrent_queue_rep::head_counter, my_rep, tbb::internal::concurrent_queue_rep::n_invalid_entries, and tbb::internal::concurrent_queue_rep::tail_counter.
Referenced by tbb::concurrent_bounded_queue< T, A >::size().
|
inlineprotected |
swap queues
Definition at line 917 of file _concurrent_queue_impl.h.
Referenced by tbb::concurrent_bounded_queue< T, A >::concurrent_bounded_queue().
|
protected |
throw an exception
Definition at line 547 of file concurrent_queue.cpp.
References tbb::internal::eid_bad_alloc, and tbb::internal::throw_exception().
|
friend |
Definition at line 835 of file _concurrent_queue_impl.h.
|
friend |
Definition at line 834 of file _concurrent_queue_impl.h.
|
friend |
Definition at line 831 of file _concurrent_queue_impl.h.
|
friend |
Definition at line 832 of file _concurrent_queue_impl.h.
|
friend |
Definition at line 833 of file _concurrent_queue_impl.h.
|
protected |
Size of an item.
Definition at line 850 of file _concurrent_queue_impl.h.
Referenced by concurrent_queue_base_v3(), and tbb::internal::concurrent_queue_iterator_rep::get_item().
|
protected |
Always a power of 2.
Definition at line 847 of file _concurrent_queue_impl.h.
Referenced by tbb::internal::concurrent_queue_iterator_base_v3::advance(), tbb::concurrent_bounded_queue< T, A >::allocate_page(), tbb::internal::micro_queue::assign(), concurrent_queue_base_v3(), tbb::concurrent_bounded_queue< T, A >::deallocate_page(), tbb::internal::concurrent_queue_iterator_rep::get_item(), tbb::concurrent_bounded_queue< T, A >::get_ref(), internal_assign(), tbb::internal::micro_queue::pop(), and tbb::internal::micro_queue::push().
|
protected |
Capacity of the queue.
Definition at line 844 of file _concurrent_queue_impl.h.
Referenced by tbb::concurrent_bounded_queue< T, A >::capacity(), concurrent_queue_base_v3(), internal_assign(), internal_insert_if_not_full(), internal_insert_item(), and internal_set_capacity().
|
private |
Internal representation.
Definition at line 829 of file _concurrent_queue_impl.h.
Referenced by concurrent_queue_base_v3(), tbb::internal::concurrent_queue_iterator_rep::concurrent_queue_iterator_rep(), tbb::internal::concurrent_queue_iterator_rep::get_item(), internal_abort(), internal_assign(), internal_empty(), internal_finish_clear(), internal_insert_if_not_full(), internal_insert_item(), internal_pop(), internal_pop_if_present(), internal_size(), tbb::internal::micro_queue::pop(), tbb::internal::micro_queue::push(), and ~concurrent_queue_base_v3().