|
21 | 21 | # pragma system_header |
22 | 22 | #endif // no system header |
23 | 23 |
|
| 24 | +#include <cuda/std/version> |
| 25 | + |
24 | 26 | _CCCL_PUSH_MACROS |
25 | 27 |
|
26 | | -#include <cuda/std/detail/libcxx/include/cstdint> |
| 28 | +#if !_CCCL_COMPILER(NVRTC) |
| 29 | +# include <cstdint> |
| 30 | +#else // ^^^ !_CCCL_COMPILER(NVRTC) ^^^ / vvv _CCCL_COMPILER(NVRTC) vvv |
| 31 | +# include <cuda/std/climits> |
| 32 | + |
| 33 | +using int8_t = signed char; |
| 34 | +using int16_t = signed short; |
| 35 | +using int32_t = signed int; |
| 36 | +using int64_t = signed long long; |
| 37 | +using uint8_t = unsigned char; |
| 38 | +using uint16_t = unsigned short; |
| 39 | +using uint32_t = unsigned int; |
| 40 | +using uint64_t = unsigned long long; |
| 41 | + |
| 42 | +using int_fast8_t = int8_t; |
| 43 | +using int_fast16_t = int16_t; |
| 44 | +using int_fast32_t = int32_t; |
| 45 | +using int_fast64_t = int64_t; |
| 46 | +using uint_fast8_t = uint8_t; |
| 47 | +using uint_fast16_t = uint16_t; |
| 48 | +using uint_fast32_t = uint32_t; |
| 49 | +using uint_fast64_t = uint64_t; |
| 50 | + |
| 51 | +using int_least8_t = int8_t; |
| 52 | +using int_least16_t = int16_t; |
| 53 | +using int_least32_t = int32_t; |
| 54 | +using int_least64_t = int64_t; |
| 55 | +using uint_least8_t = uint8_t; |
| 56 | +using uint_least16_t = uint16_t; |
| 57 | +using uint_least32_t = uint32_t; |
| 58 | +using uint_least64_t = uint64_t; |
| 59 | + |
| 60 | +using intptr_t = int64_t; |
| 61 | +using uintptr_t = uint64_t; |
| 62 | + |
| 63 | +using intmax_t = int64_t; |
| 64 | +using uintmax_t = uint64_t; |
| 65 | + |
| 66 | +# define INT8_MIN SCHAR_MIN |
| 67 | +# define INT16_MIN SHRT_MIN |
| 68 | +# define INT32_MIN INT_MIN |
| 69 | +# define INT64_MIN LLONG_MIN |
| 70 | +# define INT8_MAX SCHAR_MAX |
| 71 | +# define INT16_MAX SHRT_MAX |
| 72 | +# define INT32_MAX INT_MAX |
| 73 | +# define INT64_MAX LLONG_MAX |
| 74 | +# define UINT8_MAX UCHAR_MAX |
| 75 | +# define UINT16_MAX USHRT_MAX |
| 76 | +# define UINT32_MAX UINT_MAX |
| 77 | +# define UINT64_MAX ULLONG_MAX |
| 78 | + |
| 79 | +# define INT_FAST8_MIN INT8_MIN |
| 80 | +# define INT_FAST16_MIN INT16_MIN |
| 81 | +# define INT_FAST32_MIN INT32_MIN |
| 82 | +# define INT_FAST64_MIN INT64_MIN |
| 83 | +# define INT_FAST8_MAX INT8_MAX |
| 84 | +# define INT_FAST16_MAX INT16_MAX |
| 85 | +# define INT_FAST32_MAX INT32_MAX |
| 86 | +# define INT_FAST64_MAX INT64_MAX |
| 87 | +# define UINT_FAST8_MAX UINT8_MAX |
| 88 | +# define UINT_FAST16_MAX UINT16_MAX |
| 89 | +# define UINT_FAST32_MAX UINT32_MAX |
| 90 | +# define UINT_FAST64_MAX UINT64_MAX |
| 91 | + |
| 92 | +# define INT_LEAST8_MIN INT8_MIN |
| 93 | +# define INT_LEAST16_MIN INT16_MIN |
| 94 | +# define INT_LEAST32_MIN INT32_MIN |
| 95 | +# define INT_LEAST64_MIN INT64_MIN |
| 96 | +# define INT_LEAST8_MAX INT8_MAX |
| 97 | +# define INT_LEAST16_MAX INT16_MAX |
| 98 | +# define INT_LEAST32_MAX INT32_MAX |
| 99 | +# define INT_LEAST64_MAX INT64_MAX |
| 100 | +# define UINT_LEAST8_MAX UINT8_MAX |
| 101 | +# define UINT_LEAST16_MAX UINT16_MAX |
| 102 | +# define UINT_LEAST32_MAX UINT32_MAX |
| 103 | +# define UINT_LEAST64_MAX UINT64_MAX |
| 104 | + |
| 105 | +# define INTPTR_MIN INT64_MIN |
| 106 | +# define INTPTR_MAX INT64_MAX |
| 107 | +# define UINTPTR_MAX UINT64_MAX |
| 108 | + |
| 109 | +# define INTMAX_MIN INT64_MIN |
| 110 | +# define INTMAX_MAX INT64_MAX |
| 111 | +# define UINTMAX_MAX UINT64_MAX |
| 112 | + |
| 113 | +# define PTRDIFF_MIN INT64_MIN |
| 114 | +# define PTRDIFF_MAX INT64_MAX |
| 115 | + |
| 116 | +# define SIZE_MAX UINT64_MAX |
| 117 | + |
| 118 | +# define INT8_C(X) ((::int_least8_t)(X)) |
| 119 | +# define INT16_C(X) ((::int_least16_t)(X)) |
| 120 | +# define INT32_C(X) ((::int_least32_t)(X)) |
| 121 | +# define INT64_C(X) ((::int_least64_t)(X)) |
| 122 | +# define UINT8_C(X) ((::uint_least8_t)(X)) |
| 123 | +# define UINT16_C(X) ((::uint_least16_t)(X)) |
| 124 | +# define UINT32_C(X) ((::uint_least32_t)(X)) |
| 125 | +# define UINT64_C(X) ((::uint_least64_t)(X)) |
| 126 | + |
| 127 | +# define INTMAX_C(X) ((::intmax_t)(X)) |
| 128 | +# define UINTMAX_C(X) ((::uintmax_t)(X)) |
| 129 | +#endif // ^^^ _CCCL_COMPILER(NVRTC) |
| 130 | + |
| 131 | +_LIBCUDACXX_BEGIN_NAMESPACE_STD |
| 132 | + |
| 133 | +using ::int16_t; |
| 134 | +using ::int32_t; |
| 135 | +using ::int64_t; |
| 136 | +using ::int8_t; |
| 137 | +using ::uint16_t; |
| 138 | +using ::uint32_t; |
| 139 | +using ::uint64_t; |
| 140 | +using ::uint8_t; |
| 141 | + |
| 142 | +using ::int_fast16_t; |
| 143 | +using ::int_fast32_t; |
| 144 | +using ::int_fast64_t; |
| 145 | +using ::int_fast8_t; |
| 146 | +using ::uint_fast16_t; |
| 147 | +using ::uint_fast32_t; |
| 148 | +using ::uint_fast64_t; |
| 149 | +using ::uint_fast8_t; |
| 150 | + |
| 151 | +using ::int_least16_t; |
| 152 | +using ::int_least32_t; |
| 153 | +using ::int_least64_t; |
| 154 | +using ::int_least8_t; |
| 155 | +using ::uint_least16_t; |
| 156 | +using ::uint_least32_t; |
| 157 | +using ::uint_least64_t; |
| 158 | +using ::uint_least8_t; |
| 159 | + |
| 160 | +using ::intptr_t; |
| 161 | +using ::uintptr_t; |
| 162 | + |
| 163 | +using ::intmax_t; |
| 164 | +using ::uintmax_t; |
| 165 | + |
| 166 | +_LIBCUDACXX_END_NAMESPACE_STD |
27 | 167 |
|
28 | 168 | _CCCL_POP_MACROS |
29 | 169 |
|
|
0 commit comments