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 polymorphic_allocator = see below;
template <typename T,   typename MR> _CCCL_HOST_DEVICE bool operator==(const allocator< T, MR > & lhs,   const allocator< T, MR > & rhs);
template <typename T,   typename MR> _CCCL_HOST_DEVICE bool 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 polymorphic_allocator

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

Functions

Function operator==

template <typename T,   typename MR> _CCCL_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 operator!=

template <typename T,   typename MR> _CCCL_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.