29 #ifndef VC_COMMON_ALIGNEDBASE_H_
30 #define VC_COMMON_ALIGNEDBASE_H_
35 namespace Vc_VERSIONED_NAMESPACE
42 template <
typename T> constexpr T
max(T a) {
return a; }
46 template <
typename T,
typename... Ts> constexpr T
max(T a, T b, Ts... rest)
48 return a > b ?
max(a, rest...) : max(b, rest...);
53 template <std::
size_t> Vc_INTRINSIC
void *aligned_malloc(std::size_t);
54 Vc_ALWAYS_INLINE
void free(
void *);
68 template <std::
size_t Alignment>
struct alignas(Alignment)
AlignedBase
70 Vc_FREE_STORE_OPERATORS_ALIGNED(Alignment)
136 #endif // VC_COMMON_ALIGNEDBASE_H_
void free(T *p)
Frees memory that was allocated with Vc::malloc.
The main vector class for expressing data parallelism.
Vc::Vector< T > max(const Vc::Vector< T > &x, const Vc::Vector< T > &y)
Helper class to ensure a given alignment.