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
sam_headroom_memory_resource.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/aligned.hpp
>
8
#include <rmm/detail/export.hpp>
9
#include <rmm/mr/detail/sam_headroom_memory_resource_impl.hpp>
10
11
#include <cuda/memory_resource>
12
13
#include <cstddef>
14
15
RMM_NAMESPACE_BEGIN
16
namespace
mr {
35
class
RMM_EXPORT
sam_headroom_memory_resource
final
36
:
public
cuda::mr::shared_resource<detail::sam_headroom_memory_resource_impl> {
37
using
shared_base = cuda::mr::shared_resource<detail::sam_headroom_memory_resource_impl>;
38
39
public
:
43
RMM_CONSTEXPR_FRIEND
void
get_property
(
sam_headroom_memory_resource
const
&,
44
cuda::mr::device_accessible)
noexcept
45
{
46
}
47
51
RMM_CONSTEXPR_FRIEND
void
get_property
(
sam_headroom_memory_resource
const
&,
52
cuda::mr::host_accessible)
noexcept
53
{
54
}
55
61
explicit
sam_headroom_memory_resource
(std::size_t headroom);
62
63
sam_headroom_memory_resource
() =
delete
;
64
~sam_headroom_memory_resource
() =
default
;
65
sam_headroom_memory_resource
(
sam_headroom_memory_resource
const
&) =
66
default
;
67
sam_headroom_memory_resource
(
sam_headroom_memory_resource
&&) =
68
default
;
69
sam_headroom_memory_resource
&
operator=
(
sam_headroom_memory_resource
const
&) =
70
default
;
71
sam_headroom_memory_resource
&
operator=
(
sam_headroom_memory_resource
&&) =
72
default
;
73
};
74
75
// static property checks
76
static_assert
(cuda::mr::synchronous_resource<sam_headroom_memory_resource>);
77
static_assert
(cuda::mr::resource<sam_headroom_memory_resource>);
78
static_assert
(
79
cuda::mr::synchronous_resource_with<sam_headroom_memory_resource, cuda::mr::device_accessible>);
80
static_assert
(
81
cuda::mr::synchronous_resource_with<sam_headroom_memory_resource, cuda::mr::host_accessible>);
82
static_assert
(cuda::mr::resource_with<sam_headroom_memory_resource, cuda::mr::device_accessible>);
83
static_assert
(cuda::mr::resource_with<sam_headroom_memory_resource, cuda::mr::host_accessible>);
84
// end of group
86
}
// namespace mr
87
RMM_NAMESPACE_END
aligned.hpp
rmm::mr::sam_headroom_memory_resource::operator=
sam_headroom_memory_resource & operator=(sam_headroom_memory_resource &&)=default
Default move assignment operator.
rmm::mr::sam_headroom_memory_resource::sam_headroom_memory_resource
sam_headroom_memory_resource(sam_headroom_memory_resource const &)=default
Default copy constructor.
rmm::mr::sam_headroom_memory_resource::get_property
friend void get_property(sam_headroom_memory_resource const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition
sam_headroom_memory_resource.hpp:43
rmm::mr::sam_headroom_memory_resource::sam_headroom_memory_resource
sam_headroom_memory_resource(std::size_t headroom)
Construct a headroom memory resource.
rmm::mr::sam_headroom_memory_resource::sam_headroom_memory_resource
sam_headroom_memory_resource(sam_headroom_memory_resource &&)=default
Default move constructor.
rmm::mr::sam_headroom_memory_resource::get_property
friend void get_property(sam_headroom_memory_resource const &, cuda::mr::host_accessible) noexcept
Enables the cuda::mr::host_accessible property.
Definition
sam_headroom_memory_resource.hpp:51
rmm::mr::sam_headroom_memory_resource::operator=
sam_headroom_memory_resource & operator=(sam_headroom_memory_resource const &)=default
Default copy assignment operator.
Generated by
1.18.0