Vector Optimized Library of Kernels
2.2
Architecture-tuned implementations of math kernels
|
|
Go to the documentation of this file.
23 #ifndef INCLUDED_VOLK_ALLOC_H
24 #define INCLUDED_VOLK_ALLOC_H
31 #include <volk/volk.h>
50 if (n > std::numeric_limits<std::size_t>::max() /
sizeof(T))
throw std::bad_alloc();
55 throw std::bad_alloc();
62 template <
class T,
class U>
65 template <
class T,
class U>
77 using vector = std::vector<T, alloc<T> >;
80 #endif // INCLUDED_VOLK_ALLOC_H
constexpr alloc(alloc< U > const &) noexcept
Definition: volk_alloc.hh:47
C++11 allocator using volk_malloc and volk_free.
Definition: volk_alloc.hh:42
VOLK_API void volk_free(void *aptr)
Free's memory allocated by volk_malloc.
Definition: volk_malloc.c:78
size_t volk_get_alignment(void)
Get the machine alignment in bytes.
Definition: volk.tmpl.c:102
T value_type
Definition: volk_alloc.hh:43
bool operator==(alloc< T > const &, alloc< U > const &)
Definition: volk_alloc.hh:63
__VOLK_DECL_BEGIN VOLK_API void * volk_malloc(size_t size, size_t alignment)
Allocate size bytes of data aligned to alignment.
Definition: volk_malloc.c:50
void deallocate(T *p, std::size_t) noexcept
Definition: volk_alloc.hh:58
std::vector< T, alloc< T > > vector
type alias for std::vector using volk::alloc
Definition: volk_alloc.hh:77
T * allocate(std::size_t n)
Definition: volk_alloc.hh:49
Definition: volk_alloc.hh:33
bool operator!=(alloc< T > const &, alloc< U > const &)
Definition: volk_alloc.hh:66