|
UMPIRE
Umpire: resource management and provision
|
Allocator for objects of type T. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/TypedAllocator.hpp>
Public Types | |
| typedef T | value_type |
Public Member Functions | |
| TypedAllocator (Allocator allocator) | |
| Construct a new TypedAllocator that will use allocator to allocate data. More... | |
| template<typename U > | |
| TypedAllocator (const TypedAllocator< U > &other) | |
| T * | allocate (std::size_t size) |
| void | deallocate (T *ptr, std::size_t size) |
| Deallocate ptr, the passed size is ignored. More... | |
Friends | |
| template<typename U > | |
| class | TypedAllocator |
| template<typename U , typename V > | |
| bool | operator== (const TypedAllocator< U > &, const TypedAllocator< V > &) |
| template<typename U , typename V > | |
| bool | operator!= (const TypedAllocator< U > &, const TypedAllocator< V > &) |
Allocator for objects of type T.
This class is an adaptor that allows using an Allocator to allocate objects of type T. You can use this class as an allocator for STL containers like std::vector.
| typedef T umpire::TypedAllocator< T >::value_type |
|
explicit |
Construct a new TypedAllocator that will use allocator to allocate data.
| allocator | Allocator to use for allocating memory. |
| umpire::TypedAllocator< T >::TypedAllocator | ( | const TypedAllocator< U > & | other | ) |
| T * umpire::TypedAllocator< T >::allocate | ( | std::size_t | size | ) |
| void umpire::TypedAllocator< T >::deallocate | ( | T * | ptr, |
| std::size_t | size | ||
| ) |
Deallocate ptr, the passed size is ignored.
| ptr | Pointer to deallocate |
| size | Size of allocation (ignored). |
|
friend |
|
friend |