hipcub/libcxx.hpp Source File
hipcub/libcxx.hpp Source File
hipCUB: hipcub/libcxx.hpp Source File
23 #ifndef HIPCUB_LIBCXX_HPP_
24 #define HIPCUB_LIBCXX_HPP_
38 #define _HIPCUB_REQUIRED_LIBCXX_VERSION_MAJOR 3
39 #define _HIPCUB_REQUIRED_LIBCXX_VERSION_MINOR 0
40 #define _HIPCUB_REQUIRED_LIBCXX_VERSION_PATCH 0
42 #define _HIPCUB_REQUIRED_LIBCXX_VERSION \
43 _HIPCUB_REQUIRED_LIBCXX_VERSION_MAJOR * 1000000 + _HIPCUB_REQUIRED_LIBCXX_VERSION_MINOR * 1000 \
44 + _HIPCUB_REQUIRED_LIBCXX_VERSION_PATCH
47 #define HIPCUB_HAS_INCLUDE(_X) __has_include(_X)
49 #define HIPCUB_HAS_INCLUDE(_X) 0
52 #define _HIPCUB_STRINGIFY_IMPL(x) #x
53 #define _HIPCUB_STRINGIFY(x) _HIPCUB_STRINGIFY_IMPL(x)
58 #if HIPCUB_HAS_INCLUDE(<cuda/std/version>)
59 #include <cuda/std/version>
61 #if defined(_LIBCUDACXX_CUDA_API_VERSION) && (_LIBCUDACXX_CUDA_API_VERSION >= _HIPCUB_REQUIRED_LIBCXX_VERSION) && defined(_CUDA_VSTD)
62 #define _HIPCUB_LIBCXX_INCLUDE(LIB) _HIPCUB_STRINGIFY(cuda/LIB)
63 #define _HIPCUB_STD_INCLUDE(LIB) _HIPCUB_STRINGIFY(cuda/std/LIB)
64 #define _HIPCUB_LIBCXX ::cuda
65 #define _HIPCUB_STD _CUDA_VSTD
66 #define _HIPCUB_HAS_DEVICE_SYSTEM_STD 1
67 #define _HIPCUB_STD_NAMESPACE_BEGIN _LIBCUDACXX_BEGIN_NAMESPACE_STD
68 #define _HIPCUB_STD_NAMESPACE_END _LIBCUDACXX_END_NAMESPACE_STD
72 #if !defined(_HIPCUB_HAS_DEVICE_SYSTEM_STD) && HIPCUB_HAS_INCLUDE(<hip/std/version>)
73 #include <hip/std/version>
75 #if defined(_LIBCUDACXX_CUDA_API_VERSION) && (_LIBCUDACXX_CUDA_API_VERSION >= _HIPCUB_REQUIRED_LIBCXX_VERSION) && defined(_CUDA_VSTD)
76 #define _HIPCUB_LIBCXX_INCLUDE(LIB) _HIPCUB_STRINGIFY(hip/LIB)
77 #define _HIPCUB_STD_INCLUDE(LIB) _HIPCUB_STRINGIFY(hip/std/LIB)
79 #define _HIPCUB_LIBCXX ::hip
81 #define _HIPCUB_STD _CUDA_VSTD
82 #define _HIPCUB_HAS_DEVICE_SYSTEM_STD 1
83 #define _HIPCUB_STD_NAMESPACE_BEGIN _LIBCUDACXX_BEGIN_NAMESPACE_STD
84 #define _HIPCUB_STD_NAMESPACE_END _LIBCUDACXX_END_NAMESPACE_STD
89 #ifndef _HIPCUB_HAS_DEVICE_SYSTEM_STD
90 #define _HIPCUB_LIBCXX_INCLUDE(LIB) _HIPCUB_STRINGIFY(LIB)
91 #define _HIPCUB_STD_INCLUDE(LIB) _HIPCUB_STRINGIFY(LIB)
92 #define _HIPCUB_LIBCXX
93 #define _HIPCUB_STD ::std
94 #define _HIPCUB_HAS_DEVICE_SYSTEM_STD 0
95 #define _HIPCUB_STD_NAMESPACE_BEGIN \
98 #define _HIPCUB_STD_NAMESPACE_END }