authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-12-04 15:39:16-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-12-04 17:25:55-07:00
log48c8948f49c2084365776cd9e9624162021e5ec7
tree99a0530824b38c6495b1868fdeaf2c7e554cf818
parentf385419259d2d322263cf7dc9393d2cb5797eb17

update to latest clang C headers


3 files changed, 7 insertions(+), 3 deletions(-)

lib/include/__clang_cuda_complex_builtins.h+3-3
...@@ -16,7 +16,7 @@...@@ -16,7 +16,7 @@
16// to work with CUDA and OpenMP target offloading [in C and C++ mode].)16// to work with CUDA and OpenMP target offloading [in C and C++ mode].)
1717
18#pragma push_macro("__DEVICE__")18#pragma push_macro("__DEVICE__")
19#ifdef _OPENMP19#ifdef __OPENMP_NVPTX__
20#pragma omp declare target20#pragma omp declare target
21#define __DEVICE__ __attribute__((noinline, nothrow, cold, weak))21#define __DEVICE__ __attribute__((noinline, nothrow, cold, weak))
22#else22#else
...@@ -26,7 +26,7 @@...@@ -26,7 +26,7 @@
26// To make the algorithms available for C and C++ in CUDA and OpenMP we select26// To make the algorithms available for C and C++ in CUDA and OpenMP we select
27// different but equivalent function versions. TODO: For OpenMP we currently27// different but equivalent function versions. TODO: For OpenMP we currently
28// select the native builtins as the overload support for templates is lacking.28// select the native builtins as the overload support for templates is lacking.
29#if !defined(_OPENMP)29#if !defined(__OPENMP_NVPTX__)
30#define _ISNANd std::isnan30#define _ISNANd std::isnan
31#define _ISNANf std::isnan31#define _ISNANf std::isnan
32#define _ISINFd std::isinf32#define _ISINFd std::isinf
...@@ -250,7 +250,7 @@ __DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) {...@@ -250,7 +250,7 @@ __DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) {
250#undef _LOGBd250#undef _LOGBd
251#undef _LOGBf251#undef _LOGBf
252252
253#ifdef _OPENMP253#ifdef __OPENMP_NVPTX__
254#pragma omp end declare target254#pragma omp end declare target
255#endif255#endif
256256
lib/include/openmp_wrappers/complex+2
...@@ -18,7 +18,9 @@...@@ -18,7 +18,9 @@
18#include <cmath>18#include <cmath>
1919
20#define __CUDA__20#define __CUDA__
21#define __OPENMP_NVPTX__
21#include <__clang_cuda_complex_builtins.h>22#include <__clang_cuda_complex_builtins.h>
23#undef __OPENMP_NVPTX__
22#endif24#endif
2325
24// Grab the host header too.26// Grab the host header too.
lib/include/openmp_wrappers/complex.h+2
...@@ -18,7 +18,9 @@...@@ -18,7 +18,9 @@
18#include <math.h>18#include <math.h>
1919
20#define __CUDA__20#define __CUDA__
21#define __OPENMP_NVPTX__
21#include <__clang_cuda_complex_builtins.h>22#include <__clang_cuda_complex_builtins.h>
23#undef __OPENMP_NVPTX__
22#endif24#endif
2325
24// Grab the host header too.26// Grab the host header too.