//===----------------------------------------------------------------------===// // // Part of libcu++, the C++ Standard Library for your entire system, // under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. // //===----------------------------------------------------------------------===// #ifndef _CUDA__MEMORY_RESOURCE_RESOURCE_H #define _CUDA__MEMORY_RESOURCE_RESOURCE_H #include #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) # pragma GCC system_header #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) # pragma clang system_header #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header #if !defined(_CCCL_COMPILER_MSVC_2017) && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) # include # include # include # include # include # include # if _CCCL_STD_VER >= 2014 _LIBCUDACXX_BEGIN_NAMESPACE_CUDA_MR /// \concept resource /// \brief The \c resource concept template _LIBCUDACXX_CONCEPT_FRAGMENT( __resource_, requires(_Resource& __res, void* __ptr, size_t __bytes, size_t __alignment)( requires(_CUDA_VSTD::same_as), requires(_CUDA_VSTD::same_as), requires(_CUDA_VSTD::equality_comparable<_Resource>))); template _LIBCUDACXX_CONCEPT resource = _LIBCUDACXX_FRAGMENT(__resource_, _Resource); /// \concept async_resource /// \brief The \c async_resource concept template _LIBCUDACXX_CONCEPT_FRAGMENT( __async_resource_, requires(_Resource& __res, void* __ptr, size_t __bytes, size_t __alignment, ::cuda::stream_ref __stream)( requires(resource<_Resource>), requires(_CUDA_VSTD::same_as), requires(_CUDA_VSTD::same_as))); template _LIBCUDACXX_CONCEPT async_resource = _LIBCUDACXX_FRAGMENT(__async_resource_, _Resource); /// \concept resource_with /// \brief The \c resource_with concept template _LIBCUDACXX_CONCEPT resource_with = resource<_Resource> && _CUDA_VSTD::__all_of...>; /// \concept async_resource_with /// \brief The \c async_resource_with concept template _LIBCUDACXX_CONCEPT async_resource_with = async_resource<_Resource> && _CUDA_VSTD::__all_of...>; template _LIBCUDACXX_CONCEPT __different_resource = (!_CUDA_VSTD::same_as<_CUDA_VSTD::decay_t<_Resource>, _CUDA_VSTD::decay_t<_OtherResource>>) &&resource<_OtherResource>; _LIBCUDACXX_END_NAMESPACE_CUDA_MR # endif // _CCCL_STD_VER >= 2014 #endif // !_CCCL_COMPILER_MSVC_2017 && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //_CUDA__MEMORY_RESOURCE_RESOURCE_H