Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::allocator_traits< Alloc > Struct Template Reference

#include <_allocator_traits.h>

Inheritance diagram for tbb::internal::allocator_traits< Alloc >:
Collaboration diagram for tbb::internal::allocator_traits< Alloc >:

Classes

struct  rebind_alloc
 

Public Types

typedef tbb::internal::false_type propagate_on_container_move_assignment
 
typedef tbb::internal::false_type propagate_on_container_copy_assignment
 
typedef tbb::internal::false_type propagate_on_container_swap
 
typedef Alloc allocator_type
 
typedef allocator_type::value_type value_type
 
typedef allocator_type::pointer pointer
 
typedef allocator_type::const_pointer const_pointer
 
typedef allocator_type::difference_type difference_type
 
typedef allocator_type::size_type size_type
 

Static Public Member Functions

static pointer allocate (Alloc &a, size_type n)
 
static void deallocate (Alloc &a, pointer p, size_type n)
 
template<typename PT >
static void construct (Alloc &, PT *p)
 
template<typename PT , typename T1 >
static void construct (Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1)
 
template<typename PT , typename T1 , typename T2 >
static void construct (Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2)
 
template<typename PT , typename T1 , typename T2 , typename T3 >
static void construct (Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2, __TBB_FORWARDING_REF(T3) t3)
 
template<typename T >
static void destroy (Alloc &, T *p)
 
static Alloc select_on_container_copy_construction (const Alloc &a)
 

Detailed Description

template<typename Alloc>
struct tbb::internal::allocator_traits< Alloc >

Internal allocator_traits implementation, which relies on C++03 standard [20.1.5] allocator requirements

Definition at line 82 of file _allocator_traits.h.

Member Typedef Documentation

◆ allocator_type

template<typename Alloc>
typedef Alloc tbb::internal::allocator_traits< Alloc >::allocator_type

Definition at line 90 of file _allocator_traits.h.

◆ const_pointer

template<typename Alloc>
typedef allocator_type::const_pointer tbb::internal::allocator_traits< Alloc >::const_pointer

Definition at line 94 of file _allocator_traits.h.

◆ difference_type

template<typename Alloc>
typedef allocator_type::difference_type tbb::internal::allocator_traits< Alloc >::difference_type

Definition at line 95 of file _allocator_traits.h.

◆ pointer

template<typename Alloc>
typedef allocator_type::pointer tbb::internal::allocator_traits< Alloc >::pointer

Definition at line 93 of file _allocator_traits.h.

◆ propagate_on_container_copy_assignment

Definition at line 87 of file _allocator_traits.h.

◆ propagate_on_container_move_assignment

Definition at line 86 of file _allocator_traits.h.

◆ propagate_on_container_swap

Definition at line 88 of file _allocator_traits.h.

◆ size_type

template<typename Alloc>
typedef allocator_type::size_type tbb::internal::allocator_traits< Alloc >::size_type

Definition at line 96 of file _allocator_traits.h.

◆ value_type

template<typename Alloc>
typedef allocator_type::value_type tbb::internal::allocator_traits< Alloc >::value_type

Definition at line 91 of file _allocator_traits.h.

Member Function Documentation

◆ allocate()

template<typename Alloc>
static pointer tbb::internal::allocator_traits< Alloc >::allocate ( Alloc &  a,
size_type  n 
)
inlinestatic

Definition at line 102 of file _allocator_traits.h.

102  {
103  return a.allocate(n);
104  }

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::create_node().

Here is the caller graph for this function:

◆ construct() [1/4]

template<typename Alloc>
template<typename PT >
static void tbb::internal::allocator_traits< Alloc >::construct ( Alloc &  ,
PT *  p 
)
inlinestatic

Definition at line 111 of file _allocator_traits.h.

111  {
112  ::new (static_cast<void*>(p)) PT();
113  }
void const char const char int ITT_FORMAT __itt_group_sync p

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::create_node().

Here is the caller graph for this function:

◆ construct() [2/4]

template<typename Alloc>
template<typename PT , typename T1 >
static void tbb::internal::allocator_traits< Alloc >::construct ( Alloc &  ,
PT *  p,
__TBB_FORWARDING_REF(T1)  t1 
)
inlinestatic

Definition at line 116 of file _allocator_traits.h.

116  {
117  ::new (static_cast<void*>(p)) PT(tbb::internal::forward<T1>(t1));
118  }
void const char const char int ITT_FORMAT __itt_group_sync p

◆ construct() [3/4]

template<typename Alloc>
template<typename PT , typename T1 , typename T2 >
static void tbb::internal::allocator_traits< Alloc >::construct ( Alloc &  ,
PT *  p,
__TBB_FORWARDING_REF(T1)  t1,
__TBB_FORWARDING_REF(T2)  t2 
)
inlinestatic

Definition at line 121 of file _allocator_traits.h.

121  {
122  ::new (static_cast<void*>(p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2));
123  }
void const char const char int ITT_FORMAT __itt_group_sync p

◆ construct() [4/4]

template<typename Alloc>
template<typename PT , typename T1 , typename T2 , typename T3 >
static void tbb::internal::allocator_traits< Alloc >::construct ( Alloc &  ,
PT *  p,
__TBB_FORWARDING_REF(T1)  t1,
__TBB_FORWARDING_REF(T2)  t2,
__TBB_FORWARDING_REF(T3)  t3 
)
inlinestatic

Definition at line 126 of file _allocator_traits.h.

127  {
128  ::new (static_cast<void*>(p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2),
129  tbb::internal::forward<T3>(t3));
130  }
void const char const char int ITT_FORMAT __itt_group_sync p

◆ deallocate()

template<typename Alloc>
static void tbb::internal::allocator_traits< Alloc >::deallocate ( Alloc &  a,
pointer  p,
size_type  n 
)
inlinestatic

Definition at line 106 of file _allocator_traits.h.

106  {
107  a.deallocate(p, n);
108  }
void const char const char int ITT_FORMAT __itt_group_sync p

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::delete_node(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard().

Here is the caller graph for this function:

◆ destroy()

template<typename Alloc>
template<typename T >
static void tbb::internal::allocator_traits< Alloc >::destroy ( Alloc &  ,
T *  p 
)
inlinestatic

Definition at line 133 of file _allocator_traits.h.

133  {
134  p->~T();
136  }
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:398
void const char const char int ITT_FORMAT __itt_group_sync p

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::delete_node(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard().

Here is the caller graph for this function:

◆ select_on_container_copy_construction()

template<typename Alloc>
static Alloc tbb::internal::allocator_traits< Alloc >::select_on_container_copy_construction ( const Alloc &  a)
inlinestatic

Definition at line 138 of file _allocator_traits.h.

138 { return a; }

The documentation for this struct 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.