7 #include <rmm/detail/export.hpp>
8 #include <rmm/mr/detail/pool_memory_resource_impl.hpp>
11 #include <cuda/memory_resource>
16 namespace RMM_NAMESPACE {
35 :
public cuda::mr::shared_resource<detail::pool_memory_resource_impl> {
36 using shared_base = cuda::mr::shared_resource<detail::pool_memory_resource_impl>;
45 cuda::mr::device_accessible) noexcept
63 std::size_t initial_pool_size,
64 std::optional<std::size_t> maximum_pool_size = std::nullopt);
78 [[nodiscard]] std::
size_t pool_size() const noexcept;
A coalescing best-fit suballocator which uses a pool of memory allocated from an upstream memory_reso...
Definition: pool_memory_resource.hpp:35
pool_memory_resource(cuda::mr::any_resource< cuda::mr::device_accessible > upstream, std::size_t initial_pool_size, std::optional< std::size_t > maximum_pool_size=std::nullopt)
Construct a pool_memory_resource and allocate the initial device memory pool using upstream.
device_async_resource_ref get_upstream_resource() const noexcept
rmm::device_async_resource_ref to the upstream resource
friend void get_property(pool_memory_resource const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition: pool_memory_resource.hpp:44
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
Alias for a cuda::mr::resource_ref with the property cuda::mr::device_accessible.
Definition: resource_ref.hpp:30