11 #include <cuda/memory_resource>
15 #include <rapidsmpf/detail/rmm_resource_adaptor_impl.hpp>
16 #include <rapidsmpf/memory/back_ref_mixin.hpp>
17 #include <rapidsmpf/memory/scoped_memory_record.hpp>
36 :
public cuda::mr::shared_resource<detail::RmmResourceAdaptorImpl<
37 cuda::mr::any_resource<cuda::mr::device_accessible>>>,
39 using any_device_resource = cuda::mr::any_resource<cuda::mr::device_accessible>;
41 cuda::mr::shared_resource<detail::RmmResourceAdaptorImpl<any_device_resource>>;
63 return get() == other.get();
137 cuda::mr::any_resource<cuda::mr::device_accessible> primary_mr
141 static_assert(cuda::mr::resource_with<
RmmResourceAdaptor, cuda::mr::device_accessible>);
Mixin that lets copies of the this object keep an external object reference of type BackRef alive.
Class managing buffer resources.
A RMM memory resource adaptor tailored to RapidsMPF.
void begin_scoped_memory_record()
Begin recording a new scoped memory usage record for the current thread.
bool operator==(RmmResourceAdaptor const &other) const noexcept
Equality comparison.
ScopedMemoryRecord get_main_record() const
Returns a copy of the main memory record.
std::int64_t current_allocated() const noexcept
Get the total current allocated memory through this resource.
rmm::device_async_resource_ref get_upstream_resource() const noexcept
Get a reference to the primary upstream resource.
ScopedMemoryRecord end_scoped_memory_record()
End the current scoped memory record and return it.
friend void get_property(RmmResourceAdaptor const &, cuda::mr::device_accessible) noexcept
Tag this resource as device-accessible for the CCCL concept.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
RAPIDS Multi-Processor interfaces.
Memory statistics for a specific scope.