thrust::allocate_unique_n
Defined in thrust/allocate_unique.h
-
template<typename T, typename Allocator, typename Size, typename ...Args>
std::unique_ptr<T[], array_allocator_delete<T, typename detail::allocator_traits<typename std::remove_cv<typename std::remove_reference<Allocator>::type>::type>::template rebind_traits<T>::allocator_type>> thrust::allocate_unique_n(Allocator const &alloc, Size n, Args&&... args) Creates a
std::unique_ptr
holding an array of objects of typeT
, each one constructed withargs
, usingalloc
as the allocator.