is_resource_adaptor.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <rmm/detail/export.hpp>
8 
9 #include <cuda/memory_resource>
10 #include <cuda/std/type_traits>
11 
12 namespace RMM_NAMESPACE {
13 namespace mr {
14 
27 template <class Resource, class = void>
28 [[deprecated("is_resource_adaptor is deprecated and will be removed in a future release.")]] //
29 inline constexpr bool is_resource_adaptor = false;
30 
31 template <class Resource>
32 [[deprecated("is_resource_adaptor is deprecated and will be removed in a future release.")]] //
33 inline constexpr bool is_resource_adaptor<
34  Resource,
35  cuda::std::void_t<decltype(cuda::std::declval<Resource>().get_upstream_resource())>> =
36  cuda::mr::synchronous_resource<Resource>;
37  // end of group
39 } // namespace mr
40 } // namespace RMM_NAMESPACE
constexpr bool is_resource_adaptor
Concept to check whether a resource is a resource adaptor by checking for get_upstream_resource.
Definition: is_resource_adaptor.hpp:29