Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit d2caf9d

Browse files
nicolasvasilacheftynse
authored andcommitted
Reconcile builtins and cuda
`tc/lang/builtins.h` and `tc/core/cuda/cuda_libraries.h` do not have the same functions listed. The minimal change is to include the cuda header `math_functions.hpp` which contains all the proper overloads.
1 parent 6a38863 commit d2caf9d

File tree

1 file changed

+1
-91
lines changed

1 file changed

+1
-91
lines changed

tc/core/cuda/cuda_libraries.h

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -49,97 +49,7 @@ __device__ void __syncwarp(unsigned mask = 0xFFFFFFFF) {}
4949
)C";
5050

5151
constexpr auto mathFunctionDecl = R"C(
52-
53-
// BEGIN MATH FUNCTIONS FROM CUDA
54-
float acosf ( float x );
55-
float acoshf ( float x );
56-
float asinf ( float x );
57-
float asinhf ( float x );
58-
float atan2f ( float y, float x );
59-
float atanf ( float x );
60-
float atanhf ( float x );
61-
float cbrtf ( float x );
62-
float ceilf ( float x );
63-
float copysignf ( float x, float y );
64-
float cosf ( float x );
65-
float coshf ( float x );
66-
float cospif ( float x );
67-
float cyl_bessel_i0f ( float x );
68-
float cyl_bessel_i1f ( float x );
69-
float erfcf ( float x );
70-
float erfcinvf ( float y );
71-
float erfcxf ( float x );
72-
float erff ( float x );
73-
float erfinvf ( float y );
74-
float exp10f ( float x );
75-
float exp2f ( float x );
76-
float expf ( float x );
77-
float expm1f ( float x );
78-
float fabsf ( float x );
79-
float fdimf ( float x, float y );
80-
float fdividef ( float x, float y );
81-
float floorf ( float x );
82-
float fmaf ( float x, float y, float z );
83-
float fmaxf ( float x, float y );
84-
float fminf ( float x, float y );
85-
float fmodf ( float x, float y );
86-
//float frexpf ( float x, int* nptr );
87-
float hypotf ( float x, float y );
88-
//int ilogbf ( float x );
89-
//__RETURN_TYPE isfinite ( float a );
90-
//__RETURN_TYPE isinf ( float a );
91-
//__RETURN_TYPE isnan ( float a );
92-
float j0f ( float x );
93-
float j1f ( float x );
94-
//float jnf ( int n, float x );
95-
//float ldexpf ( float x, int exp );
96-
float lgammaf ( float x );
97-
//long long int llrintf ( float x );
98-
//long long int llroundf ( float x );
99-
float log10f ( float x );
100-
float log1pf ( float x );
101-
float log2f ( float x );
102-
float logbf ( float x );
103-
float logf ( float x );
104-
//long int lrintf ( float x );
105-
//long int lroundf ( float x );
106-
//float modff ( float x, float* iptr );
107-
//float nanf ( const char* tagp );
108-
//float nearbyintf ( float x );
109-
float nextafterf ( float x, float y );
110-
float norm3df ( float a, float b, float c );
111-
float norm4df ( float a, float b, float c, float d );
112-
float normcdff ( float y );
113-
float normcdfinvf ( float y );
114-
//float normf ( int dim, const float* a );
115-
float powf ( float x, float y );
116-
float rcbrtf ( float x );
117-
float remainderf ( float x, float y );
118-
//float remquof ( float x, float y, int* quo );
119-
float rhypotf ( float x, float y );
120-
//float rintf ( float x );
121-
float rnorm3df ( float a, float b, float c );
122-
float rnorm4df ( float a, float b, float c, float d );
123-
//float rnormf ( int dim, const float* a );
124-
float roundf ( float x );
125-
float rsqrtf ( float x );
126-
//float scalblnf ( float x, long int n );
127-
//float scalbnf ( float x, int n );
128-
//__RETURN_TYPE signbit ( float a );
129-
//void sincosf ( float x, float* sptr, float* cptr );
130-
//void sincospif ( float x, float* sptr, float* cptr );
131-
float sinf ( float x );
132-
float sinhf ( float x );
133-
float sinpif ( float x );
134-
float sqrtf ( float x );
135-
float tanf ( float x );
136-
float tanhf ( float x );
137-
float tgammaf ( float x );
138-
float truncf ( float x );
139-
float y0f ( float x );
140-
float y1f ( float x );
141-
//float ynf ( int n, float x );
142-
// END MATH FUNCTIONS FROM CUDA
52+
#include \"math_functions.hpp\"
14353
)C";
14454

14555
} // namespace c

0 commit comments

Comments
 (0)