libMesh::Threads::scalable_allocator< T > Class Template Reference

#include <threads_allocators.h>

Inheritance diagram for libMesh::Threads::scalable_allocator< T >:

Classes

struct  rebind
 

Public Types

typedef T * pointer
 
typedef const T * const_pointer
 
typedef T value_type
 
typedef size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T value_type
 
typedef size_t size_type
 
typedef std::ptrdiff_t difference_type
 

Public Member Functions

 scalable_allocator ()
 
 scalable_allocator (const scalable_allocator &a)
 
template<typename U >
 scalable_allocator (const scalable_allocator< U > &a)
 
 scalable_allocator ()
 
 scalable_allocator (const scalable_allocator &a)
 
template<typename U >
 scalable_allocator (const scalable_allocator< U > &a)
 

Detailed Description

template<typename T>
class libMesh::Threads::scalable_allocator< T >

Scalable allocator to be used in multithreaded code chunks which allocate a lot of dynamic memory. This allocator can be faster than the std::allocator when there are multiple threads.

Just use std::allocator when the Threading Building Blocks is absent.

Definition at line 56 of file threads_allocators.h.

Member Typedef Documentation

◆ const_pointer [1/2]

template<typename T>
typedef const T* libMesh::Threads::scalable_allocator< T >::const_pointer

Definition at line 60 of file threads_allocators.h.

◆ const_pointer [2/2]

template<typename T>
typedef const T* libMesh::Threads::scalable_allocator< T >::const_pointer

Definition at line 99 of file threads_allocators.h.

◆ difference_type [1/2]

template<typename T>
typedef std::ptrdiff_t libMesh::Threads::scalable_allocator< T >::difference_type

Definition at line 65 of file threads_allocators.h.

◆ difference_type [2/2]

template<typename T>
typedef std::ptrdiff_t libMesh::Threads::scalable_allocator< T >::difference_type

Definition at line 104 of file threads_allocators.h.

◆ pointer [1/2]

template<typename T>
typedef T* libMesh::Threads::scalable_allocator< T >::pointer

Definition at line 59 of file threads_allocators.h.

◆ pointer [2/2]

template<typename T>
typedef T* libMesh::Threads::scalable_allocator< T >::pointer

Definition at line 98 of file threads_allocators.h.

◆ size_type [1/2]

template<typename T>
typedef size_t libMesh::Threads::scalable_allocator< T >::size_type

Definition at line 64 of file threads_allocators.h.

◆ size_type [2/2]

template<typename T>
typedef size_t libMesh::Threads::scalable_allocator< T >::size_type

Definition at line 103 of file threads_allocators.h.

◆ value_type [1/2]

template<typename T>
typedef T libMesh::Threads::scalable_allocator< T >::value_type

Definition at line 63 of file threads_allocators.h.

◆ value_type [2/2]

template<typename T>
typedef T libMesh::Threads::scalable_allocator< T >::value_type

Definition at line 102 of file threads_allocators.h.

Constructor & Destructor Documentation

◆ scalable_allocator() [1/6]

template<typename T>
libMesh::Threads::scalable_allocator< T >::scalable_allocator ( )
inline

Definition at line 73 of file threads_allocators.h.

73  :
74  tbb::scalable_allocator<T>() {}

◆ scalable_allocator() [2/6]

template<typename T>
libMesh::Threads::scalable_allocator< T >::scalable_allocator ( const scalable_allocator< T > &  a)
inline

Definition at line 76 of file threads_allocators.h.

76  :
77  tbb::scalable_allocator<T>(a) {}

◆ scalable_allocator() [3/6]

template<typename T>
template<typename U >
libMesh::Threads::scalable_allocator< T >::scalable_allocator ( const scalable_allocator< U > &  a)
inline

Definition at line 80 of file threads_allocators.h.

80  :
81  tbb::scalable_allocator<T>(a) {}

◆ scalable_allocator() [4/6]

template<typename T>
libMesh::Threads::scalable_allocator< T >::scalable_allocator ( )
inline

Definition at line 112 of file threads_allocators.h.

112  :
113  std::allocator<T>() {}

◆ scalable_allocator() [5/6]

template<typename T>
libMesh::Threads::scalable_allocator< T >::scalable_allocator ( const scalable_allocator< T > &  a)
inline

Definition at line 115 of file threads_allocators.h.

115  :
116  std::allocator<T>(a) {}

◆ scalable_allocator() [6/6]

template<typename T>
template<typename U >
libMesh::Threads::scalable_allocator< T >::scalable_allocator ( const scalable_allocator< U > &  a)
inline

Definition at line 119 of file threads_allocators.h.

119  :
120  std::allocator<T>(a) {}

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