Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator > Class Template Reference

#include <_flow_graph_tagged_buffer_impl.h>

Inheritance diagram for hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >:
Collaboration diagram for hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >:

Classes

struct  DoCleanup
 

Public Types

typedef ValueType value_type
 
typedef buffer_element_type< value_type >::type element_type
 
typedef value_typepointer_type
 
typedef element_typelist_array_type
 
typedef list_array_typepointer_array_type
 
typedef Allocator::template rebind< list_array_type >::other pointer_array_allocator_type
 
typedef Allocator::template rebind< element_type >::other elements_array_allocator
 
typedef tbb::internal::strip< Key >::type Knoref
 

Public Member Functions

 hash_buffer ()
 
 ~hash_buffer ()
 
void reset ()
 
void set_key_func (ValueToKey *vtk)
 
ValueToKey * get_key_func ()
 
bool insert_with_key (const value_type &v)
 
bool find_ref_with_key (const Knoref &k, pointer_type &v)
 
bool find_with_key (const Knoref &k, value_type &v)
 
void delete_with_key (const Knoref &k)
 

Static Public Attributes

static const size_t INITIAL_SIZE = 8
 

Private Member Functions

size_t mask ()
 
void set_up_free_list (element_type **p_free_list, list_array_type la, size_t sz)
 
void grow_array ()
 
void internal_insert_with_key (element_type **p_pointer_array, size_t p_sz, list_array_type &p_free_list, const value_type &v)
 
void internal_initialize_buffer ()
 

Static Private Member Functions

static void internal_free_buffer (pointer_array_type &pa, list_array_type &el, size_t &sz, size_t &ne)
 

Private Attributes

ValueToKey * my_key
 
size_t my_size
 
size_t nelements
 
pointer_array_type pointer_array
 
list_array_type elements_array
 
element_typefree_list
 

Detailed Description

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
class hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >

Definition at line 48 of file _flow_graph_tagged_buffer_impl.h.

Member Typedef Documentation

◆ element_type

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef buffer_element_type< value_type >::type hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::element_type

Definition at line 52 of file _flow_graph_tagged_buffer_impl.h.

◆ elements_array_allocator

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef Allocator::template rebind<element_type>::other hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::elements_array_allocator

Definition at line 57 of file _flow_graph_tagged_buffer_impl.h.

◆ Knoref

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef tbb::internal::strip<Key>::type hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::Knoref

Definition at line 58 of file _flow_graph_tagged_buffer_impl.h.

◆ list_array_type

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef element_type* hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::list_array_type

Definition at line 54 of file _flow_graph_tagged_buffer_impl.h.

◆ pointer_array_allocator_type

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef Allocator::template rebind<list_array_type>::other hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::pointer_array_allocator_type

Definition at line 56 of file _flow_graph_tagged_buffer_impl.h.

◆ pointer_array_type

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef list_array_type* hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::pointer_array_type

Definition at line 55 of file _flow_graph_tagged_buffer_impl.h.

◆ pointer_type

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef value_type* hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::pointer_type

Definition at line 53 of file _flow_graph_tagged_buffer_impl.h.

◆ value_type

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
typedef ValueType hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::value_type

Definition at line 51 of file _flow_graph_tagged_buffer_impl.h.

Constructor & Destructor Documentation

◆ hash_buffer()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::hash_buffer ( )
inline

◆ ~hash_buffer()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::~hash_buffer ( )
inline

Definition at line 176 of file _flow_graph_tagged_buffer_impl.h.

176  {
178  if(my_key) delete my_key;
179  }
pointer_array_type pointer_array
static void internal_free_buffer(pointer_array_type &pa, list_array_type &el, size_t &sz, size_t &ne)
list_array_type elements_array

Member Function Documentation

◆ delete_with_key()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::delete_with_key ( const Knoref k)
inline

Definition at line 230 of file _flow_graph_tagged_buffer_impl.h.

