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
cuda_async_managed_memory_resource.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 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/cuda_async_managed_memory_resource_impl.hpp>
10
11
#include <cuda/memory_resource>
12
#include <cuda_runtime_api.h>
13
14
#include <cstddef>
15
16
RMM_NAMESPACE_BEGIN
17
namespace
mr {
23
28
class
RMM_EXPORT
cuda_async_managed_memory_resource
final
29
:
public
cuda::mr::shared_resource<detail::cuda_async_managed_memory_resource_impl> {
30
using
shared_base = cuda::mr::shared_resource<detail::cuda_async_managed_memory_resource_impl>;
31
32
public
:
36
RMM_CONSTEXPR_FRIEND
void
get_property
(
cuda_async_managed_memory_resource
const
&,
37
cuda::mr::device_accessible)
noexcept
38
{
39
}
40
44
RMM_CONSTEXPR_FRIEND
void
get_property
(
cuda_async_managed_memory_resource
const
&,
45
cuda::mr::host_accessible)
noexcept
46
{
47
}
48
61
cuda_async_managed_memory_resource
();
62
68
[[nodiscard]] cudaMemPool_t
pool_handle
() const noexcept;
69
70
~
cuda_async_managed_memory_resource
() = default;
71
cuda_async_managed_memory_resource
(
cuda_async_managed_memory_resource
const&) =
72
default;
73
cuda_async_managed_memory_resource
(
cuda_async_managed_memory_resource
&&) =
74
default;
75
cuda_async_managed_memory_resource
& operator=(
cuda_async_managed_memory_resource
const&) =
76
default;
77
cuda_async_managed_memory_resource
& operator=(
cuda_async_managed_memory_resource
&&) =
78
default;
79
};
80
81
// static property checks
82
static_assert(cuda::
mr
::synchronous_resource<
cuda_async_managed_memory_resource
>);
83
static_assert(cuda::
mr
::resource<
cuda_async_managed_memory_resource
>);
84
static_assert(cuda::
mr
::synchronous_resource_with<
cuda_async_managed_memory_resource
,
85
cuda::
mr
::device_accessible>);
86
static_assert(cuda::
mr
::synchronous_resource_with<
cuda_async_managed_memory_resource
,
87
cuda::
mr
::host_accessible>);
88
static_assert(
89
cuda::
mr
::resource_with<
cuda_async_managed_memory_resource
, cuda::
mr
::device_accessible>);
90
static_assert(
91
cuda::
mr
::resource_with<
cuda_async_managed_memory_resource
, cuda::
mr
::host_accessible>);
92
// end of group
94
}
// namespace mr
95
RMM_NAMESPACE_END
aligned.hpp
rmm::mr::cuda_async_managed_memory_resource::cuda_async_managed_memory_resource
cuda_async_managed_memory_resource()
Constructs a cuda_async_managed_memory_resource with the default managed memory pool for the current ...
rmm::mr::cuda_async_managed_memory_resource::pool_handle
cudaMemPool_t pool_handle() const noexcept
Returns the underlying native handle to the CUDA pool.
rmm::mr::cuda_async_managed_memory_resource::get_property
friend void get_property(cuda_async_managed_memory_resource const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition
cuda_async_managed_memory_resource.hpp:36
rmm::mr::cuda_async_managed_memory_resource::get_property
friend void get_property(cuda_async_managed_memory_resource const &, cuda::mr::host_accessible) noexcept
Enables the cuda::mr::host_accessible property.
Definition
cuda_async_managed_memory_resource.hpp:44
rmm::mr
Memory Resource classes and adaptors.
Generated by
1.18.0