7 #include <rmm/detail/cccl_adaptors.hpp>
8 #include <rmm/detail/error.hpp>
9 #include <rmm/detail/export.hpp>
12 namespace RMM_NAMESPACE {
25 detail::cccl_resource_ref<cuda::mr::synchronous_resource_ref<cuda::mr::device_accessible>>;
32 detail::cccl_async_resource_ref<cuda::mr::resource_ref<cuda::mr::device_accessible>>;
39 detail::cccl_resource_ref<cuda::mr::synchronous_resource_ref<cuda::mr::host_accessible>>;
46 detail::cccl_async_resource_ref<cuda::mr::resource_ref<cuda::mr::host_accessible>>;
53 cuda::mr::synchronous_resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>>;
60 cuda::mr::resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>>;
71 template <
class Resource>
74 RMM_EXPECTS(res,
"Unexpected null resource pointer.");
82 std::is_constructible_v<device_resource_ref, mr::device_memory_resource*>,
83 "device_resource_ref must be constructible from device_memory_resource* (via bridge)");
85 std::is_constructible_v<device_async_resource_ref, mr::device_memory_resource*>,
86 "device_async_resource_ref must be constructible from device_memory_resource* (via bridge)");
88 std::is_constructible_v<device_resource_ref, mr::device_memory_resource&>,
89 "device_resource_ref must be constructible from device_memory_resource& (via bridge)");
91 std::is_constructible_v<device_async_resource_ref, mr::device_memory_resource&>,
92 "device_async_resource_ref must be constructible from device_memory_resource& (via bridge)");
97 cuda::mr::synchronous_resource_ref<cuda::mr::device_accessible>>,
98 "device_resource_ref must be constructible from CCCL "
99 "synchronous_resource_ref<device_accessible>");
102 cuda::mr::resource_ref<cuda::mr::device_accessible>>,
103 "device_async_resource_ref must be constructible from CCCL resource_ref<device_accessible>");
106 cuda::mr::synchronous_resource_ref<cuda::mr::host_accessible>>,
107 "host_resource_ref must be constructible from CCCL synchronous_resource_ref<host_accessible>");
110 cuda::mr::resource_ref<cuda::mr::host_accessible>>,
111 "host_async_resource_ref must be constructible from CCCL resource_ref<host_accessible>");
113 std::is_constructible_v<
115 cuda::mr::synchronous_resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>>,
116 "host_device_resource_ref must be constructible from CCCL "
117 "synchronous_resource_ref<host_accessible, device_accessible>");
119 std::is_constructible_v<
121 cuda::mr::resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>>,
122 "host_device_async_resource_ref must be constructible from CCCL resource_ref<host_accessible, "
123 "device_accessible>");
129 std::is_constructible_v<device_async_resource_ref, host_device_async_resource_ref>,
130 "device_async_resource_ref must be constructible from host_device_async_resource_ref");
131 static_assert(std::is_constructible_v<device_resource_ref, host_device_resource_ref>,
132 "device_resource_ref must be constructible from host_device_resource_ref");
133 static_assert(std::is_constructible_v<host_async_resource_ref, host_device_async_resource_ref>,
134 "host_async_resource_ref must be constructible from host_device_async_resource_ref");
135 static_assert(std::is_constructible_v<host_resource_ref, host_device_resource_ref>,
136 "host_resource_ref must be constructible from host_device_resource_ref");
detail::cccl_resource_ref< cuda::mr::synchronous_resource_ref< cuda::mr::device_accessible > > device_resource_ref
Alias for a cuda::mr::resource_ref with the property cuda::mr::device_accessible.
Definition: resource_ref.hpp:25
detail::cccl_resource_ref< cuda::mr::synchronous_resource_ref< cuda::mr::host_accessible, cuda::mr::device_accessible > > host_device_resource_ref
Alias for a cuda::mr::resource_ref with the properties cuda::mr::host_accessible and cuda::mr::device...
Definition: resource_ref.hpp:53
detail::cccl_async_resource_ref< cuda::mr::resource_ref< cuda::mr::host_accessible, cuda::mr::device_accessible > > host_device_async_resource_ref
Alias for a cuda::mr::async_resource_ref with the properties cuda::mr::host_accessible and cuda::mr::...
Definition: resource_ref.hpp:60
detail::cccl_resource_ref< cuda::mr::synchronous_resource_ref< cuda::mr::host_accessible > > host_resource_ref
Alias for a cuda::mr::resource_ref with the property cuda::mr::host_accessible.
Definition: resource_ref.hpp:39
device_async_resource_ref to_device_async_resource_ref_checked(Resource *res)
Convert pointer to memory resource into device_async_resource_ref, checking for nullptr
Definition: resource_ref.hpp:72
detail::cccl_async_resource_ref< cuda::mr::resource_ref< cuda::mr::host_accessible > > host_async_resource_ref
Alias for a cuda::mr::async_resource_ref with the property cuda::mr::host_accessible.
Definition: resource_ref.hpp:46
detail::cccl_async_resource_ref< cuda::mr::resource_ref< cuda::mr::device_accessible > > device_async_resource_ref
Alias for a cuda::mr::async_resource_ref with the property cuda::mr::device_accessible.
Definition: resource_ref.hpp:32