Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T > Class Template Reference

#include <_concurrent_queue_impl.h>

Inheritance diagram for tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >:
Collaboration diagram for tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >:

Public Member Functions

 concurrent_queue_iterator_rep (const concurrent_queue_base_v3< T > &queue)
 
bool get_item (T *&item, size_t k)
 Set item to point to kth element. Return true if at end of queue or item is marked valid; false otherwise. More...
 

Public Attributes

ticket head_counter
 
const concurrent_queue_base_v3< T > & my_queue
 
concurrent_queue_base_v3< T >::page * array [concurrent_queue_rep< T >::n_queue]
 

Private Types

typedef micro_queue< T >::padded_page padded_page
 

Additional Inherited Members

- Private Member Functions inherited from tbb::internal::no_assign
void operator= (const no_assign &)=delete
 
 no_assign (const no_assign &)=default
 
 no_assign ()=default
 

Detailed Description

template<typename T>
class tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >

Definition at line 393 of file _concurrent_queue_impl.h.

Member Typedef Documentation

◆ padded_page

Definition at line 612 of file _concurrent_queue_impl.h.

Constructor & Destructor Documentation

◆ concurrent_queue_iterator_rep()

Definition at line 617 of file _concurrent_queue_impl.h.

617  :
619  my_queue(queue)
620  {
621  for( size_t k=0; k<concurrent_queue_rep<T>::n_queue; ++k )
622  array[k] = queue.my_rep->array[k].head_page;
623  }
concurrent_queue_base_v3< T >::page * array[concurrent_queue_rep< T >::n_queue]
concurrent_queue_rep * my_rep
Internal representation.

Member Function Documentation

◆ get_item()

template<typename T>
bool tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >::get_item ( T *&  item,
size_t  k 
)

Set item to point to kth element. Return true if at end of queue or item is marked valid; false otherwise.

Definition at line 630 of file _concurrent_queue_impl.h.

630  {
631  if( k==my_queue.my_rep->tail_counter ) {
632  item = NULL;
633  return true;
634  } else {
636  __TBB_ASSERT(p,NULL);
637  size_t i = modulo_power_of_two( k/concurrent_queue_rep<T>::n_queue, my_queue.my_rep->items_per_page );
638  item = &micro_queue<T>::get_ref(*p,i);
639  return (p->mask & uintptr_t(1)<<i)!=0;
640  }
641 }
argument_integer_type modulo_power_of_two(argument_integer_type arg, divisor_integer_type divisor)
A function to compute arg modulo divisor where divisor is a power of 2.
Definition: tbb_stddef.h:382
static size_t index(ticket k)
Map ticket to an array index.
static T & get_ref(page &p, size_t index)
Internal representation of a ConcurrentQueue.
concurrent_queue_base_v3< T >::page * array[concurrent_queue_rep< T >::n_queue]
void const char const char int ITT_FORMAT __itt_group_sync p
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

Member Data Documentation

◆ array

Definition at line 616 of file _concurrent_queue_impl.h.

◆ head_counter

◆ my_queue

Definition at line 615 of file _concurrent_queue_impl.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.