Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
math_constants.h153 linesDownload Raw Back to include
1/*
2 * Copyright 1993-2021 NVIDIA Corporation.  All rights reserved.
3 *
4 * NOTICE TO LICENSEE:
5 *
6 * This source code and/or documentation ("Licensed Deliverables") are
7 * subject to NVIDIA intellectual property rights under U.S. and
8 * international Copyright laws.
9 *
10 * These Licensed Deliverables contained herein is PROPRIETARY and
11 * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12 * conditions of a form of NVIDIA software license agreement by and
13 * between NVIDIA and Licensee ("License Agreement") or electronically
14 * accepted by Licensee.  Notwithstanding any terms or conditions to
15 * the contrary in the License Agreement, reproduction or disclosure
16 * of the Licensed Deliverables to any third party without the express
17 * written consent of NVIDIA is prohibited.
18 *
19 * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20 * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21 * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE.  IT IS
22 * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23 * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24 * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25 * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26 * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27 * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28 * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32 * OF THESE LICENSED DELIVERABLES.
33 *
34 * U.S. Government End Users.  These Licensed Deliverables are a
35 * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36 * 1995), consisting of "commercial computer software" and "commercial
37 * computer software documentation" as such terms are used in 48
38 * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39 * only as a commercial end item.  Consistent with 48 C.F.R.12.212 and
40 * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41 * U.S. Government End Users acquire the Licensed Deliverables with
42 * only those rights set forth herein.
43 *
44 * Any use of the Licensed Deliverables in individual and commercial
45 * software must include, in the user documentation and internal
46 * comments to the code, the above Disclaimer and U.S. Government End
47 * Users Notice.
48 */
49
50#if !defined(__MATH_CONSTANTS_H__)
51#define __MATH_CONSTANTS_H__
52
53/* single precision constants */
54#define CUDART_INF_F            __int_as_float(0x7f800000U)
55#define CUDART_NAN_F            __int_as_float(0x7fffffffU)
56#define CUDART_MIN_DENORM_F     __int_as_float(0x00000001U)
57#define CUDART_MAX_NORMAL_F     __int_as_float(0x7f7fffffU)
58#define CUDART_NEG_ZERO_F       __int_as_float(0x80000000U)
59#define CUDART_ZERO_F           0.0F
60#define CUDART_ONE_F            1.0F
61#define CUDART_SQRT_HALF_F      0.707106781F
62#define CUDART_SQRT_HALF_HI_F   0.707106781F
63#define CUDART_SQRT_HALF_LO_F   1.210161749e-08F
64#define CUDART_SQRT_TWO_F       1.414213562F
65#define CUDART_THIRD_F          0.333333333F
66#define CUDART_PIO4_F           0.785398163F
67#define CUDART_PIO2_F           1.570796327F
68#define CUDART_3PIO4_F          2.356194490F
69#define CUDART_2_OVER_PI_F      0.636619772F
70#define CUDART_SQRT_2_OVER_PI_F 0.797884561F
71#define CUDART_PI_F             3.141592654F
72#define CUDART_L2E_F            1.442695041F
73#define CUDART_L2T_F            3.321928094F
74#define CUDART_LG2_F            0.301029996F
75#define CUDART_LGE_F            0.434294482F
76#define CUDART_LN2_F            0.693147181F
77#define CUDART_LNT_F            2.302585093F
78#define CUDART_LNPI_F           1.144729886F
79#define CUDART_TWO_TO_M126_F    1.175494351e-38F
80#define CUDART_TWO_TO_126_F     8.507059173e37F
81#define CUDART_NORM_HUGE_F      3.402823466e38F
82#define CUDART_TWO_TO_23_F      8388608.0F
83#define CUDART_TWO_TO_24_F      16777216.0F
84#define CUDART_TWO_TO_31_F      2147483648.0F
85#define CUDART_TWO_TO_32_F      4294967296.0F
86#define CUDART_REMQUO_BITS_F    3U
87#define CUDART_REMQUO_MASK_F    (~((~0U)<<CUDART_REMQUO_BITS_F))
88#define CUDART_TRIG_PLOSS_F     105615.0F
89
90/* double precision constants */
91#define CUDART_INF              __longlong_as_double(0x7ff0000000000000ULL)
92#define CUDART_NAN              __longlong_as_double(0xfff8000000000000ULL)
93#define CUDART_NEG_ZERO         __longlong_as_double(0x8000000000000000ULL)
94#define CUDART_MIN_DENORM       __longlong_as_double(0x0000000000000001ULL)
95#define CUDART_ZERO             0.0
96#define CUDART_ONE              1.0
97#define CUDART_SQRT_TWO         1.4142135623730951e+0
98#define CUDART_SQRT_HALF        7.0710678118654757e-1
99#define CUDART_SQRT_HALF_HI     7.0710678118654757e-1
100#define CUDART_SQRT_HALF_LO   (-4.8336466567264567e-17)
101#define CUDART_THIRD            3.3333333333333333e-1
102#define CUDART_TWOTHIRD         6.6666666666666667e-1
103#define CUDART_PIO4             7.8539816339744828e-1
104#define CUDART_PIO4_HI          7.8539816339744828e-1
105#define CUDART_PIO4_LO          3.0616169978683830e-17
106#define CUDART_PIO2             1.5707963267948966e+0
107#define CUDART_PIO2_HI          1.5707963267948966e+0
108#define CUDART_PIO2_LO          6.1232339957367660e-17
109#define CUDART_3PIO4            2.3561944901923448e+0
110#define CUDART_2_OVER_PI        6.3661977236758138e-1
111#define CUDART_PI               3.1415926535897931e+0
112#define CUDART_PI_HI            3.1415926535897931e+0
113#define CUDART_PI_LO            1.2246467991473532e-16
114#define CUDART_SQRT_2PI         2.5066282746310007e+0
115#define CUDART_SQRT_2PI_HI      2.5066282746310007e+0
116#define CUDART_SQRT_2PI_LO    (-1.8328579980459167e-16)
117#define CUDART_SQRT_PIO2        1.2533141373155003e+0
118#define CUDART_SQRT_PIO2_HI     1.2533141373155003e+0
119#define CUDART_SQRT_PIO2_LO   (-9.1642899902295834e-17)
120#define CUDART_SQRT_2OPI        7.9788456080286536e-1
121#define CUDART_L2E              1.4426950408889634e+0
122#define CUDART_L2E_HI           1.4426950408889634e+0
123#define CUDART_L2E_LO           2.0355273740931033e-17
124#define CUDART_L2T              3.3219280948873622e+0
125#define CUDART_LG2              3.0102999566398120e-1
126#define CUDART_LG2_HI           3.0102999566398120e-1
127#define CUDART_LG2_LO         (-2.8037281277851704e-18)
128#define CUDART_LGE              4.3429448190325182e-1
129#define CUDART_LGE_HI           4.3429448190325182e-1
130#define CUDART_LGE_LO           1.09831965021676510e-17
131#define CUDART_LN2              6.9314718055994529e-1
132#define CUDART_LN2_HI           6.9314718055994529e-1
133#define CUDART_LN2_LO           2.3190468138462996e-17
134#define CUDART_LNT              2.3025850929940459e+0
135#define CUDART_LNT_HI           2.3025850929940459e+0
136#define CUDART_LNT_LO         (-2.1707562233822494e-16)
137#define CUDART_LNPI             1.1447298858494002e+0
138#define CUDART_LN2_X_1024       7.0978271289338397e+2
139#define CUDART_LN2_X_1025       7.1047586007394398e+2
140#define CUDART_LN2_X_1075       7.4513321910194122e+2
141#define CUDART_LG2_X_1024       3.0825471555991675e+2
142#define CUDART_LG2_X_1075       3.2360724533877976e+2
143#define CUDART_TWO_TO_23        8388608.0
144#define CUDART_TWO_TO_52        4503599627370496.0
145#define CUDART_TWO_TO_53        9007199254740992.0
146#define CUDART_TWO_TO_54        18014398509481984.0
147#define CUDART_TWO_TO_M54       5.5511151231257827e-17
148#define CUDART_TWO_TO_M1022     2.22507385850720140e-308
149#define CUDART_TRIG_PLOSS       2147483648.0
150#define CUDART_DBL2INT_CVT      6755399441055744.0
151
152#endif /* !__MATH_CONSTANTS_H__ */
153 
codekingpro/portable-devtools · Team Ai