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

template<typename T>

typedef micro_queue<T>::padded_page tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >::padded_page

private

Definition at line 612 of file _concurrent_queue_impl.h.

## Constructor & Destructor Documentation

## concurrent_queue_iterator_rep()

template<typename T>

tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >::concurrent_queue_iterator_rep | ( | const concurrent_queue_base_v3< T > & | queue | ) |

inline

Definition at line 617 of file _concurrent_queue_impl.h.

:
head_counter(queue.my_rep->head_counter),
my_queue(queue)
{
for( size_t k=0; k<concurrent_queue_rep<T>::n_queue; ++k )
array[k] = queue.my_rep->array[k].head_page;
}

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

{
if( k==my_queue.my_rep->tail_counter ) {
item = NULL;
return true;
} else {
typename concurrent_queue_base_v3<T>::page* p = array[concurrent_queue_rep<T>::index(k)];
__TBB_ASSERT(p,NULL);
size_t i = modulo_power_of_two( k/concurrent_queue_rep<T>::n_queue, my_queue.my_rep->items_per_page );
item = &micro_queue<T>::get_ref(*p,i);
return (p->mask & uintptr_t(1)<<i)!=0;
}
}

## Member Data Documentation

## array

template<typename T>

concurrent_queue_base_v3<T>::page* tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >::array[concurrent_queue_rep< T >::n_queue]

Definition at line 616 of file _concurrent_queue_impl.h.

## head_counter

template<typename T>

ticket tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >::head_counter

Definition at line 614 of file _concurrent_queue_impl.h.

Referenced by tbb::strict_ppl::internal::concurrent_queue_iterator_base_v3< tbb_remove_cv< Value >::type >::concurrent_queue_iterator_base_v3().

## my_queue

template<typename T>

const concurrent_queue_base_v3<T>& tbb::strict_ppl::internal::concurrent_queue_iterator_rep< T >::my_queue

Definition at line 615 of file _concurrent_queue_impl.h.

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

- _concurrent_queue_impl.h

tbb::strict_ppl::internal::concurrent_queue_rep::index
static size_t index(ticket k)
Map ticket to an array index.
Definition: _concurrent_queue_impl.h:405
tbb::internal::concurrent_queue_base_v3::my_rep
concurrent_queue_rep * my_rep
Internal representation.
Definition: _concurrent_queue_impl.h:829
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::internal::concurrent_queue_rep
Internal representation of a ConcurrentQueue.
Definition: concurrent_queue.cpp:112
tbb::internal::concurrent_queue_rep::head_counter
atomic< ticket > head_counter
Definition: concurrent_queue.cpp:129
tbb::strict_ppl::internal::concurrent_queue_iterator_rep::head_counter
ticket head_counter
Definition: _concurrent_queue_impl.h:614
tbb::strict_ppl::internal::concurrent_queue_iterator_rep::my_queue
const concurrent_queue_base_v3< T > & my_queue
Definition: _concurrent_queue_impl.h:615
tbb::internal::concurrent_queue_rep::array
micro_queue array[n_queue]
Definition: concurrent_queue.cpp:137
tbb::strict_ppl::internal::concurrent_queue_iterator_rep::array
concurrent_queue_base_v3< T >::page * array[concurrent_queue_rep< T >::n_queue]
Definition: _concurrent_queue_impl.h:616
tbb::internal::micro_queue::head_page
atomic< page * > head_page
Definition: concurrent_queue.cpp:52
tbb::internal::concurrent_queue_base_v3::page
Prefix on a page.
Definition: _concurrent_queue_impl.h:838
tbb::internal::modulo_power_of_two
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
tbb::strict_ppl::internal::micro_queue::get_ref
static T & get_ref(page &p, size_t index)
Definition: _concurrent_queue_impl.h:176
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91

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.