Class thrust::device_allocator
An allocator which creates new elements in memory accessible by devices.
Inherits From:
thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
thrust::mr::allocator< T, Upstream >
thrust::mr::validator< MR >
See: https://en.cppreference.com/w/cpp/named_req/Allocator
#include <thrust/device_allocator.h>
template <typename T> class thrust::device_allocator { public:
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below void_pointer;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below value_type;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below pointer;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below const_pointer;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below reference;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below const_reference;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below size_type;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below difference_type;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below propagate_on_container_copy_assignment;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below propagate_on_container_move_assignment;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ typedef see below propagate_on_container_swap;
template <typename U> struct rebind;
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ template <typename U> struct rebind;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ template <typename U> struct rebind;
_CCCL_HOST_DEVICE device_allocator();
_CCCL_HOST_DEVICE device_allocator(const device_allocator & other);
template <typename U> _CCCL_HOST_DEVICE device_allocator(const device_allocator< U > & other);
device_allocator & operator=(const device_allocator &) = default;
_CCCL_HOST_DEVICE ~device_allocator();
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE stateless_resource_allocator();
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ _CCCL_HOST_DEVICE stateless_resource_allocator(const stateless_resource_allocator & other);
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ template <typename U> _CCCL_HOST_DEVICE stateless_resource_allocator(const stateless_resource_allocator< U, Upstream > & other);
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ _CCCL_HOST_DEVICE ~stateless_resource_allocator();
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE size_type max_size() const;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ _CCCL_HOST_DEVICE allocator(MR * resource);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ template <typename U> _CCCL_HOST_DEVICE allocator(const allocator< U, MR > & other);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ _CCCL_NODISCARD _CCCL_HOST pointer allocate(size_type n);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ _CCCL_HOST void deallocate(pointer p, size_type n);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ _CCCL_HOST_DEVICE MR * resource() const; };
Member Classes
Struct thrust::device_allocator::rebind
Member Functions
Function thrust::device_allocator::device_allocator
_CCCL_HOST_DEVICE device_allocator();
Default constructor has no effect.
Function thrust::device_allocator::device_allocator
_CCCL_HOST_DEVICE device_allocator(const device_allocator & other);
Copy constructor has no effect.
Function thrust::device_allocator::device_allocator
template <typename U> _CCCL_HOST_DEVICE device_allocator(const device_allocator< U > & other);
Constructor from other device_allocator
has no effect.
Function thrust::device_allocator::operator=
device_allocator & operator=(const device_allocator &) = default;
Function thrust::device_allocator::~device_allocator
_CCCL_HOST_DEVICE ~device_allocator();
Destructor has no effect.