Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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)
 

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]
 

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.

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

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

Map ticket to an array index.

Definition at line 405 of file _concurrent_queue_impl.h.

405  {
406  return k*phi%n_queue;
407  }

Referenced by tbb::strict_ppl::internal::concurrent_queue_iterator_base_v3< Value >::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


The documentation for this struct was generated from the following file:
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::index
static size_t index(ticket k)
Map ticket to an array index.
Definition: _concurrent_queue_impl.h:405

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.