================
@@ -70,6 +70,9 @@ __DEVICE__ double floor(double);
 __DEVICE__ float floor(float);
 __DEVICE__ double fma(double, double, double);
 __DEVICE__ float fma(float, float, float);
+#ifdef _MSC_VER
+__DEVICE__ long double fma(long double, long double, long double);
----------------
emankov wrote:

That's right, CUDA has provided `long double fma` since 10.2 but for `HOST` 
only:

```cpp
inline _LIBCUDACXX_INLINE_VISIBILITY long double fma(long double __lcpp_x, long 
double __lcpp_y, long double __lcpp_z) _NOEXCEPT {return ::fmal(__lcpp_x, 
__lcpp_y, __lcpp_z);}
```

If a declaration of `device long double fma` is needed in order to parse it 
only and with disallowing its usage on GPU, then it is better to add it to 
`clang/lib/Headers/cuda_wrappers/cmath` under `_LIBCPP_STD_VER` and 
`_LIBCPP_HIDE_FROM_ABI`; and it would need a corresponding `GPU` test, of 
course.

https://github.com/llvm/llvm-project/pull/73756
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to