230  {
231  size_t h = this->hash(k) & mask();
232  element_type* prev = NULL;
233  for(element_type* p = pointer_array[h]; p; prev = p, p = (element_type *)(p->second)) {
234  value_type *vp = reinterpret_cast<value_type *>(&(p->first));
235  __TBB_ASSERT(my_key, "Error: value-to-key functor not provided");
236  if(this->equal((*my_key)(*vp), k)) {
237  vp->~value_type();
238  if(prev) prev->second = p->second;
239  else pointer_array[h] = (element_type *)(p->second);
240  p->second = free_list;
241  free_list = p;
242  --nelements;
243  return;
244  }
245  }
246  __TBB_ASSERT(false, "key not found for delete");
247  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function h
pointer_array_type pointer_array
void const char const char int ITT_FORMAT __itt_group_sync p
buffer_element_type< value_type >::type element_type
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

◆ find_ref_with_key()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
bool hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::find_ref_with_key ( const Knoref k,
pointer_type v 
)
inline

Definition at line 207 of file _flow_graph_tagged_buffer_impl.h.

207  {
208  size_t i = this->hash(k) & mask();
209  for(element_type* p = pointer_array[i]; p; p = (element_type *)(p->second)) {
210  pointer_type pv = reinterpret_cast<pointer_type>(&(p->first));
211  __TBB_ASSERT(my_key, "Error: value-to-key functor not provided");
212  if(this->equal((*my_key)(*pv), k)) {
213  v = pv;
214  return true;
215  }
216  }
217  return false;
218  }
pointer_array_type pointer_array
void const char const char int ITT_FORMAT __itt_group_sync p
buffer_element_type< value_type >::type element_type
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::find_with_key(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::insert_with_key().

Here is the caller graph for this function:

◆ find_with_key()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
bool hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::find_with_key ( const Knoref k,
value_type v 
)
inline

Definition at line 220 of file _flow_graph_tagged_buffer_impl.h.

220  {
221  value_type *p;
222  if(find_ref_with_key(k, p)) {
223  v = *p;
224  return true;
225  }
226  else
227  return false;
228  }
bool find_ref_with_key(const Knoref &k, pointer_type &v)
void const char const char int ITT_FORMAT __itt_group_sync p

◆ get_key_func()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
ValueToKey* hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::get_key_func ( )
inline

Definition at line 190 of file _flow_graph_tagged_buffer_impl.h.

190 { return my_key; }

◆ grow_array()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::grow_array ( )
inlineprivate

Definition at line 95 of file _flow_graph_tagged_buffer_impl.h.

95  {
96  size_t new_size = my_size*2;
97  size_t new_nelements = nelements; // internal_free_buffer zeroes this
98  list_array_type new_elements_array = NULL;
99  pointer_array_type new_pointer_array = NULL;
100  list_array_type new_free_list = NULL;
101  {
102  DoCleanup my_cleanup(new_pointer_array, new_elements_array, new_size);
103  new_elements_array = elements_array_allocator().allocate(my_size);
104  new_pointer_array = pointer_array_allocator_type().allocate(new_size);
105  for(size_t i=0; i < new_size; ++i) new_pointer_array[i] = NULL;
106  set_up_free_list(&new_free_list, new_elements_array, my_size );
107 
108  for(size_t i=0; i < my_size; ++i) {
109  for( element_type* op = pointer_array[i]; op; op = (element_type *)(op->second)) {
110  value_type *ov = reinterpret_cast<value_type *>(&(op->first));
111  // could have std::move semantics
112  internal_insert_with_key(new_pointer_array, new_size, new_free_list, *ov);
113  }
114  }
115  my_cleanup.my_pa = NULL;
116  my_cleanup.my_elements = NULL;
117  }
118 
120  free_list = new_free_list;
121  pointer_array = new_pointer_array;
122  elements_array = new_elements_array;
123  my_size = new_size;
124  nelements = new_nelements;
125  }
pointer_array_type pointer_array
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t new_size
void internal_insert_with_key(element_type **p_pointer_array, size_t p_sz, list_array_type &p_free_list, const value_type &v)
void set_up_free_list(element_type **p_free_list, list_array_type la, size_t sz)
Allocator::template rebind< list_array_type >::other pointer_array_allocator_type
static void internal_free_buffer(pointer_array_type &pa, list_array_type &el, size_t &sz, size_t &ne)
list_array_type * pointer_array_type
buffer_element_type< value_type >::type element_type
Allocator::template rebind< element_type >::other elements_array_allocator
element_type * list_array_type
list_array_type elements_array

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::insert_with_key().

Here is the caller graph for this function:

◆ insert_with_key()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
bool hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::insert_with_key ( const value_type v)
inline

Definition at line 192 of file _flow_graph_tagged_buffer_impl.h.

192  {
193  pointer_type p = NULL;
194  __TBB_ASSERT(my_key, "Error: value-to-key functor not provided");
195  if(find_ref_with_key((*my_key)(v), p)) {
196  p->~value_type();
197  (void) new(p) value_type(v); // copy-construct into the space
198  return false;
199  }
200  ++nelements;
201  if(nelements*2 > my_size) grow_array();
203  return true;
204  }
pointer_array_type pointer_array
bool find_ref_with_key(const Knoref &k, pointer_type &v)
void internal_insert_with_key(element_type **p_pointer_array, size_t p_sz, list_array_type &p_free_list, const value_type &v)
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

◆ internal_free_buffer()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
static void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::internal_free_buffer ( pointer_array_type pa,
list_array_type el,
size_t &  sz,
size_t &  ne 
)
inlinestaticprivate

Definition at line 149 of file _flow_graph_tagged_buffer_impl.h.

149  {
150  if(pa) {
151  for(size_t i = 0; i < sz; ++i ) {
152  element_type *p_next;
153  for( element_type *p = pa[i]; p; p = p_next) {
154  p_next = (element_type *)p->second;
155  internal::punned_cast<value_type *>(&(p->first))->~value_type();
156  }
157  }
158  pointer_array_allocator_type().deallocate(pa, sz);
159  pa = NULL;
160  }
161  // Separate test (if allocation of pa throws, el may be allocated.
162  // but no elements will be constructed.)
163  if(el) {
164  elements_array_allocator().deallocate(el, sz / 2);
165  el = NULL;
166  }
167  sz = INITIAL_SIZE;
168  ne = 0;
169  }
static const size_t INITIAL_SIZE
Allocator::template rebind< list_array_type >::other pointer_array_allocator_type
void const char const char int ITT_FORMAT __itt_group_sync p
buffer_element_type< value_type >::type element_type
Allocator::template rebind< element_type >::other elements_array_allocator

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::grow_array(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::reset(), hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::DoCleanup::~DoCleanup(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::~hash_buffer().

Here is the caller graph for this function:

◆ internal_initialize_buffer()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::internal_initialize_buffer ( )
inlineprivate

Definition at line 141 of file _flow_graph_tagged_buffer_impl.h.

141  {
143  for(size_t i = 0; i < my_size; ++i) pointer_array[i] = NULL;
146  }
pointer_array_type pointer_array
void set_up_free_list(element_type **p_free_list, list_array_type la, size_t sz)
Allocator::template rebind< list_array_type >::other pointer_array_allocator_type
Allocator::template rebind< element_type >::other elements_array_allocator
list_array_type elements_array

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::hash_buffer(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::reset().

Here is the caller graph for this function:

◆ internal_insert_with_key()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::internal_insert_with_key ( element_type **  p_pointer_array,
size_t  p_sz,
list_array_type p_free_list,
const value_type v 
)
inlineprivate

Definition at line 129 of file _flow_graph_tagged_buffer_impl.h.

130  {
131  size_t l_mask = p_sz-1;
132  __TBB_ASSERT(my_key, "Error: value-to-key functor not provided");
133  size_t h = this->hash((*my_key)(v)) & l_mask;
134  __TBB_ASSERT(p_free_list, "Error: free list not set up.");
135  element_type* my_elem = p_free_list; p_free_list = (element_type *)(p_free_list->second);
136  (void) new(&(my_elem->first)) value_type(v);
137  my_elem->second = p_pointer_array[h];
138  p_pointer_array[h] = my_elem;
139  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function h
buffer_element_type< value_type >::type element_type
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::grow_array(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::insert_with_key().

Here is the caller graph for this function:

◆ mask()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
size_t hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::mask ( )
inlineprivate

◆ reset()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::reset ( )
inline

Definition at line 181 of file _flow_graph_tagged_buffer_impl.h.

181  {
184  }
pointer_array_type pointer_array
static void internal_free_buffer(pointer_array_type &pa, list_array_type &el, size_t &sz, size_t &ne)
list_array_type elements_array

Referenced by internal::key_matching_port< TraitsType >::reset_receiver().

Here is the caller graph for this function:

◆ set_key_func()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::set_key_func ( ValueToKey *  vtk)
inline

Definition at line 188 of file _flow_graph_tagged_buffer_impl.h.

188 { my_key = vtk; }

◆ set_up_free_list()

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
void hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::set_up_free_list ( element_type **  p_free_list,
list_array_type  la,
size_t  sz 
)
inlineprivate

Definition at line 70 of file _flow_graph_tagged_buffer_impl.h.

70  {
71  for(size_t i=0; i < sz - 1; ++i ) { // construct free list
72  la[i].second = &(la[i+1]);
73  }
74  la[sz-1].second = NULL;
75  *p_free_list = (element_type *)&(la[0]);
76  }
buffer_element_type< value_type >::type element_type

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::grow_array(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::internal_initialize_buffer().

Here is the caller graph for this function:

Member Data Documentation

◆ elements_array

◆ free_list

◆ INITIAL_SIZE

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
const size_t hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::INITIAL_SIZE = 8
static

◆ my_key

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
ValueToKey* hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::my_key
private

Definition at line 61 of file _flow_graph_tagged_buffer_impl.h.

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::delete_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::find_ref_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::get_key_func(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::insert_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::internal_insert_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::set_key_func(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::~hash_buffer().

◆ my_size

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
size_t hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::my_size
private

Definition at line 62 of file _flow_graph_tagged_buffer_impl.h.

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::grow_array(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::insert_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::internal_initialize_buffer(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::mask(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::reset(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::~hash_buffer().

◆ nelements

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
size_t hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::nelements
private

◆ pointer_array

template<typename Key, typename ValueType, typename ValueToKey, typename HashCompare, typename Allocator = tbb::cache_aligned_allocator< typename aligned_pair<ValueType, void *>::type >>
pointer_array_type hash_buffer< Key, ValueType, ValueToKey, HashCompare, Allocator >::pointer_array
private

Definition at line 64 of file _flow_graph_tagged_buffer_impl.h.

Referenced by hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::delete_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::find_ref_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::grow_array(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::insert_with_key(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::internal_initialize_buffer(), hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::reset(), and hash_buffer< tbb::internal::strip< K >::type &, count_element< tbb::internal::strip< K >::type >, internal::type_to_key_function_body< count_element< tbb::internal::strip< K >::type >, tbb::internal::strip< K >::type & >, KHash >::~hash_buffer().


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.