Dimitry Andric f68ff1ac1c Add __isnan()/__isnanf() aliases for compatibility with glibc and CUDA
Even though clang comes with a number of internal CUDA wrapper headers,
compiling sample CUDA programs will result in errors similar to:

In file included from <built-in>:1:
In file included from /usr/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:204:
/usr/home/arr/cuda/var/cuda-repo-10-0-local-10.0.130-410.48/usr/local/cuda-10.0//include/crt/math_functions.hpp:2910:7: error: no matching function for call to '__isnan'
  if (__isnan(a)) {
      ^~~~~~~
/usr/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
__DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
               ^

CUDA expects __isnan() and __isnanf() declarations to be available,
which are glibc specific extensions, equivalent to the regular isnan()
and isnanf().

To provide these, define __isnan() and __isnanf() as aliases of the
already existing static inline functions __inline_isnan() and
__inline_isnanf() from math.h.

Reported by:	arrowd
PR:		241550
MFC after:	1 week
2019-11-02 16:59:53 +00:00
..
2017-02-28 23:42:47 +00:00
2019-04-26 15:43:14 +00:00
2017-12-08 22:06:18 +00:00
2017-05-23 06:53:31 +00:00
2016-08-04 11:38:53 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2019-08-01 18:51:06 +00:00
2017-02-28 23:42:47 +00:00
2017-05-23 06:56:57 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2018-08-07 15:24:19 +00:00
2017-02-28 23:42:47 +00:00
2017-05-23 09:29:05 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-04-26 14:28:27 +00:00
2017-02-28 23:42:47 +00:00
2017-02-04 00:37:25 +00:00
2017-02-28 23:42:47 +00:00
2018-02-27 10:55:33 +00:00
2017-02-28 23:42:47 +00:00
2019-07-17 19:41:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2016-10-11 11:46:02 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2018-08-17 14:37:13 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2019-09-03 04:16:30 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-12-06 22:06:48 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00