cuda::experimental::managed_memory_pool_ref#
-
class managed_memory_pool_ref : public cuda::experimental::__memory_resource_base#
Stream ordered memory resource#
managed_memory_pool_refallocates managed memory using cudaMallocFromPoolAsync / cudaFreeAsync for allocation/deallocation. Amanaged_memory_pool_refis a thin wrapper around a c cudaMemPool_t with the allocation type set to c cudaMemAllocationTypeManaged.Warning
managed_memory_pool_refdoes not own the pool and it is the responsibility of the user to ensure that the lifetime of the pool exceeds the lifetime of themanaged_memory_pool_ref.Subclassed by cuda::experimental::managed_memory_pool
Public Types
-
using default_queries = ::cuda::mr::properties_list<::cuda::mr::device_accessible, ::cuda::mr::host_accessible>#
Public Functions
- inline explicit managed_memory_pool_ref(
- ::cudaMemPool_t __pool,
Constructs the managed_memory_pool_ref from a
cudaMemPool_t.- Parameters:
__pool – The
cudaMemPool_tused to allocate memory.
Friends
- inline friend constexpr void get_property(
- managed_memory_pool_ref const&,
- ::cuda::mr::device_accessible,
Enables the
device_accessibleproperty.
- inline friend constexpr void get_property(
- managed_memory_pool_ref const&,
- ::cuda::mr::host_accessible,
Enables the
host_accessibleproperty.
-
using default_queries = ::cuda::mr::properties_list<::cuda::mr::device_accessible, ::cuda::mr::host_accessible>#