Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PTL::TaskAllocator< Type > Class Template Reference

#include <TaskAllocator.hh>

+ Inheritance diagram for PTL::TaskAllocator< Type >:

Public Types

typedef Type value_type
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef Typepointer
 
typedef const Typeconst_pointer
 
typedef Typereference
 
typedef const Typeconst_reference
 
typedef TaskAllocatorImpl< Typeallocator_type
 
- Public Types inherited from PTL::TaskAllocatorImpl< Type >
typedef Type value_type
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef Typepointer
 
typedef const Typeconst_pointer
 
typedef Typereference
 
typedef const Typeconst_reference
 

Public Member Functions

void * operator new (size_type)
 
void operator delete (void *ptr)
 
- Public Member Functions inherited from PTL::TaskAllocatorImpl< Type >
 TaskAllocatorImpl ()
 
 ~TaskAllocatorImpl ()
 
TypeMallocSingle ()
 
void FreeSingle (Type *anElement)
 
void ResetStorage () override
 
size_t GetAllocatedSize () const override
 
int GetNoPages () const override
 
size_t GetPageSize () const override
 
void IncreasePageSize (unsigned int sz) override
 
const char * GetPoolType () const override
 
template<class U >
 TaskAllocatorImpl (const TaskAllocatorImpl< U > &right) throw ()
 
pointer address (reference r) const
 
const_pointer address (const_reference r) const
 
pointer allocate (size_type n, void *=0)
 
void deallocate (pointer p, size_type n)
 
void construct (pointer p, const Type &val)
 
void destroy (pointer p)
 
size_type max_size () const throw ()
 
- Public Member Functions inherited from PTL::TaskAllocatorBase
 TaskAllocatorBase ()
 
virtual ~TaskAllocatorBase ()
 
virtual void ResetStorage ()=0
 
virtual size_t GetAllocatedSize () const =0
 
virtual int GetNoPages () const =0
 
virtual size_t GetPageSize () const =0
 
virtual void IncreasePageSize (unsigned int sz)=0
 
virtual const char * GetPoolType () const =0
 

Additional Inherited Members

- Public Attributes inherited from PTL::TaskAllocatorImpl< Type >
TaskAllocatorPool mem
 

Detailed Description

template<typename Type>
class PTL::TaskAllocator< Type >

Definition at line 172 of file TaskAllocator.hh.

Member Typedef Documentation

◆ allocator_type

template<typename Type >
typedef TaskAllocatorImpl<Type> PTL::TaskAllocator< Type >::allocator_type

Definition at line 182 of file TaskAllocator.hh.

◆ const_pointer

template<typename Type >
typedef const Type* PTL::TaskAllocator< Type >::const_pointer

Definition at line 179 of file TaskAllocator.hh.

◆ const_reference

template<typename Type >
typedef const Type& PTL::TaskAllocator< Type >::const_reference

Definition at line 181 of file TaskAllocator.hh.

◆ difference_type

template<typename Type >
typedef ptrdiff_t PTL::TaskAllocator< Type >::difference_type

Definition at line 177 of file TaskAllocator.hh.

◆ pointer

template<typename Type >
typedef Type* PTL::TaskAllocator< Type >::pointer

Definition at line 178 of file TaskAllocator.hh.

◆ reference

template<typename Type >
typedef Type& PTL::TaskAllocator< Type >::reference

Definition at line 180 of file TaskAllocator.hh.

◆ size_type

template<typename Type >
typedef size_t PTL::TaskAllocator< Type >::size_type

Definition at line 176 of file TaskAllocator.hh.

◆ value_type

template<typename Type >
typedef Type PTL::TaskAllocator< Type >::value_type

Definition at line 175 of file TaskAllocator.hh.

Member Function Documentation

◆ operator delete()

template<typename Type >
void PTL::TaskAllocator< Type >::operator delete ( void *  ptr)
inline

Definition at line 191 of file TaskAllocator.hh.

192 {
193 get_allocator()->FreeSingle(static_cast<pointer>(ptr));
194 }
void FreeSingle(Type *anElement)

◆ operator new()

template<typename Type >
void * PTL::TaskAllocator< Type >::operator new ( size_type  )
inline

Definition at line 186 of file TaskAllocator.hh.

187 {
188 return static_cast<void*>(get_allocator()->MallocSingle());
189 }

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