10 #ifndef INCLUDED_VOLK_ALLOC_H
11 #define INCLUDED_VOLK_ALLOC_H
18 #include <volk/volk.h>
41 if (n > std::numeric_limits<std::size_t>::max() /
sizeof(T))
42 throw std::bad_alloc();
44 if (
auto p =
static_cast<T*
>(
volk_malloc(n *
sizeof(T), volk_get_alignment())))
47 throw std::bad_alloc();
53 template <
class T,
class U>
59 template <
class T,
class U>
74 using vector = std::vector<T, alloc<T>>;