tbb::strict_ppl::internal::concurrent_queue_rep< T > Struct Template Reference

representation of concurrent_queue_base More...

`#include <_concurrent_queue_impl.h>`

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

## Public Member Functions

micro_queue< T > & | choose (ticket k)
Public Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Static Public Member Functions

static size_t | index (ticket k)
| Map ticket to an array index. More...

## Public Attributes

micro_queue< T > | array [n_queue]
Public Attributes inherited from tbb::strict_ppl::internal::concurrent_queue_rep_base
atomic< ticket > | head_counter
char | pad1 [NFS_MaxLineSize-sizeof(atomic< ticket >)]
atomic< ticket > | tail_counter
char | pad2 [NFS_MaxLineSize-sizeof(atomic< ticket >)]
size_t | items_per_page
| Always a power of 2. More...
size_t | item_size
| Size of an item. More...
atomic< size_t > | n_invalid_entries
| number of invalid entries in the queue More...
char | pad3 [NFS_MaxLineSize-sizeof(size_t) -sizeof(size_t) -sizeof(atomic< size_t >)]

## Additional Inherited Members

Static Public Attributes inherited from tbb::strict_ppl::internal::concurrent_queue_rep_base
static const size_t | n_queue = 8
Static Protected Attributes inherited from tbb::strict_ppl::internal::concurrent_queue_rep_base
static const size_t | phi = 3
| Approximately n_queue/golden ratio. More...

## Detailed Description

### template<typename T>
struct tbb::strict_ppl::internal::concurrent_queue_rep< T >

representation of concurrent_queue_base

the class inherits from concurrent_queue_rep_base and defines an array of micro_queue<T>'s

Definition at line 61 of file _concurrent_queue_impl.h.

## Member Function Documentation

## choose()

template<typename T>

micro_queue<T>& tbb::strict_ppl::internal::concurrent_queue_rep< T >::choose | ( | ticket | k | ) |

inline

Definition at line 409 of file _concurrent_queue_impl.h.

{
// The formula here approximates LRU in a cache-oblivious way.
return array[index(k)];
}

Referenced by tbb::strict_ppl::internal::concurrent_queue_base_v3< Value >::internal_push(), and tbb::strict_ppl::internal::concurrent_queue_base_v3< Value >::internal_try_pop().

Here is the caller graph for this function:

## index()

template<typename T>

static size_t tbb::strict_ppl::internal::concurrent_queue_rep< T >::index | ( | ticket | k | ) |

inline static

Map ticket to an array index.

Definition at line 405 of file _concurrent_queue_impl.h.

{
return k*phi%n_queue;
}

Referenced by tbb::strict_ppl::internal::concurrent_queue_iterator_base_v3< tbb_remove_cv< Value >::type >::advance(), and tbb::strict_ppl::internal::concurrent_queue_iterator_rep< Value >::get_item().

Here is the caller graph for this function:

## Member Data Documentation

## array

template<typename T>

micro_queue<T> tbb::strict_ppl::internal::concurrent_queue_rep< T >::array[n_queue]

Definition at line 402 of file _concurrent_queue_impl.h.

Referenced by tbb::strict_ppl::internal::concurrent_queue_base_v3< Value >::assign(), tbb::strict_ppl::internal::concurrent_queue_base_v3< Value >::internal_finish_clear(), and tbb::strict_ppl::internal::concurrent_queue_base_v3< Value >::~concurrent_queue_base_v3().

The documentation for this struct 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::strict_ppl::internal::concurrent_queue_rep::array
micro_queue< T > array[n_queue]
Definition: _concurrent_queue_impl.h:402
tbb::strict_ppl::internal::concurrent_queue_rep_base::phi
static const size_t phi
Approximately n_queue/golden ratio.
Definition: _concurrent_queue_impl.h:73
tbb::strict_ppl::internal::concurrent_queue_rep_base::n_queue
static const size_t n_queue
Definition: _concurrent_queue_impl.h:77

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.