diff --git a/sycl/include/sycl/detail/aligned_allocator.hpp b/sycl/include/sycl/detail/aligned_allocator.hpp index 56da61b70132..446c4b10989b 100644 --- a/sycl/include/sycl/detail/aligned_allocator.hpp +++ b/sycl/include/sycl/detail/aligned_allocator.hpp @@ -80,63 +80,3 @@ template class aligned_allocator { } // namespace detail } // namespace _V1 } // namespace sycl - -namespace std { -template -struct allocator_traits> { - using allocator_type = typename sycl::detail::aligned_allocator; - using value_type = typename allocator_type::value_type; - using pointer = typename allocator_type::pointer; - using const_pointer = typename allocator_type::const_pointer; - using void_pointer = - typename std::pointer_traits::template rebind; - using const_void_pointer = - typename std::pointer_traits::template rebind; - using difference_type = - typename std::pointer_traits::difference_type; - using size_type = std::make_unsigned_t; - using propagate_on_container_copy_assignment = std::false_type; - using propagate_on_container_move_assignment = std::false_type; - using propagate_on_container_swap = std::false_type; - using is_always_equal = typename std::is_empty::type; - - template - using rebind_alloc = - typename sycl::detail::aligned_allocator::template rebind::other; - template using rebind_traits = allocator_traits>; - - static pointer allocate(allocator_type &Allocator, size_type NumElems) { - return Allocator.allocate(NumElems); - } - - static pointer allocate(allocator_type &Allocator, size_type NumElems, - const_void_pointer) { - // TODO: Utilize the locality hint argument. - return Allocator.allocate(NumElems); - } - - static void deallocate(allocator_type &Allocator, pointer Ptr, - size_type NumElems) { - Allocator.deallocate(Ptr, NumElems); - } - - template - static void construct(allocator_type &Allocator, U *Ptr, ArgsT &&...Args) { - return Allocator.construct(Ptr, Args...); - } - - template static void destroy(allocator_type &Allocator, U *Ptr) { - Allocator.destroy(Ptr); - } - - static size_type max_size(const allocator_type &) noexcept { - // max is a macro on Windows... - return (std::numeric_limits::max)() / sizeof(value_type); - } - - static allocator_type - select_on_container_copy_construction(const allocator_type &Allocator) { - return Allocator; - } -}; -} // namespace std