thrust::allocate_unique

Defined in thrust/allocate_unique.h

template<typename T, typename Allocator, typename ...Args>
std::unique_ptr<T, allocator_delete<T, typename detail::allocator_traits<::cuda::std::remove_cvref_t<Allocator>>::template rebind_traits<T>::allocator_type>> thrust::allocate_unique(Allocator const &alloc, Args&&... args)

Creates a std::unique_ptr holding a new object of type T, constructed with args, using alloc as the allocator.