stdgpu/limits.h Source File — stdgpu Latest documentation (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef STDGPU_LIMITS_H
17#define STDGPU_LIMITS_H
18
28#include
29#include
30
33
34namespace stdgpu
35{
36
42template
44{
51
58
65
72
79
86
91
96
101
106
111
115 static constexpr int radix = 0;
116};
117
122template <>
124{
131
138
145
152
159
166
171
176
181
186
191
195 static constexpr int radix = 2;
196};
197
202template <>
204{
211
218
225
232
239
246
251
256 static constexpr bool is_signed = (static_cast<char>(-1) < 0);
257
262
267
272
276 static constexpr int radix = 2;
277};
278
283template <>
285{
292
299
306
313
320
327
332
337
342
347
351 static constexpr int digits = CHAR_BIT - 1;
352
356 static constexpr int radix = 2;
357};
358
363template <>
365{
372
379
386
393
400
407
412
417
422
427
431 static constexpr int digits = CHAR_BIT;
432
436 static constexpr int radix = 2;
437};
438
443template <>
445{
452
459
466
473
480
487
492
498 static constexpr bool is_signed = (static_cast<wchar_t>(-1) < 0);
499
504
509
514
518 static constexpr int radix = 2;
519};
520
525template <>
527{
534
541
548
555
562
569
574
579
584
589
593 static constexpr int digits = CHAR_BIT * sizeof(char16_t);
594
598 static constexpr int radix = 2;
599};
600
605template <>
607{
614
621
628
635
642
649
654
659
664
669
673 static constexpr int digits = CHAR_BIT * sizeof(char32_t);
674
678 static constexpr int radix = 2;
679};
680
685template <>
687{
694
701
708
715
722
729
734
739
744
749
753 static constexpr int digits = CHAR_BIT * sizeof(short) - 1;
754
758 static constexpr int radix = 2;
759};
760
765template <>
767{
774
781
788
795
802
809
814
819
824
829
833 static constexpr int digits = CHAR_BIT * sizeof(unsigned short);
834
838 static constexpr int radix = 2;
839};
840
845template <>
847{
854
861
868
875
882
889
894
899
904
909
913 static constexpr int digits = CHAR_BIT * sizeof(int) - 1;
914
918 static constexpr int radix = 2;
919};
920
925template <>
927{
934
941
948
955
962
969
974
979
984
989
993 static constexpr int digits = CHAR_BIT * sizeof(unsigned int);
994
998 static constexpr int radix = 2;
999};
1000
1005template <>
1007{
1014
1021
1028
1035
1042
1049
1054
1059
1064
1069
1073 static constexpr int digits = CHAR_BIT * sizeof(long) - 1;
1074
1079};
1080
1085template <>
1087{
1094
1101
1108
1115
1122
1129
1134
1139
1144
1149
1153 static constexpr int digits = CHAR_BIT * sizeof(unsigned long);
1154
1159};
1160
1165template <>
1167{
1174
1181
1188
1195
1202
1209
1214
1219
1224
1229
1233 static constexpr int digits = CHAR_BIT * sizeof(long long) - 1;
1234
1239};
1240
1245template <>
1247{
1254
1261
1268
1275
1282
1289
1294
1299
1304
1309
1313 static constexpr int digits = CHAR_BIT * sizeof(unsigned long long);
1314
1319};
1320
1325template <>
1327{
1334
1341
1348
1355
1362
1369
1374
1379
1384
1389
1393 static constexpr int digits = FLT_MANT_DIG;
1394
1398 static constexpr int radix = FLT_RADIX;
1399};
1400
1405template <>
1407{
1414
1421
1428
1435
1442
1449
1454
1459
1464
1469
1473 static constexpr int digits = DBL_MANT_DIG;
1474
1478 static constexpr int radix = FLT_RADIX;
1479};
1480
1485template <>
1487{
1494
1501
1508
1515
1522
1529
1534
1539
1544
1549
1553 static constexpr int digits = LDBL_MANT_DIG;
1554
1558 static constexpr int radix = FLT_RADIX;
1559};
1560
1561}
1562
1563#include <stdgpu/impl/limits_detail.h>
1564
1565#endif
#define STDGPU_HOST_DEVICE
Platform-independent host device function annotation.
Definition: platform.h:77
static constexpr STDGPU_HOST_DEVICE bool min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE char16_t min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE char32_t min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE char min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE double min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE float min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE int min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE long min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE long double min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE long long min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE short min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE signed char min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE unsigned char min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE unsigned int min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE unsigned long min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE unsigned long long min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE unsigned short min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE wchar_t min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE T min() noexcept
Smallest representable finite value.
static constexpr STDGPU_HOST_DEVICE T lowest() noexcept
Lowest representable finite value.
static constexpr STDGPU_HOST_DEVICE T infinity() noexcept
Infinity value.
static constexpr STDGPU_HOST_DEVICE T max() noexcept
Largest representable finite value.
static constexpr STDGPU_HOST_DEVICE T round_error() noexcept
Maximum round error.
static constexpr STDGPU_HOST_DEVICE T epsilon() noexcept
Machine epsilon.
Generic traits.
Definition: limits.h:44
static constexpr int digits
Number of radix digits.
Definition: limits.h:110
static constexpr int radix
Integer base.
Definition: limits.h:115
static constexpr bool is_exact
Whether the type is exact.
Definition: limits.h:105
static constexpr bool is_specialized
Whether the traits of the type are specialized.
Definition: limits.h:90
static constexpr bool is_integer
Whether the type is an integer.
Definition: limits.h:100
static constexpr bool is_signed
Whether the type is signed.
Definition: limits.h:95