Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
limits848 linesDownload Raw Back to include
1// -*- C++ -*-2//===---------------------------- limits ----------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCUDACXX_LIMITS11#define _LIBCUDACXX_LIMITS12 13/*14    limits synopsis15 16namespace std17{18 19template<class T>20class numeric_limits21{22public:23    static constexpr bool is_specialized = false;24    static constexpr T min() noexcept;25    static constexpr T max() noexcept;26    static constexpr T lowest() noexcept;27 28    static constexpr int  digits = 0;29    static constexpr int  digits10 = 0;30    static constexpr int  max_digits10 = 0;31    static constexpr bool is_signed = false;32    static constexpr bool is_integer = false;33    static constexpr bool is_exact = false;34    static constexpr int  radix = 0;35    static constexpr T epsilon() noexcept;36    static constexpr T round_error() noexcept;37 38    static constexpr int  min_exponent = 0;39    static constexpr int  min_exponent10 = 0;40    static constexpr int  max_exponent = 0;41    static constexpr int  max_exponent10 = 0;42 43    static constexpr bool has_infinity = false;44    static constexpr bool has_quiet_NaN = false;45    static constexpr bool has_signaling_NaN = false;46    static constexpr float_denorm_style has_denorm = denorm_absent;47    static constexpr bool has_denorm_loss = false;48    static constexpr T infinity() noexcept;49    static constexpr T quiet_NaN() noexcept;50    static constexpr T signaling_NaN() noexcept;51    static constexpr T denorm_min() noexcept;52 53    static constexpr bool is_iec559 = false;54    static constexpr bool is_bounded = false;55    static constexpr bool is_modulo = false;56 57    static constexpr bool traps = false;58    static constexpr bool tinyness_before = false;59    static constexpr float_round_style round_style = round_toward_zero;60};61 62enum float_round_style63{64    round_indeterminate       = -1,65    round_toward_zero         =  0,66    round_to_nearest          =  1,67    round_toward_infinity     =  2,68    round_toward_neg_infinity =  369};70 71enum float_denorm_style72{73    denorm_indeterminate = -1,74    denorm_absent = 0,75    denorm_present = 176};77 78template<> class numeric_limits<cv bool>;79 80template<> class numeric_limits<cv char>;81template<> class numeric_limits<cv signed char>;82template<> class numeric_limits<cv unsigned char>;83template<> class numeric_limits<cv wchar_t>;84template<> class numeric_limits<cv char8_t>; // C++2085template<> class numeric_limits<cv char16_t>;86template<> class numeric_limits<cv char32_t>;87 88template<> class numeric_limits<cv short>;89template<> class numeric_limits<cv int>;90template<> class numeric_limits<cv long>;91template<> class numeric_limits<cv long long>;92template<> class numeric_limits<cv unsigned short>;93template<> class numeric_limits<cv unsigned int>;94template<> class numeric_limits<cv unsigned long>;95template<> class numeric_limits<cv unsigned long long>;96 97template<> class numeric_limits<cv float>;98template<> class numeric_limits<cv double>;99template<> class numeric_limits<cv long double>;100 101}  // std102 103*/104 105#ifndef __cuda_std__106#include <__config>107#else108#ifdef _LIBCUDACXX_COMPILER_NVRTC109#include "climits"110#endif // _LIBCUDACXX_COMPILER_NVRTC111#endif // __cuda_std__112 113#include "__assert" // all public C++ headers provide the assertion handler114#include "type_traits"115#include "version"116 117#ifndef __cuda_std__118#include <__pragma_push>119#endif //__cuda_std__120 121#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)122#  pragma GCC system_header123#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)124#  pragma clang system_header125#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)126#  pragma system_header127#endif // no system header128 129#if defined(_LIBCUDACXX_COMPILER_MSVC)130#include "support/win32/limits_msvc_win32.h"131#endif // _LIBCUDACXX_MSVCRT132 133#if defined(_LIBCUDACXX_COMPILER_IBM)134#include "support/ibm/limits.h"135#endif // _LIBCUDACXX_COMPILER_IBM136 137_LIBCUDACXX_BEGIN_NAMESPACE_STD138 139enum float_round_style140{141    round_indeterminate       = -1,142    round_toward_zero         =  0,143    round_to_nearest          =  1,144    round_toward_infinity     =  2,145    round_toward_neg_infinity =  3146};147 148enum float_denorm_style149{150    denorm_indeterminate = -1,151    denorm_absent = 0,152    denorm_present = 1153};154 155template <class _Tp, bool = is_arithmetic<_Tp>::value>156class __libcpp_numeric_limits157{158protected:159    typedef _Tp type;160 161    static constexpr bool is_specialized = false;162    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return type();}163    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return type();}164    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return type();}165 166    static constexpr int  digits = 0;167    static constexpr int  digits10 = 0;168    static constexpr int  max_digits10 = 0;169    static constexpr bool is_signed = false;170    static constexpr bool is_integer = false;171    static constexpr bool is_exact = false;172    static constexpr int  radix = 0;173    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return type();}174    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return type();}175 176    static constexpr int  min_exponent = 0;177    static constexpr int  min_exponent10 = 0;178    static constexpr int  max_exponent = 0;179    static constexpr int  max_exponent10 = 0;180 181    static constexpr bool has_infinity = false;182    static constexpr bool has_quiet_NaN = false;183    static constexpr bool has_signaling_NaN = false;184    static constexpr float_denorm_style has_denorm = denorm_absent;185    static constexpr bool has_denorm_loss = false;186    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return type();}187    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return type();}188    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return type();}189    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return type();}190 191    static constexpr bool is_iec559 = false;192    static constexpr bool is_bounded = false;193    static constexpr bool is_modulo = false;194 195    static constexpr bool traps = false;196    static constexpr bool tinyness_before = false;197    static constexpr float_round_style round_style = round_toward_zero;198};199 200template <class _Tp, int __digits, bool _IsSigned>201struct __libcpp_compute_min202{203    static constexpr _Tp value = static_cast<_Tp>(_Tp(1) << __digits);204};205 206template <class _Tp, int __digits>207struct __libcpp_compute_min<_Tp, __digits, false>208{209    static constexpr _Tp value = _Tp(0);210};211 212template <class _Tp>213class __libcpp_numeric_limits<_Tp, true>214{215protected:216    typedef _Tp type;217 218    static constexpr bool is_specialized = true;219 220    static constexpr bool is_signed = type(-1) < type(0);221    static constexpr int  digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);222    static constexpr int  digits10 = digits * 3 / 10;223    static constexpr int  max_digits10 = 0;224    static constexpr type __min = __libcpp_compute_min<type, digits, is_signed>::value;225    static constexpr type __max = is_signed ? type(type(~0) ^ __min) : type(~0);226    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __min;}227    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __max;}228    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return min();}229 230    static constexpr bool is_integer = true;231    static constexpr bool is_exact = true;232    static constexpr int  radix = 2;233    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return type(0);}234    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return type(0);}235 236    static constexpr int  min_exponent = 0;237    static constexpr int  min_exponent10 = 0;238    static constexpr int  max_exponent = 0;239    static constexpr int  max_exponent10 = 0;240 241    static constexpr bool has_infinity = false;242    static constexpr bool has_quiet_NaN = false;243    static constexpr bool has_signaling_NaN = false;244    static constexpr float_denorm_style has_denorm = denorm_absent;245    static constexpr bool has_denorm_loss = false;246    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return type(0);}247    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return type(0);}248    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return type(0);}249    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return type(0);}250 251    static constexpr bool is_iec559 = false;252    static constexpr bool is_bounded = true;253    static constexpr bool is_modulo = !_CUDA_VSTD::is_signed<_Tp>::value;254 255#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \256    defined(__wasm__)257    static constexpr bool traps = true;258#else259    static constexpr bool traps = false;260#endif261    static constexpr bool tinyness_before = false;262    static constexpr float_round_style round_style = round_toward_zero;263};264 265template <>266class __libcpp_numeric_limits<bool, true>267{268protected:269    typedef bool type;270 271    static constexpr bool is_specialized = true;272 273    static constexpr bool is_signed = false;274    static constexpr int  digits = 1;275    static constexpr int  digits10 = 0;276    static constexpr int  max_digits10 = 0;277    static constexpr type __min = false;278    static constexpr type __max = true;279    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __min;}280    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __max;}281    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return min();}282 283    static constexpr bool is_integer = true;284    static constexpr bool is_exact = true;285    static constexpr int  radix = 2;286    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return type(0);}287    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return type(0);}288 289    static constexpr int  min_exponent = 0;290    static constexpr int  min_exponent10 = 0;291    static constexpr int  max_exponent = 0;292    static constexpr int  max_exponent10 = 0;293 294    static constexpr bool has_infinity = false;295    static constexpr bool has_quiet_NaN = false;296    static constexpr bool has_signaling_NaN = false;297    static constexpr float_denorm_style has_denorm = denorm_absent;298    static constexpr bool has_denorm_loss = false;299    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return type(0);}300    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return type(0);}301    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return type(0);}302    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return type(0);}303 304    static constexpr bool is_iec559 = false;305    static constexpr bool is_bounded = true;306    static constexpr bool is_modulo = false;307 308    static constexpr bool traps = false;309    static constexpr bool tinyness_before = false;310    static constexpr float_round_style round_style = round_toward_zero;311};312 313template <>314class __libcpp_numeric_limits<float, true>315{316protected:317    typedef float type;318 319    static constexpr bool is_specialized = true;320 321    static constexpr bool is_signed = true;322    static constexpr int  digits = __FLT_MANT_DIG__;323    static constexpr int  digits10 = __FLT_DIG__;324    static constexpr int  max_digits10 = 2+(digits * 30103l)/100000l;325    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __FLT_MIN__;}326    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __FLT_MAX__;}327    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return -max();}328 329    static constexpr bool is_integer = false;330    static constexpr bool is_exact = false;331    static constexpr int  radix = __FLT_RADIX__;332    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __FLT_EPSILON__;}333    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return 0.5F;}334 335    static constexpr int  min_exponent = __FLT_MIN_EXP__;336    static constexpr int  min_exponent10 = __FLT_MIN_10_EXP__;337    static constexpr int  max_exponent = __FLT_MAX_EXP__;338    static constexpr int  max_exponent10 = __FLT_MAX_10_EXP__;339 340    static constexpr bool has_infinity = true;341    static constexpr bool has_quiet_NaN = true;342    static constexpr bool has_signaling_NaN = true;343    static constexpr float_denorm_style has_denorm = denorm_present;344    static constexpr bool has_denorm_loss = false;345#ifdef _LIBCUDACXX_COMPILER_NVRTC346    _LIBCUDACXX_INLINE_VISIBILITY static type infinity() noexcept {return __builtin_huge_valf();}347    _LIBCUDACXX_INLINE_VISIBILITY static type quiet_NaN() noexcept {return __builtin_nanf("");}348    _LIBCUDACXX_INLINE_VISIBILITY static type signaling_NaN() noexcept {return __builtin_nansf("");}349#else350    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __builtin_huge_valf();}351    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __builtin_nanf("");}352    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __builtin_nansf("");}353#endif354    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __FLT_DENORM_MIN__;}355 356    static constexpr bool is_iec559 = true;357    static constexpr bool is_bounded = true;358    static constexpr bool is_modulo = false;359 360    static constexpr bool traps = false;361    static constexpr bool tinyness_before = false;362    static constexpr float_round_style round_style = round_to_nearest;363};364 365template <>366class __libcpp_numeric_limits<double, true>367{368protected:369    typedef double type;370 371    static constexpr bool is_specialized = true;372 373    static constexpr bool is_signed = true;374    static constexpr int  digits = __DBL_MANT_DIG__;375    static constexpr int  digits10 = __DBL_DIG__;376    static constexpr int  max_digits10 = 2+(digits * 30103l)/100000l;377    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __DBL_MIN__;}378    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __DBL_MAX__;}379    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return -max();}380 381    static constexpr bool is_integer = false;382    static constexpr bool is_exact = false;383    static constexpr int  radix = __FLT_RADIX__;384    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __DBL_EPSILON__;}385    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return 0.5;}386 387    static constexpr int  min_exponent = __DBL_MIN_EXP__;388    static constexpr int  min_exponent10 = __DBL_MIN_10_EXP__;389    static constexpr int  max_exponent = __DBL_MAX_EXP__;390    static constexpr int  max_exponent10 = __DBL_MAX_10_EXP__;391 392    static constexpr bool has_infinity = true;393    static constexpr bool has_quiet_NaN = true;394    static constexpr bool has_signaling_NaN = true;395    static constexpr float_denorm_style has_denorm = denorm_present;396    static constexpr bool has_denorm_loss = false;397#ifdef _LIBCUDACXX_COMPILER_NVRTC398    _LIBCUDACXX_INLINE_VISIBILITY static type infinity() noexcept {return __builtin_huge_val();}399    _LIBCUDACXX_INLINE_VISIBILITY static type quiet_NaN() noexcept {return __builtin_nan("");}400    _LIBCUDACXX_INLINE_VISIBILITY static type signaling_NaN() noexcept {return __builtin_nans("");}401#else402    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __builtin_huge_val();}403    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __builtin_nan("");}404    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __builtin_nans("");}405#endif406    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __DBL_DENORM_MIN__;}407 408    static constexpr bool is_iec559 = true;409    static constexpr bool is_bounded = true;410    static constexpr bool is_modulo = false;411 412    static constexpr bool traps = false;413    static constexpr bool tinyness_before = false;414    static constexpr float_round_style round_style = round_to_nearest;415};416 417template <>418class __libcpp_numeric_limits<long double, true>419{420#ifndef _LIBCUDACXX_HAS_NO_LONG_DOUBLE421protected:422    typedef long double type;423 424    static constexpr bool is_specialized = true;425 426    static constexpr bool is_signed = true;427    static constexpr int  digits = __LDBL_MANT_DIG__;428    static constexpr int  digits10 = __LDBL_DIG__;429    static constexpr int  max_digits10 = 2+(digits * 30103l)/100000l;430    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __LDBL_MIN__;}431    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __LDBL_MAX__;}432    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return -max();}433 434    static constexpr bool is_integer = false;435    static constexpr bool is_exact = false;436    static constexpr int  radix = __FLT_RADIX__;437    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __LDBL_EPSILON__;}438    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return 0.5L;}439 440    static constexpr int  min_exponent = __LDBL_MIN_EXP__;441    static constexpr int  min_exponent10 = __LDBL_MIN_10_EXP__;442    static constexpr int  max_exponent = __LDBL_MAX_EXP__;443    static constexpr int  max_exponent10 = __LDBL_MAX_10_EXP__;444 445    static constexpr bool has_infinity = true;446    static constexpr bool has_quiet_NaN = true;447    static constexpr bool has_signaling_NaN = true;448    static constexpr float_denorm_style has_denorm = denorm_present;449    static constexpr bool has_denorm_loss = false;450    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __builtin_huge_vall();}451    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __builtin_nanl("");}452    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __builtin_nansl("");}453    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __LDBL_DENORM_MIN__;}454 455#if (defined(__ppc__) || defined(__ppc64__) || defined(__PPC64__))456    static constexpr bool is_iec559 = false;457#else458    static constexpr bool is_iec559 = true;459#endif460    static constexpr bool is_bounded = true;461    static constexpr bool is_modulo = false;462 463    static constexpr bool traps = false;464    static constexpr bool tinyness_before = false;465    static constexpr float_round_style round_style = round_to_nearest;466#endif467};468 469template <class _Tp>470class _LIBCUDACXX_TEMPLATE_VIS numeric_limits471    : private __libcpp_numeric_limits<__remove_cv_t<_Tp>>472{473    typedef __libcpp_numeric_limits<__remove_cv_t<_Tp>> __base;474    typedef typename __base::type type;475public:476    static constexpr bool is_specialized = __base::is_specialized;477    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __base::min();}478    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __base::max();}479    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return __base::lowest();}480 481    static constexpr int  digits = __base::digits;482    static constexpr int  digits10 = __base::digits10;483    static constexpr int  max_digits10 = __base::max_digits10;484    static constexpr bool is_signed = __base::is_signed;485    static constexpr bool is_integer = __base::is_integer;486    static constexpr bool is_exact = __base::is_exact;487    static constexpr int  radix = __base::radix;488    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __base::epsilon();}489    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return __base::round_error();}490 491    static constexpr int  min_exponent = __base::min_exponent;492    static constexpr int  min_exponent10 = __base::min_exponent10;493    static constexpr int  max_exponent = __base::max_exponent;494    static constexpr int  max_exponent10 = __base::max_exponent10;495 496    static constexpr bool has_infinity = __base::has_infinity;497    static constexpr bool has_quiet_NaN = __base::has_quiet_NaN;498    static constexpr bool has_signaling_NaN = __base::has_signaling_NaN;499    static constexpr float_denorm_style has_denorm = __base::has_denorm;500    static constexpr bool has_denorm_loss = __base::has_denorm_loss;501    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __base::infinity();}502    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __base::quiet_NaN();}503    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __base::signaling_NaN();}504    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __base::denorm_min();}505 506    static constexpr bool is_iec559 = __base::is_iec559;507    static constexpr bool is_bounded = __base::is_bounded;508    static constexpr bool is_modulo = __base::is_modulo;509 510    static constexpr bool traps = __base::traps;511    static constexpr bool tinyness_before = __base::tinyness_before;512    static constexpr float_round_style round_style = __base::round_style;513};514 515template <class _Tp>516    constexpr bool numeric_limits<_Tp>::is_specialized;517template <class _Tp>518    constexpr int numeric_limits<_Tp>::digits;519template <class _Tp>520    constexpr int numeric_limits<_Tp>::digits10;521template <class _Tp>522    constexpr int numeric_limits<_Tp>::max_digits10;523template <class _Tp>524    constexpr bool numeric_limits<_Tp>::is_signed;525template <class _Tp>526    constexpr bool numeric_limits<_Tp>::is_integer;527template <class _Tp>528    constexpr bool numeric_limits<_Tp>::is_exact;529template <class _Tp>530    constexpr int numeric_limits<_Tp>::radix;531template <class _Tp>532    constexpr int numeric_limits<_Tp>::min_exponent;533template <class _Tp>534    constexpr int numeric_limits<_Tp>::min_exponent10;535template <class _Tp>536    constexpr int numeric_limits<_Tp>::max_exponent;537template <class _Tp>538    constexpr int numeric_limits<_Tp>::max_exponent10;539template <class _Tp>540    constexpr bool numeric_limits<_Tp>::has_infinity;541template <class _Tp>542    constexpr bool numeric_limits<_Tp>::has_quiet_NaN;543template <class _Tp>544    constexpr bool numeric_limits<_Tp>::has_signaling_NaN;545template <class _Tp>546    constexpr float_denorm_style numeric_limits<_Tp>::has_denorm;547template <class _Tp>548    constexpr bool numeric_limits<_Tp>::has_denorm_loss;549template <class _Tp>550    constexpr bool numeric_limits<_Tp>::is_iec559;551template <class _Tp>552    constexpr bool numeric_limits<_Tp>::is_bounded;553template <class _Tp>554    constexpr bool numeric_limits<_Tp>::is_modulo;555template <class _Tp>556    constexpr bool numeric_limits<_Tp>::traps;557template <class _Tp>558    constexpr bool numeric_limits<_Tp>::tinyness_before;559template <class _Tp>560    constexpr float_round_style numeric_limits<_Tp>::round_style;561 562template <class _Tp>563class _LIBCUDACXX_TEMPLATE_VIS numeric_limits<const _Tp>564    : private numeric_limits<_Tp>565{566    typedef numeric_limits<_Tp> __base;567    typedef _Tp type;568public:569    static constexpr bool is_specialized = __base::is_specialized;570    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __base::min();}571    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __base::max();}572    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return __base::lowest();}573 574    static constexpr int  digits = __base::digits;575    static constexpr int  digits10 = __base::digits10;576    static constexpr int  max_digits10 = __base::max_digits10;577    static constexpr bool is_signed = __base::is_signed;578    static constexpr bool is_integer = __base::is_integer;579    static constexpr bool is_exact = __base::is_exact;580    static constexpr int  radix = __base::radix;581    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __base::epsilon();}582    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return __base::round_error();}583 584    static constexpr int  min_exponent = __base::min_exponent;585    static constexpr int  min_exponent10 = __base::min_exponent10;586    static constexpr int  max_exponent = __base::max_exponent;587    static constexpr int  max_exponent10 = __base::max_exponent10;588 589    static constexpr bool has_infinity = __base::has_infinity;590    static constexpr bool has_quiet_NaN = __base::has_quiet_NaN;591    static constexpr bool has_signaling_NaN = __base::has_signaling_NaN;592    static constexpr float_denorm_style has_denorm = __base::has_denorm;593    static constexpr bool has_denorm_loss = __base::has_denorm_loss;594    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __base::infinity();}595    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __base::quiet_NaN();}596    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __base::signaling_NaN();}597    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __base::denorm_min();}598 599    static constexpr bool is_iec559 = __base::is_iec559;600    static constexpr bool is_bounded = __base::is_bounded;601    static constexpr bool is_modulo = __base::is_modulo;602 603    static constexpr bool traps = __base::traps;604    static constexpr bool tinyness_before = __base::tinyness_before;605    static constexpr float_round_style round_style = __base::round_style;606};607 608template <class _Tp>609    constexpr bool numeric_limits<const _Tp>::is_specialized;610template <class _Tp>611    constexpr int numeric_limits<const _Tp>::digits;612template <class _Tp>613    constexpr int numeric_limits<const _Tp>::digits10;614template <class _Tp>615    constexpr int numeric_limits<const _Tp>::max_digits10;616template <class _Tp>617    constexpr bool numeric_limits<const _Tp>::is_signed;618template <class _Tp>619    constexpr bool numeric_limits<const _Tp>::is_integer;620template <class _Tp>621    constexpr bool numeric_limits<const _Tp>::is_exact;622template <class _Tp>623    constexpr int numeric_limits<const _Tp>::radix;624template <class _Tp>625    constexpr int numeric_limits<const _Tp>::min_exponent;626template <class _Tp>627    constexpr int numeric_limits<const _Tp>::min_exponent10;628template <class _Tp>629    constexpr int numeric_limits<const _Tp>::max_exponent;630template <class _Tp>631    constexpr int numeric_limits<const _Tp>::max_exponent10;632template <class _Tp>633    constexpr bool numeric_limits<const _Tp>::has_infinity;634template <class _Tp>635    constexpr bool numeric_limits<const _Tp>::has_quiet_NaN;636template <class _Tp>637    constexpr bool numeric_limits<const _Tp>::has_signaling_NaN;638template <class _Tp>639    constexpr float_denorm_style numeric_limits<const _Tp>::has_denorm;640template <class _Tp>641    constexpr bool numeric_limits<const _Tp>::has_denorm_loss;642template <class _Tp>643    constexpr bool numeric_limits<const _Tp>::is_iec559;644template <class _Tp>645    constexpr bool numeric_limits<const _Tp>::is_bounded;646template <class _Tp>647    constexpr bool numeric_limits<const _Tp>::is_modulo;648template <class _Tp>649    constexpr bool numeric_limits<const _Tp>::traps;650template <class _Tp>651    constexpr bool numeric_limits<const _Tp>::tinyness_before;652template <class _Tp>653    constexpr float_round_style numeric_limits<const _Tp>::round_style;654 655template <class _Tp>656class _LIBCUDACXX_TEMPLATE_VIS numeric_limits<volatile _Tp>657    : private numeric_limits<_Tp>658{659    typedef numeric_limits<_Tp> __base;660    typedef _Tp type;661public:662    static constexpr bool is_specialized = __base::is_specialized;663    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __base::min();}664    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __base::max();}665    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return __base::lowest();}666 667    static constexpr int  digits = __base::digits;668    static constexpr int  digits10 = __base::digits10;669    static constexpr int  max_digits10 = __base::max_digits10;670    static constexpr bool is_signed = __base::is_signed;671    static constexpr bool is_integer = __base::is_integer;672    static constexpr bool is_exact = __base::is_exact;673    static constexpr int  radix = __base::radix;674    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __base::epsilon();}675    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return __base::round_error();}676 677    static constexpr int  min_exponent = __base::min_exponent;678    static constexpr int  min_exponent10 = __base::min_exponent10;679    static constexpr int  max_exponent = __base::max_exponent;680    static constexpr int  max_exponent10 = __base::max_exponent10;681 682    static constexpr bool has_infinity = __base::has_infinity;683    static constexpr bool has_quiet_NaN = __base::has_quiet_NaN;684    static constexpr bool has_signaling_NaN = __base::has_signaling_NaN;685    static constexpr float_denorm_style has_denorm = __base::has_denorm;686    static constexpr bool has_denorm_loss = __base::has_denorm_loss;687    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __base::infinity();}688    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __base::quiet_NaN();}689    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __base::signaling_NaN();}690    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __base::denorm_min();}691 692    static constexpr bool is_iec559 = __base::is_iec559;693    static constexpr bool is_bounded = __base::is_bounded;694    static constexpr bool is_modulo = __base::is_modulo;695 696    static constexpr bool traps = __base::traps;697    static constexpr bool tinyness_before = __base::tinyness_before;698    static constexpr float_round_style round_style = __base::round_style;699};700 701template <class _Tp>702    constexpr bool numeric_limits<volatile _Tp>::is_specialized;703template <class _Tp>704    constexpr int numeric_limits<volatile _Tp>::digits;705template <class _Tp>706    constexpr int numeric_limits<volatile _Tp>::digits10;707template <class _Tp>708    constexpr int numeric_limits<volatile _Tp>::max_digits10;709template <class _Tp>710    constexpr bool numeric_limits<volatile _Tp>::is_signed;711template <class _Tp>712    constexpr bool numeric_limits<volatile _Tp>::is_integer;713template <class _Tp>714    constexpr bool numeric_limits<volatile _Tp>::is_exact;715template <class _Tp>716    constexpr int numeric_limits<volatile _Tp>::radix;717template <class _Tp>718    constexpr int numeric_limits<volatile _Tp>::min_exponent;719template <class _Tp>720    constexpr int numeric_limits<volatile _Tp>::min_exponent10;721template <class _Tp>722    constexpr int numeric_limits<volatile _Tp>::max_exponent;723template <class _Tp>724    constexpr int numeric_limits<volatile _Tp>::max_exponent10;725template <class _Tp>726    constexpr bool numeric_limits<volatile _Tp>::has_infinity;727template <class _Tp>728    constexpr bool numeric_limits<volatile _Tp>::has_quiet_NaN;729template <class _Tp>730    constexpr bool numeric_limits<volatile _Tp>::has_signaling_NaN;731template <class _Tp>732    constexpr float_denorm_style numeric_limits<volatile _Tp>::has_denorm;733template <class _Tp>734    constexpr bool numeric_limits<volatile _Tp>::has_denorm_loss;735template <class _Tp>736    constexpr bool numeric_limits<volatile _Tp>::is_iec559;737template <class _Tp>738    constexpr bool numeric_limits<volatile _Tp>::is_bounded;739template <class _Tp>740    constexpr bool numeric_limits<volatile _Tp>::is_modulo;741template <class _Tp>742    constexpr bool numeric_limits<volatile _Tp>::traps;743template <class _Tp>744    constexpr bool numeric_limits<volatile _Tp>::tinyness_before;745template <class _Tp>746    constexpr float_round_style numeric_limits<volatile _Tp>::round_style;747 748template <class _Tp>749class _LIBCUDACXX_TEMPLATE_VIS numeric_limits<const volatile _Tp>750    : private numeric_limits<_Tp>751{752    typedef numeric_limits<_Tp> __base;753    typedef _Tp type;754public:755    static constexpr bool is_specialized = __base::is_specialized;756    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type min() noexcept {return __base::min();}757    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type max() noexcept {return __base::max();}758    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type lowest() noexcept {return __base::lowest();}759 760    static constexpr int  digits = __base::digits;761    static constexpr int  digits10 = __base::digits10;762    static constexpr int  max_digits10 = __base::max_digits10;763    static constexpr bool is_signed = __base::is_signed;764    static constexpr bool is_integer = __base::is_integer;765    static constexpr bool is_exact = __base::is_exact;766    static constexpr int  radix = __base::radix;767    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type epsilon() noexcept {return __base::epsilon();}768    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type round_error() noexcept {return __base::round_error();}769 770    static constexpr int  min_exponent = __base::min_exponent;771    static constexpr int  min_exponent10 = __base::min_exponent10;772    static constexpr int  max_exponent = __base::max_exponent;773    static constexpr int  max_exponent10 = __base::max_exponent10;774 775    static constexpr bool has_infinity = __base::has_infinity;776    static constexpr bool has_quiet_NaN = __base::has_quiet_NaN;777    static constexpr bool has_signaling_NaN = __base::has_signaling_NaN;778    static constexpr float_denorm_style has_denorm = __base::has_denorm;779    static constexpr bool has_denorm_loss = __base::has_denorm_loss;780    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type infinity() noexcept {return __base::infinity();}781    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type quiet_NaN() noexcept {return __base::quiet_NaN();}782    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type signaling_NaN() noexcept {return __base::signaling_NaN();}783    _LIBCUDACXX_INLINE_VISIBILITY static constexpr type denorm_min() noexcept {return __base::denorm_min();}784 785    static constexpr bool is_iec559 = __base::is_iec559;786    static constexpr bool is_bounded = __base::is_bounded;787    static constexpr bool is_modulo = __base::is_modulo;788 789    static constexpr bool traps = __base::traps;790    static constexpr bool tinyness_before = __base::tinyness_before;791    static constexpr float_round_style round_style = __base::round_style;792};793 794template <class _Tp>795    constexpr bool numeric_limits<const volatile _Tp>::is_specialized;796template <class _Tp>797    constexpr int numeric_limits<const volatile _Tp>::digits;798template <class _Tp>799    constexpr int numeric_limits<const volatile _Tp>::digits10;800template <class _Tp>801    constexpr int numeric_limits<const volatile _Tp>::max_digits10;802template <class _Tp>803    constexpr bool numeric_limits<const volatile _Tp>::is_signed;804template <class _Tp>805    constexpr bool numeric_limits<const volatile _Tp>::is_integer;806template <class _Tp>807    constexpr bool numeric_limits<const volatile _Tp>::is_exact;808template <class _Tp>809    constexpr int numeric_limits<const volatile _Tp>::radix;810template <class _Tp>811    constexpr int numeric_limits<const volatile _Tp>::min_exponent;812template <class _Tp>813    constexpr int numeric_limits<const volatile _Tp>::min_exponent10;814template <class _Tp>815    constexpr int numeric_limits<const volatile _Tp>::max_exponent;816template <class _Tp>817    constexpr int numeric_limits<const volatile _Tp>::max_exponent10;818template <class _Tp>819    constexpr bool numeric_limits<const volatile _Tp>::has_infinity;820template <class _Tp>821    constexpr bool numeric_limits<const volatile _Tp>::has_quiet_NaN;822template <class _Tp>823    constexpr bool numeric_limits<const volatile _Tp>::has_signaling_NaN;824template <class _Tp>825    constexpr float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;826template <class _Tp>827    constexpr bool numeric_limits<const volatile _Tp>::has_denorm_loss;828template <class _Tp>829    constexpr bool numeric_limits<const volatile _Tp>::is_iec559;830template <class _Tp>831    constexpr bool numeric_limits<const volatile _Tp>::is_bounded;832template <class _Tp>833    constexpr bool numeric_limits<const volatile _Tp>::is_modulo;834template <class _Tp>835    constexpr bool numeric_limits<const volatile _Tp>::traps;836template <class _Tp>837    constexpr bool numeric_limits<const volatile _Tp>::tinyness_before;838template <class _Tp>839    constexpr float_round_style numeric_limits<const volatile _Tp>::round_style;840 841_LIBCUDACXX_END_NAMESPACE_STD842 843#ifndef __cuda_std__844#include <__pragma_pop>845#endif //__cuda_std__846 847#endif  // _LIBCUDACXX_LIMITS848 
codekingpro/portable-devtools · Team Ai