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;
__host__ __device__ device_allocator();
__host__ __device__ device_allocator(const device_allocator & other);
template <typename U> __host__ __device__ device_allocator(const device_allocator< U > & other);
device_allocator & operator=(const device_allocator &) = default;
__host__ __device__ ~device_allocator();
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ __thrust_exec_check_disable__ __host__ __device__ stateless_resource_allocator();
/* Inherited from thrust::mr::stateless_resource_allocator< T, device_ptr_memory_resource< device_memory_resource > >
*/ __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> __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 > >
*/ __host__ __device__ ~stateless_resource_allocator();
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ __thrust_exec_check_disable__ __host__ __device__ size_type max_size() const;
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ __host__ __device__ allocator(MR * resource);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ template <typename U> __host__ __device__ allocator(const allocator< U, MR > & other);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ __host__ pointer allocate(size_type n);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ __host__ void deallocate(pointer p, size_type n);
/* Inherited from thrust::mr::allocator< T, Upstream >
*/ __host__ __device__ MR * resource() const; };
Member Classes
Struct thrust::device_allocator::rebind
Member Functions
Function thrust::device_allocator::device_allocator
__host__ __device__ device_allocator();
Default constructor has no effect.
Function thrust::device_allocator::device_allocator
__host__ __device__ device_allocator(const device_allocator & other);
Copy constructor has no effect.
Function thrust::device_allocator::device_allocator
template <typename U> __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
__host__ __device__ ~device_allocator();
Destructor has no effect.