7 #include <rmm/detail/error.hpp>
8 #include <rmm/detail/export.hpp>
10 #include <cuda/memory_resource>
12 namespace RMM_NAMESPACE {
49 cuda::mr::synchronous_resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>;
56 cuda::mr::resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>;
67 template <
class Resource>
70 RMM_EXPECTS(res,
"Unexpected null resource pointer.");
78 std::is_constructible_v<device_async_resource_ref, host_device_async_resource_ref>,
79 "device_async_resource_ref must be constructible from host_device_async_resource_ref");
80 static_assert(std::is_constructible_v<device_resource_ref, host_device_resource_ref>,
81 "device_resource_ref must be constructible from host_device_resource_ref");
82 static_assert(std::is_constructible_v<host_async_resource_ref, host_device_async_resource_ref>,
83 "host_async_resource_ref must be constructible from host_device_async_resource_ref");
84 static_assert(std::is_constructible_v<host_resource_ref, host_device_resource_ref>,
85 "host_resource_ref must be constructible from host_device_resource_ref");
cuda::mr::synchronous_resource_ref< cuda::mr::device_accessible > device_resource_ref
Alias for a cuda::mr::synchronous_resource_ref with the property cuda::mr::device_accessible.
Definition: resource_ref.hpp:24
cuda::mr::resource_ref< cuda::mr::host_accessible > host_async_resource_ref
Alias for a cuda::mr::resource_ref with the property cuda::mr::host_accessible.
Definition: resource_ref.hpp:42
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
cuda::mr::synchronous_resource_ref< cuda::mr::host_accessible > host_resource_ref
Alias for a cuda::mr::synchronous_resource_ref with the property cuda::mr::host_accessible.
Definition: resource_ref.hpp:36
cuda::mr::synchronous_resource_ref< cuda::mr::host_accessible, cuda::mr::device_accessible > host_device_resource_ref
Alias for a cuda::mr::synchronous_resource_ref with the properties cuda::mr::host_accessible and cuda...
Definition: resource_ref.hpp:49
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:68
cuda::mr::resource_ref< cuda::mr::host_accessible, cuda::mr::device_accessible > host_device_async_resource_ref
Alias for a cuda::mr::resource_ref with the properties cuda::mr::host_accessible and cuda::mr::device...
Definition: resource_ref.hpp:56