Home
librmm
libucxx
ucxx
nightly (26.12)
nightly (26.12)
stable (26.10)
legacy (26.08)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
rmm
mr
prefetch_resource_adaptor.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
#pragma once
6
7
#include <rmm/detail/export.hpp>
8
#include <rmm/mr/detail/prefetch_resource_adaptor_impl.hpp>
9
#include <
rmm/resource_ref.hpp
>
10
11
#include <cuda/memory_resource>
12
13
#include <cstddef>
14
15
RMM_NAMESPACE_BEGIN
16
namespace
mr {
28
class
RMM_EXPORT
prefetch_resource_adaptor
29
:
public
cuda::mr::shared_resource<detail::prefetch_resource_adaptor_impl> {
30
using
shared_base = cuda::mr::shared_resource<detail::prefetch_resource_adaptor_impl>;
31
32
public
:
36
RMM_CONSTEXPR_FRIEND
void
get_property
(
prefetch_resource_adaptor
const
&,
37
cuda::mr::device_accessible)
noexcept
38
{
39
}
40
47
explicit
prefetch_resource_adaptor
(cuda::mr::any_resource<cuda::mr::device_accessible> upstream);
48
49
~prefetch_resource_adaptor
() =
default
;
50
54
[[nodiscard]]
device_async_resource_ref
get_upstream_resource
() const noexcept;
55
};
56
57
static_assert(cuda::
mr
::resource_with<
prefetch_resource_adaptor
, cuda::
mr
::device_accessible>,
58
"prefetch_resource_adaptor does not satisfy the cuda::mr::resource concept"
);
59
// end of group
61
}
// namespace mr
62
RMM_NAMESPACE_END
rmm::mr::prefetch_resource_adaptor::prefetch_resource_adaptor
prefetch_resource_adaptor(cuda::mr::any_resource< cuda::mr::device_accessible > upstream)
Construct a new prefetch resource adaptor using upstream to satisfy allocation requests.
rmm::mr::prefetch_resource_adaptor::get_property
friend void get_property(prefetch_resource_adaptor const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition
prefetch_resource_adaptor.hpp:36
rmm::mr::prefetch_resource_adaptor::get_upstream_resource
device_async_resource_ref get_upstream_resource() const noexcept
rmm::device_async_resource_ref to the upstream resource
rmm::device_async_resource_ref
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
rmm::mr
Memory Resource classes and adaptors.
resource_ref.hpp
Generated by
1.18.0