diff --git a/libcudacxx/include/cuda/std/__cuda/cstdint_prelude.h b/libcudacxx/include/cuda/std/__cuda/cstdint_prelude.h deleted file mode 100644 index 5111e9dd82a..00000000000 --- a/libcudacxx/include/cuda/std/__cuda/cstdint_prelude.h +++ /dev/null @@ -1,90 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, 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) 2023 NVIDIA CORPORATION & AFFILIATES. -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCUDACXX___CUDA_CSTDINT_PRELUDE_H -#define _LIBCUDACXX___CUDA_CSTDINT_PRELUDE_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 !_CCCL_COMPILER(NVRTC) -# include -#else // ^^^ !_CCCL_COMPILER(NVRTC) ^^^ / vvv _CCCL_COMPILER(NVRTC) vvv -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; - -# define _LIBCUDACXX_ADDITIONAL_INTS(N) \ - typedef int##N##_t int_fast##N##_t; \ - typedef uint##N##_t uint_fast##N##_t; \ - typedef int##N##_t int_least##N##_t; \ - typedef uint##N##_t uint_least##N##_t - -_LIBCUDACXX_ADDITIONAL_INTS(8); -_LIBCUDACXX_ADDITIONAL_INTS(16); -_LIBCUDACXX_ADDITIONAL_INTS(32); -_LIBCUDACXX_ADDITIONAL_INTS(64); -# undef _LIBCUDACXX_ADDITIONAL_INTS - -typedef int64_t intptr_t; -typedef uint64_t uintptr_t; -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - -# define INT8_MIN SCHAR_MIN -# define INT16_MIN SHRT_MIN -# define INT32_MIN INT_MIN -# define INT64_MIN LLONG_MIN -# define INT8_MAX SCHAR_MAX -# define INT16_MAX SHRT_MAX -# define INT32_MAX INT_MAX -# define INT64_MAX LLONG_MAX -# define UINT8_MAX UCHAR_MAX -# define UINT16_MAX USHRT_MAX -# define UINT32_MAX UINT_MAX -# define UINT64_MAX ULLONG_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST16_MIN SHRT_MIN -# define INT_FAST32_MIN INT_MIN -# define INT_FAST64_MIN LLONG_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define INT_FAST16_MAX SHRT_MAX -# define INT_FAST32_MAX INT_MAX -# define INT_FAST64_MAX LLONG_MAX -# define UINT_FAST8_MAX UCHAR_MAX -# define UINT_FAST16_MAX USHRT_MAX -# define UINT_FAST32_MAX UINT_MAX -# define UINT_FAST64_MAX ULLONG_MAX - -# define INT8_C(X) ((int_least8_t) (X)) -# define INT16_C(X) ((int_least16_t) (X)) -# define INT32_C(X) ((int_least32_t) (X)) -# define INT64_C(X) ((int_least64_t) (X)) -# define UINT8_C(X) ((uint_least8_t) (X)) -# define UINT16_C(X) ((uint_least16_t) (X)) -# define UINT32_C(X) ((uint_least32_t) (X)) -# define UINT64_C(X) ((uint_least64_t) (X)) -# define INTMAX_C(X) ((intmax_t) (X)) -# define UINTMAX_C(X) ((uintmax_t) (X)) -#endif // _CCCL_COMPILER(NVRTC) - -#endif // _LIBCUDACXX___CUDA_CSTDINT_PRELUDE_H diff --git a/libcudacxx/include/cuda/std/cstdint b/libcudacxx/include/cuda/std/cstdint index 3f923fdb02b..0ff7efc49f1 100644 --- a/libcudacxx/include/cuda/std/cstdint +++ b/libcudacxx/include/cuda/std/cstdint @@ -21,9 +21,149 @@ # pragma system_header #endif // no system header +#include + _CCCL_PUSH_MACROS -#include +#if !_CCCL_COMPILER(NVRTC) +# include +#else // ^^^ !_CCCL_COMPILER(NVRTC) ^^^ / vvv _CCCL_COMPILER(NVRTC) vvv +# include + +using int8_t = signed char; +using int16_t = signed short; +using int32_t = signed int; +using int64_t = signed long long; +using uint8_t = unsigned char; +using uint16_t = unsigned short; +using uint32_t = unsigned int; +using uint64_t = unsigned long long; + +using int_fast8_t = int8_t; +using int_fast16_t = int16_t; +using int_fast32_t = int32_t; +using int_fast64_t = int64_t; +using uint_fast8_t = uint8_t; +using uint_fast16_t = uint16_t; +using uint_fast32_t = uint32_t; +using uint_fast64_t = uint64_t; + +using int_least8_t = int8_t; +using int_least16_t = int16_t; +using int_least32_t = int32_t; +using int_least64_t = int64_t; +using uint_least8_t = uint8_t; +using uint_least16_t = uint16_t; +using uint_least32_t = uint32_t; +using uint_least64_t = uint64_t; + +using intptr_t = int64_t; +using uintptr_t = uint64_t; + +using intmax_t = int64_t; +using uintmax_t = uint64_t; + +# define INT8_MIN SCHAR_MIN +# define INT16_MIN SHRT_MIN +# define INT32_MIN INT_MIN +# define INT64_MIN LLONG_MIN +# define INT8_MAX SCHAR_MAX +# define INT16_MAX SHRT_MAX +# define INT32_MAX INT_MAX +# define INT64_MAX LLONG_MAX +# define UINT8_MAX UCHAR_MAX +# define UINT16_MAX USHRT_MAX +# define UINT32_MAX UINT_MAX +# define UINT64_MAX ULLONG_MAX + +# define INT_FAST8_MIN INT8_MIN +# define INT_FAST16_MIN INT16_MIN +# define INT_FAST32_MIN INT32_MIN +# define INT_FAST64_MIN INT64_MIN +# define INT_FAST8_MAX INT8_MAX +# define INT_FAST16_MAX INT16_MAX +# define INT_FAST32_MAX INT32_MAX +# define INT_FAST64_MAX INT64_MAX +# define UINT_FAST8_MAX UINT8_MAX +# define UINT_FAST16_MAX UINT16_MAX +# define UINT_FAST32_MAX UINT32_MAX +# define UINT_FAST64_MAX UINT64_MAX + +# define INT_LEAST8_MIN INT8_MIN +# define INT_LEAST16_MIN INT16_MIN +# define INT_LEAST32_MIN INT32_MIN +# define INT_LEAST64_MIN INT64_MIN +# define INT_LEAST8_MAX INT8_MAX +# define INT_LEAST16_MAX INT16_MAX +# define INT_LEAST32_MAX INT32_MAX +# define INT_LEAST64_MAX INT64_MAX +# define UINT_LEAST8_MAX UINT8_MAX +# define UINT_LEAST16_MAX UINT16_MAX +# define UINT_LEAST32_MAX UINT32_MAX +# define UINT_LEAST64_MAX UINT64_MAX + +# define INTPTR_MIN INT64_MIN +# define INTPTR_MAX INT64_MAX +# define UINTPTR_MAX UINT64_MAX + +# define INTMAX_MIN INT64_MIN +# define INTMAX_MAX INT64_MAX +# define UINTMAX_MAX UINT64_MAX + +# define PTRDIFF_MIN INT64_MIN +# define PTRDIFF_MAX INT64_MAX + +# define SIZE_MAX UINT64_MAX + +# define INT8_C(X) ((::int_least8_t)(X)) +# define INT16_C(X) ((::int_least16_t)(X)) +# define INT32_C(X) ((::int_least32_t)(X)) +# define INT64_C(X) ((::int_least64_t)(X)) +# define UINT8_C(X) ((::uint_least8_t)(X)) +# define UINT16_C(X) ((::uint_least16_t)(X)) +# define UINT32_C(X) ((::uint_least32_t)(X)) +# define UINT64_C(X) ((::uint_least64_t)(X)) + +# define INTMAX_C(X) ((::intmax_t)(X)) +# define UINTMAX_C(X) ((::uintmax_t)(X)) +#endif // ^^^ _CCCL_COMPILER(NVRTC) + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +using ::int16_t; +using ::int32_t; +using ::int64_t; +using ::int8_t; +using ::uint16_t; +using ::uint32_t; +using ::uint64_t; +using ::uint8_t; + +using ::int_fast16_t; +using ::int_fast32_t; +using ::int_fast64_t; +using ::int_fast8_t; +using ::uint_fast16_t; +using ::uint_fast32_t; +using ::uint_fast64_t; +using ::uint_fast8_t; + +using ::int_least16_t; +using ::int_least32_t; +using ::int_least64_t; +using ::int_least8_t; +using ::uint_least16_t; +using ::uint_least32_t; +using ::uint_least64_t; +using ::uint_least8_t; + +using ::intptr_t; +using ::uintptr_t; + +using ::intmax_t; +using ::uintmax_t; + +_LIBCUDACXX_END_NAMESPACE_STD _CCCL_POP_MACROS diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint deleted file mode 100644 index d467c173bf9..00000000000 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdint +++ /dev/null @@ -1,205 +0,0 @@ -// -*- C++ -*- -//===--------------------------- cstdint ----------------------------------===// -// -// Part of the LLVM Project, 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 -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCUDACXX_CSTDINT -#define _LIBCUDACXX_CSTDINT - -/* - cstdint synopsis - -Macros: - - INT8_MIN - INT16_MIN - INT32_MIN - INT64_MIN - - INT8_MAX - INT16_MAX - INT32_MAX - INT64_MAX - - UINT8_MAX - UINT16_MAX - UINT32_MAX - UINT64_MAX - - INT_LEAST8_MIN - INT_LEAST16_MIN - INT_LEAST32_MIN - INT_LEAST64_MIN - - INT_LEAST8_MAX - INT_LEAST16_MAX - INT_LEAST32_MAX - INT_LEAST64_MAX - - UINT_LEAST8_MAX - UINT_LEAST16_MAX - UINT_LEAST32_MAX - UINT_LEAST64_MAX - - INT_FAST8_MIN - INT_FAST16_MIN - INT_FAST32_MIN - INT_FAST64_MIN - - INT_FAST8_MAX - INT_FAST16_MAX - INT_FAST32_MAX - INT_FAST64_MAX - - UINT_FAST8_MAX - UINT_FAST16_MAX - UINT_FAST32_MAX - UINT_FAST64_MAX - - INTPTR_MIN - INTPTR_MAX - UINTPTR_MAX - - INTMAX_MIN - INTMAX_MAX - - UINTMAX_MAX - - PTRDIFF_MIN - PTRDIFF_MAX - - SIG_ATOMIC_MIN - SIG_ATOMIC_MAX - - SIZE_MAX - - WCHAR_MIN - WCHAR_MAX - - WINT_MIN - WINT_MAX - - INT8_C(value) - INT16_C(value) - INT32_C(value) - INT64_C(value) - - UINT8_C(value) - UINT16_C(value) - UINT32_C(value) - UINT64_C(value) - - INTMAX_C(value) - UINTMAX_C(value) - -namespace std -{ - -Types: - - int8_t - int16_t - int32_t - int64_t - - uint8_t - uint16_t - uint32_t - uint64_t - - int_least8_t - int_least16_t - int_least32_t - int_least64_t - - uint_least8_t - uint_least16_t - uint_least32_t - uint_least64_t - - int_fast8_t - int_fast16_t - int_fast32_t - int_fast64_t - - uint_fast8_t - uint_fast16_t - uint_fast32_t - uint_fast64_t - - intptr_t - uintptr_t - - intmax_t - uintmax_t - -} // std -*/ - -#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 - -#include -#include -#include - -#if !_CCCL_COMPILER(NVRTC) -# include -#endif // _CCCL_COMPILER(NVRTC) - -_CCCL_PUSH_MACROS - -_LIBCUDACXX_BEGIN_NAMESPACE_STD - -using ::int16_t; -using ::int32_t; -using ::int64_t; -using ::int8_t; - -using ::uint16_t; -using ::uint32_t; -using ::uint64_t; -using ::uint8_t; - -using ::int_least16_t; -using ::int_least32_t; -using ::int_least64_t; -using ::int_least8_t; - -using ::uint_least16_t; -using ::uint_least32_t; -using ::uint_least64_t; -using ::uint_least8_t; - -using ::int_fast16_t; -using ::int_fast32_t; -using ::int_fast64_t; -using ::int_fast8_t; - -using ::uint_fast16_t; -using ::uint_fast32_t; -using ::uint_fast64_t; -using ::uint_fast8_t; - -using ::intptr_t; -using ::uintptr_t; - -using ::intmax_t; -using ::uintmax_t; - -_LIBCUDACXX_END_NAMESPACE_STD - -_CCCL_POP_MACROS - -#endif // _LIBCUDACXX_CSTDINT diff --git a/libcudacxx/test/libcudacxx/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp b/libcudacxx/test/libcudacxx/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp index 6fd2e98a33f..7607a4b17df 100644 --- a/libcudacxx/test/libcudacxx/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp @@ -3,221 +3,195 @@ // Part of the LLVM Project, 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) 2025 NVIDIA CORPORATION & AFFILIATES. // //===----------------------------------------------------------------------===// -// test +// +#include +#include #include #include -// #include -// #include -// #include -#include +#include #include -// #include -#include #include "test_macros.h" int main(int, char**) { // typedef cuda::std::int8_t - static_assert(sizeof(cuda::std::int8_t) * CHAR_BIT == 8, "sizeof(cuda::std::int8_t)*CHAR_BIT == 8"); - static_assert(cuda::std::is_signed::value, "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int8_t) * CHAR_BIT == 8, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::int16_t - static_assert(sizeof(cuda::std::int16_t) * CHAR_BIT == 16, "sizeof(cuda::std::int16_t)*CHAR_BIT == 16"); - static_assert(cuda::std::is_signed::value, "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int16_t) * CHAR_BIT == 16, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::int32_t - static_assert(sizeof(cuda::std::int32_t) * CHAR_BIT == 32, "sizeof(cuda::std::int32_t)*CHAR_BIT == 32"); - static_assert(cuda::std::is_signed::value, "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int32_t) * CHAR_BIT == 32, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::int64_t - static_assert(sizeof(cuda::std::int64_t) * CHAR_BIT == 64, "sizeof(cuda::std::int64_t)*CHAR_BIT == 64"); - static_assert(cuda::std::is_signed::value, "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int64_t) * CHAR_BIT == 64, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::uint8_t - static_assert(sizeof(cuda::std::uint8_t) * CHAR_BIT == 8, "sizeof(cuda::std::uint8_t)*CHAR_BIT == 8"); - static_assert(cuda::std::is_unsigned::value, "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint8_t) * CHAR_BIT == 8, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::uint16_t - static_assert(sizeof(cuda::std::uint16_t) * CHAR_BIT == 16, "sizeof(cuda::std::uint16_t)*CHAR_BIT == 16"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint16_t) * CHAR_BIT == 16, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::uint32_t - static_assert(sizeof(cuda::std::uint32_t) * CHAR_BIT == 32, "sizeof(cuda::std::uint32_t)*CHAR_BIT == 32"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint32_t) * CHAR_BIT == 32, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::uint64_t - static_assert(sizeof(cuda::std::uint64_t) * CHAR_BIT == 64, "sizeof(cuda::std::uint64_t)*CHAR_BIT == 64"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); - - // typedef cuda::std::int_least8_t - static_assert(sizeof(cuda::std::int_least8_t) * CHAR_BIT >= 8, "sizeof(cuda::std::int_least8_t)*CHAR_BIT >= 8"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); - // typedef cuda::std::int_least16_t - static_assert(sizeof(cuda::std::int_least16_t) * CHAR_BIT >= 16, "sizeof(cuda::std::int_least16_t)*CHAR_BIT >= 16"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); - // typedef cuda::std::int_least32_t - static_assert(sizeof(cuda::std::int_least32_t) * CHAR_BIT >= 32, "sizeof(cuda::std::int_least32_t)*CHAR_BIT >= 32"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); - // typedef cuda::std::int_least64_t - static_assert(sizeof(cuda::std::int_least64_t) * CHAR_BIT >= 64, "sizeof(cuda::std::int_least64_t)*CHAR_BIT >= 64"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); - - // typedef cuda::std::uint_least8_t - static_assert(sizeof(cuda::std::uint_least8_t) * CHAR_BIT >= 8, "sizeof(cuda::std::uint_least8_t)*CHAR_BIT >= 8"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); - // typedef cuda::std::uint_least16_t - static_assert(sizeof(cuda::std::uint_least16_t) * CHAR_BIT >= 16, "sizeof(cuda::std::uint_least16_t)*CHAR_BIT >= 16"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); - // typedef cuda::std::uint_least32_t - static_assert(sizeof(cuda::std::uint_least32_t) * CHAR_BIT >= 32, "sizeof(cuda::std::uint_least32_t)*CHAR_BIT >= 32"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); - // typedef cuda::std::uint_least64_t - static_assert(sizeof(cuda::std::uint_least64_t) * CHAR_BIT >= 64, "sizeof(cuda::std::uint_least64_t)*CHAR_BIT >= 64"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint64_t) * CHAR_BIT == 64, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::int_fast8_t - static_assert(sizeof(cuda::std::int_fast8_t) * CHAR_BIT >= 8, "sizeof(cuda::std::int_fast8_t)*CHAR_BIT >= 8"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int_fast8_t) * CHAR_BIT >= 8, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::int_fast16_t - static_assert(sizeof(cuda::std::int_fast16_t) * CHAR_BIT >= 16, "sizeof(cuda::std::int_fast16_t)*CHAR_BIT >= 16"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int_fast16_t) * CHAR_BIT >= 16, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::int_fast32_t - static_assert(sizeof(cuda::std::int_fast32_t) * CHAR_BIT >= 32, "sizeof(cuda::std::int_fast32_t)*CHAR_BIT >= 32"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int_fast32_t) * CHAR_BIT >= 32, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::int_fast64_t - static_assert(sizeof(cuda::std::int_fast64_t) * CHAR_BIT >= 64, "sizeof(cuda::std::int_fast64_t)*CHAR_BIT >= 64"); - static_assert(cuda::std::is_signed::value, - "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::int_fast64_t) * CHAR_BIT >= 64, ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::uint_fast8_t - static_assert(sizeof(cuda::std::uint_fast8_t) * CHAR_BIT >= 8, "sizeof(cuda::std::uint_fast8_t)*CHAR_BIT >= 8"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint_fast8_t) * CHAR_BIT >= 8, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::uint_fast16_t - static_assert(sizeof(cuda::std::uint_fast16_t) * CHAR_BIT >= 16, "sizeof(cuda::std::uint_fast16_t)*CHAR_BIT >= 16"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint_fast16_t) * CHAR_BIT >= 16, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::uint_fast32_t - static_assert(sizeof(cuda::std::uint_fast32_t) * CHAR_BIT >= 32, "sizeof(cuda::std::uint_fast32_t)*CHAR_BIT >= 32"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint_fast32_t) * CHAR_BIT >= 32, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::uint_fast64_t - static_assert(sizeof(cuda::std::uint_fast64_t) * CHAR_BIT >= 64, "sizeof(cuda::std::uint_fast64_t)*CHAR_BIT >= 64"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uint_fast64_t) * CHAR_BIT >= 64, ""); + static_assert(cuda::std::is_unsigned::value, ""); + + // typedef cuda::std::int_least8_t + static_assert(sizeof(cuda::std::int_least8_t) * CHAR_BIT >= 8, ""); + static_assert(cuda::std::is_signed::value, ""); + // typedef cuda::std::int_least16_t + static_assert(sizeof(cuda::std::int_least16_t) * CHAR_BIT >= 16, ""); + static_assert(cuda::std::is_signed::value, ""); + // typedef cuda::std::int_least32_t + static_assert(sizeof(cuda::std::int_least32_t) * CHAR_BIT >= 32, ""); + static_assert(cuda::std::is_signed::value, ""); + // typedef cuda::std::int_least64_t + static_assert(sizeof(cuda::std::int_least64_t) * CHAR_BIT >= 64, ""); + static_assert(cuda::std::is_signed::value, ""); + + // typedef cuda::std::uint_least8_t + static_assert(sizeof(cuda::std::uint_least8_t) * CHAR_BIT >= 8, ""); + static_assert(cuda::std::is_unsigned::value, ""); + // typedef cuda::std::uint_least16_t + static_assert(sizeof(cuda::std::uint_least16_t) * CHAR_BIT >= 16, ""); + static_assert(cuda::std::is_unsigned::value, ""); + // typedef cuda::std::uint_least32_t + static_assert(sizeof(cuda::std::uint_least32_t) * CHAR_BIT >= 32, ""); + static_assert(cuda::std::is_unsigned::value, ""); + // typedef cuda::std::uint_least64_t + static_assert(sizeof(cuda::std::uint_least64_t) * CHAR_BIT >= 64, ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::intptr_t - static_assert(sizeof(cuda::std::intptr_t) >= sizeof(void*), "sizeof(cuda::std::intptr_t) >= sizeof(void*)"); - static_assert(cuda::std::is_signed::value, "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::intptr_t) >= sizeof(void*), ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::uintptr_t - static_assert(sizeof(cuda::std::uintptr_t) >= sizeof(void*), "sizeof(cuda::std::uintptr_t) >= sizeof(void*)"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uintptr_t) >= sizeof(void*), ""); + static_assert(cuda::std::is_unsigned::value, ""); // typedef cuda::std::intmax_t - static_assert(sizeof(cuda::std::intmax_t) >= sizeof(long long), "sizeof(cuda::std::intmax_t) >= sizeof(long long)"); - static_assert(cuda::std::is_signed::value, "cuda::std::is_signed::value"); + static_assert(sizeof(cuda::std::intmax_t) >= sizeof(long long), ""); + static_assert(cuda::std::is_signed::value, ""); // typedef cuda::std::uintmax_t - static_assert(sizeof(cuda::std::uintmax_t) >= sizeof(unsigned long long), - "sizeof(cuda::std::uintmax_t) >= sizeof(unsigned long long)"); - static_assert(cuda::std::is_unsigned::value, - "cuda::std::is_unsigned::value"); + static_assert(sizeof(cuda::std::uintmax_t) >= sizeof(unsigned long long), ""); + static_assert(cuda::std::is_unsigned::value, ""); // INTN_MIN - static_assert(INT8_MIN == -128, "INT8_MIN == -128"); - static_assert(INT16_MIN == -32768, "INT16_MIN == -32768"); - static_assert(INT32_MIN == -2147483647 - 1, "INT32_MIN == -2147483648"); - static_assert(INT64_MIN == -9223372036854775807LL - 1, "INT64_MIN == -9223372036854775808LL"); + static_assert(INT8_MIN == -128, ""); + static_assert(INT16_MIN == -32768, ""); + static_assert(INT32_MIN == -2147483647 - 1, ""); + static_assert(INT64_MIN == -9223372036854775807LL - 1, ""); // INTN_MAX - static_assert(INT8_MAX == 127, "INT8_MAX == 127"); - static_assert(INT16_MAX == 32767, "INT16_MAX == 32767"); - static_assert(INT32_MAX == 2147483647, "INT32_MAX == 2147483647"); - static_assert(INT64_MAX == 9223372036854775807LL, "INT64_MAX == 9223372036854775807LL"); + static_assert(INT8_MAX == 127, ""); + static_assert(INT16_MAX == 32767, ""); + static_assert(INT32_MAX == 2147483647, ""); + static_assert(INT64_MAX == 9223372036854775807LL, ""); // UINTN_MAX - static_assert(UINT8_MAX == 255, "UINT8_MAX == 255"); - static_assert(UINT16_MAX == 65535, "UINT16_MAX == 65535"); - static_assert(UINT32_MAX == 4294967295U, "UINT32_MAX == 4294967295"); - static_assert(UINT64_MAX == 18446744073709551615ULL, "UINT64_MAX == 18446744073709551615ULL"); + static_assert(UINT8_MAX == 255, ""); + static_assert(UINT16_MAX == 65535, ""); + static_assert(UINT32_MAX == 4294967295U, ""); + static_assert(UINT64_MAX == 18446744073709551615ULL, ""); // INT_FASTN_MIN - static_assert(INT_FAST8_MIN <= -128, "INT_FAST8_MIN <= -128"); - static_assert(INT_FAST16_MIN <= -32768, "INT_FAST16_MIN <= -32768"); - static_assert(INT_FAST32_MIN <= -2147483647 - 1, "INT_FAST32_MIN <= -2147483648"); - static_assert(INT_FAST64_MIN <= -9223372036854775807LL - 1, "INT_FAST64_MIN <= -9223372036854775808LL"); + static_assert(INT_FAST8_MIN <= -128, ""); + static_assert(INT_FAST16_MIN <= -32768, ""); + static_assert(INT_FAST32_MIN <= -2147483647 - 1, ""); + static_assert(INT_FAST64_MIN <= -9223372036854775807LL - 1, ""); // INT_FASTN_MAX - static_assert(INT_FAST8_MAX >= 127, "INT_FAST8_MAX >= 127"); - static_assert(INT_FAST16_MAX >= 32767, "INT_FAST16_MAX >= 32767"); - static_assert(INT_FAST32_MAX >= 2147483647, "INT_FAST32_MAX >= 2147483647"); - static_assert(INT_FAST64_MAX >= 9223372036854775807LL, "INT_FAST64_MAX >= 9223372036854775807LL"); + static_assert(INT_FAST8_MAX >= 127, ""); + static_assert(INT_FAST16_MAX >= 32767, ""); + static_assert(INT_FAST32_MAX >= 2147483647, ""); + static_assert(INT_FAST64_MAX >= 9223372036854775807LL, ""); // UINT_FASTN_MAX - static_assert(UINT_FAST8_MAX >= 255, "UINT_FAST8_MAX >= 255"); - static_assert(UINT_FAST16_MAX >= 65535, "UINT_FAST16_MAX >= 65535"); - static_assert(UINT_FAST32_MAX >= 4294967295U, "UINT_FAST32_MAX >= 4294967295"); - static_assert(UINT_FAST64_MAX >= 18446744073709551615ULL, "UINT_FAST64_MAX >= 18446744073709551615ULL"); + static_assert(UINT_FAST8_MAX >= 255, ""); + static_assert(UINT_FAST16_MAX >= 65535, ""); + static_assert(UINT_FAST32_MAX >= 4294967295U, ""); + static_assert(UINT_FAST64_MAX >= 18446744073709551615ULL, ""); -#if 0 - // INTPTR_MIN - assert(INTPTR_MIN == cuda::std::numeric_limits::min()); - - // INTPTR_MAX - assert(INTPTR_MAX == cuda::std::numeric_limits::max()); - - // UINTPTR_MAX - assert(UINTPTR_MAX == cuda::std::numeric_limits::max()); - - // INTMAX_MIN - assert(INTMAX_MIN == cuda::std::numeric_limits::min()); + // INTN_MIN + static_assert(INT8_MIN == -128, ""); + static_assert(INT16_MIN == -32768, ""); + static_assert(INT32_MIN == -2147483647 - 1, ""); + static_assert(INT64_MIN == -9223372036854775807LL - 1, ""); - // INTMAX_MAX - assert(INTMAX_MAX == cuda::std::numeric_limits::max()); + // INTN_MAX + static_assert(INT8_MAX == 127, ""); + static_assert(INT16_MAX == 32767, ""); + static_assert(INT32_MAX == 2147483647, ""); + static_assert(INT64_MAX == 9223372036854775807LL, ""); - // UINTMAX_MAX - assert(UINTMAX_MAX == cuda::std::numeric_limits::max()); + // UINTN_MAX + static_assert(UINT8_MAX == 255, ""); + static_assert(UINT16_MAX == 65535, ""); + static_assert(UINT32_MAX == 4294967295U, ""); + static_assert(UINT64_MAX == 18446744073709551615ULL, ""); - // PTRDIFF_MIN - assert(PTRDIFF_MIN == cuda::std::numeric_limits::min()); + // INTPTR_MIN + static_assert(INTPTR_MIN == cuda::std::numeric_limits::min(), ""); - // PTRDIFF_MAX - assert(PTRDIFF_MAX == cuda::std::numeric_limits::max()); + // INTPTR_MAX + static_assert(INTPTR_MAX == cuda::std::numeric_limits::max(), ""); - // SIG_ATOMIC_MIN - // assert(SIG_ATOMIC_MIN == cuda::std::numeric_limits::min()); + // UINTPTR_MAX + static_assert(UINTPTR_MAX == cuda::std::numeric_limits::max(), ""); - // SIG_ATOMIC_MAX - // assert(SIG_ATOMIC_MAX == cuda::std::numeric_limits::max()); + // INTMAX_MIN + static_assert(INTMAX_MIN == cuda::std::numeric_limits::min(), ""); - // SIZE_MAX - assert(SIZE_MAX == cuda::std::numeric_limits::max()); + // INTMAX_MAX + static_assert(INTMAX_MAX == cuda::std::numeric_limits::max(), ""); - // WCHAR_MIN - // assert(WCHAR_MIN == cuda::std::numeric_limits::min()); + // UINTMAX_MAX + static_assert(UINTMAX_MAX == cuda::std::numeric_limits::max(), ""); - // WCHAR_MAX - // assert(WCHAR_MAX == cuda::std::numeric_limits::max()); + // PTRDIFF_MIN + static_assert(PTRDIFF_MIN == cuda::std::numeric_limits::min(), ""); - // WINT_MIN - // assert(WINT_MIN == cuda::std::numeric_limits::min()); + // PTRDIFF_MAX + static_assert(PTRDIFF_MAX == cuda::std::numeric_limits::max(), ""); - // WINT_MAX - // assert(WINT_MAX == cuda::std::numeric_limits::max()); -#endif + // SIZE_MAX + static_assert(SIZE_MAX == cuda::std::numeric_limits::max(), ""); #ifndef INT8_C # error INT8_C not defined