28 #ifndef VC_COMMON_ALIGNEDBASE_H_
29 #define VC_COMMON_ALIGNEDBASE_H_
34 namespace Vc_VERSIONED_NAMESPACE
41 template <
typename T> constexpr T
max(T a) {
return a; }
45 template <
typename T,
typename... Ts> constexpr T
max(T a, T b, Ts... rest)
47 return a > b ?
max(a, rest...) : max(b, rest...);
52 template <std::
size_t> Vc_INTRINSIC
void *aligned_malloc(std::size_t);
53 Vc_ALWAYS_INLINE
void free(
void *);
67 template <std::
size_t Alignment>
struct alignas(Alignment)
AlignedBase
69 Vc_FREE_STORE_OPERATORS_ALIGNED(Alignment);
135 #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.