libsimdpp  1.0
simdpp::aligned_allocator< T, A > Class Template Reference

An allocator that allocates memory with stricter alignment requirements than the defaults. More...

Classes

struct  rebind
 

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 aligned_allocator ()=default
 
 aligned_allocator (const aligned_allocator &)=default
 
template<class U >
 aligned_allocator (const aligned_allocator< U, A > &)
 
 ~aligned_allocator ()=default
 
aligned_allocatoroperator= (const aligned_allocator &)=delete
 
T * address (T &x) const
 
std::size_t max_size () const
 
bool operator!= (const aligned_allocator &other) const
 
bool operator== (const aligned_allocator &other) const
 
void construct (T *p, const T &t) const
 
void destroy (T *p) const
 
T * allocate (std::size_t n) const
 
void deallocate (T *p, std::size_t n) const
 
template<class U >
T * allocate (std::size_t n, const U *hint) const
 

Detailed Description

template<class T, std::size_t A>
class simdpp::aligned_allocator< T, A >

An allocator that allocates memory with stricter alignment requirements than the defaults.

A must be a power of two.

Member Typedef Documentation

template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::const_pointer = const T*
template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::const_reference = const T&
template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::difference_type = std::ptrdiff_t
template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::pointer = T*
template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::reference = T&
template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::size_type = std::size_t
template<class T , std::size_t A>
using simdpp::aligned_allocator< T, A >::value_type = T

Constructor & Destructor Documentation

template<class T , std::size_t A>
simdpp::aligned_allocator< T, A >::aligned_allocator ( )
default
template<class T , std::size_t A>
simdpp::aligned_allocator< T, A >::aligned_allocator ( const aligned_allocator< T, A > &  )
default
template<class T , std::size_t A>
template<class U >
simdpp::aligned_allocator< T, A >::aligned_allocator ( const aligned_allocator< U, A > &  )
inline
template<class T , std::size_t A>
simdpp::aligned_allocator< T, A >::~aligned_allocator ( )
default

Member Function Documentation

template<class T , std::size_t A>
T* simdpp::aligned_allocator< T, A >::address ( T &  x) const
inline
template<class T , std::size_t A>
T* simdpp::aligned_allocator< T, A >::allocate ( std::size_t  n) const
inline
template<class T , std::size_t A>
template<class U >
T* simdpp::aligned_allocator< T, A >::allocate ( std::size_t  n,
const U *  hint 
) const
inline
template<class T , std::size_t A>
void simdpp::aligned_allocator< T, A >::construct ( T *  p,
const T &  t 
) const
inline
template<class T , std::size_t A>
void simdpp::aligned_allocator< T, A >::deallocate ( T *  p,
std::size_t  n 
) const
inline
template<class T , std::size_t A>
void simdpp::aligned_allocator< T, A >::destroy ( T *  p) const
inline
template<class T , std::size_t A>
std::size_t simdpp::aligned_allocator< T, A >::max_size ( ) const
inline
template<class T , std::size_t A>
bool simdpp::aligned_allocator< T, A >::operator!= ( const aligned_allocator< T, A > &  other) const
inline
template<class T , std::size_t A>
aligned_allocator& simdpp::aligned_allocator< T, A >::operator= ( const aligned_allocator< T, A > &  )
delete
template<class T , std::size_t A>
bool simdpp::aligned_allocator< T, A >::operator== ( const aligned_allocator< T, A > &  other) const
inline

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