7 #include <rmm/detail/export.hpp>
8 #include <rmm/mr/detail/logging_resource_adaptor_impl.hpp>
11 #include <cuda/memory_resource>
13 #include <initializer_list>
17 namespace RMM_NAMESPACE {
38 :
public cuda::mr::shared_resource<detail::logging_resource_adaptor_impl> {
39 using shared_base = cuda::mr::shared_resource<detail::logging_resource_adaptor_impl>;
48 cuda::mr::device_accessible) noexcept
73 std::string
const& filename = get_default_filename(),
74 bool auto_flush =
false);
90 bool auto_flush =
false);
105 std::initializer_list<rapids_logger::sink_ptr> sinks,
106 bool auto_flush =
false);
123 [[nodiscard]] std::
string header() const;
132 static std::
string get_default_filename();
Resource that uses an upstream resource to allocate memory and logs information about the requested a...
Definition: logging_resource_adaptor.hpp:38
rmm::device_async_resource_ref get_upstream_resource() const noexcept
rmm::device_async_resource_ref to the upstream resource
logging_resource_adaptor(cuda::mr::any_resource< cuda::mr::device_accessible > upstream, std::ostream &stream, bool auto_flush=false)
Construct a new logging resource adaptor using upstream to satisfy allocation requests and logging in...
logging_resource_adaptor(cuda::mr::any_resource< cuda::mr::device_accessible > upstream, std::string const &filename=get_default_filename(), bool auto_flush=false)
Construct a new logging resource adaptor using upstream to satisfy allocation requests and logging in...
logging_resource_adaptor(cuda::mr::any_resource< cuda::mr::device_accessible > upstream, std::initializer_list< rapids_logger::sink_ptr > sinks, bool auto_flush=false)
Construct a new logging resource adaptor using upstream to satisfy allocation requests and logging in...
friend void get_property(logging_resource_adaptor const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition: logging_resource_adaptor.hpp:47
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