cuda::experimental::device_memory_pool_ref#

class device_memory_pool_ref : public cuda::experimental::__memory_resource_base#

Stream ordered memory pool#

device_memory_pool_ref allocates device memory using cudaMallocFromPoolAsync / cudaFreeAsync for allocation/deallocation. A device_memory_pool_ref is a thin wrapper around a c cudaMemPool_t with the location type set to c cudaMemLocationTypeDevice.

Warning

device_memory_pool_ref does not own the pool and it is the responsibility of the user to ensure that the lifetime of the pool exceeds the lifetime of the device_memory_pool_ref.

Subclassed by cuda::experimental::device_memory_pool

Public Types

using default_queries = ::cuda::mr::properties_list<::cuda::mr::device_accessible>#

Public Functions

inline explicit device_memory_pool_ref(
::cudaMemPool_t __pool,
) noexcept#

Constructs the device_memory_pool_ref from a cudaMemPool_t.

Parameters:

__pool – The cudaMemPool_t used to allocate memory.

device_memory_pool_ref(int) = delete#
device_memory_pool_ref(::cuda::std::nullptr_t) = delete#
inline friend constexpr void get_property(
device_memory_pool_ref const&,
::cuda::mr::device_accessible,
) noexcept#

Enables the device_accessible property for device_memory_pool_ref.