Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Allocators

template <typename Upstream> class thrust::device_ptr_memory_resource;
/* An allocator which creates new elements in memory accessible by devices. */template <typename T> class thrust::device_allocator;
template <typename T> class thrust::device_malloc_allocator;
template <typename T> class thrust::device_new_allocator;
template <typename T,   class MR> class thrust::mr::allocator;
template <typename T,   typename Upstream> class thrust::mr::stateless_resource_allocator;
template <typename T,   typename Pointer> using thrust::mr::polymorphic_allocator = see below;
template <typename T,   typename MR> __host__ __device__ bool thrust::mr::operator==(const allocator< T, MR > & lhs,   const allocator< T, MR > & rhs);
template <typename T,   typename MR> __host__ __device__ bool thrust::mr::operator!=(const allocator< T, MR > & lhs,   const allocator< T, MR > & rhs);

Member Classes

Class thrust::device_ptr_memory_resource

Inherits From: thrust::mr::memory_resource< device_ptr< void > >

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 >

Class thrust::device_malloc_allocator

Class thrust::device_new_allocator

Class thrust::mr::allocator

Inherits From: thrust::mr::validator< MR >

Class thrust::mr::stateless_resource_allocator

Inherits From:

  • thrust::mr::allocator< T, Upstream >
  • thrust::mr::validator< MR >

Types

Type Alias thrust::mr::polymorphic_allocator

template <typename T,   typename Pointer> using polymorphic_allocator = allocator< T, polymorphic_adaptor_resource< Pointer > >;

Functions

Function thrust::mr::operator==

template <typename T,   typename MR> __host__ __device__ bool operator==(const allocator< T, MR > & lhs,   const allocator< T, MR > & rhs); Compares the allocators for equality by comparing the underlying memory resources.

Function thrust::mr::operator!=

template <typename T,   typename MR> __host__ __device__ bool operator!=(const allocator< T, MR > & lhs,   const allocator< T, MR > & rhs); Compares the allocators for inequality by comparing the underlying memory resources.