28 #ifndef VC_COMMON_MAKE_UNIQUE_H_
29 #define VC_COMMON_MAKE_UNIQUE_H_
35 namespace Vc_VERSIONED_NAMESPACE
40 template<
typename T>
struct Deleter
42 Vc_ALWAYS_INLINE
void operator()(T *ptr) {
49 inline std::unique_ptr<T, Deleter<T>> make_unique(Args&&... args)
51 return std::unique_ptr<T, Deleter<T>>(
new(Vc::malloc<T, A>(1)) T(
std::forward<Args>(args)...));
57 #endif // VC_COMMON_MAKE_UNIQUE_H_
void free(T *p)
Frees memory that was allocated with Vc::malloc.
MallocAlignment
Enum that specifies the alignment and padding restrictions to use for memory allocation with Vc::mall...
Align on boundary of vector sizes (e.g.