Expression Templates Library (ETL)
Static Public Member Functions | List of all members
etl::aligned_allocator< A > Struct Template Reference

Allocated for aligned memory. More...

#include <allocator.hpp>

Static Public Member Functions

template<typename T , size_t S = sizeof(T)>
static T * allocate (size_t size, mangling_faker< S >=mangling_faker< S >())
 Allocate a block of memory of size elements. More...
 
template<typename T , size_t S = sizeof(T)>
static void release (T *ptr, mangling_faker< S >=mangling_faker< S >())
 Release the memory. More...
 

Detailed Description

template<size_t A>
struct etl::aligned_allocator< A >

Allocated for aligned memory.

Template Parameters
AThe alignment

Member Function Documentation

◆ allocate()

template<size_t A>
template<typename T , size_t S = sizeof(T)>
static T* etl::aligned_allocator< A >::allocate ( size_t  size,
mangling_faker< S >  = mangling_faker<S>() 
)
inlinestatic

Allocate a block of memory of size elements.

Parameters
sizeThe number of elements
Returns
A pointer to the allocated memory

◆ release()

template<size_t A>
template<typename T , size_t S = sizeof(T)>
static void etl::aligned_allocator< A >::release ( T *  ptr,
mangling_faker< S >  = mangling_faker<S>() 
)
inlinestatic

Release the memory.

Parameters
ptrThe pointer to the memory to be released

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