[PATCH] D61399: [OpenMP][Clang] Support for target math functions

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 08:45:37 PDT 2019


gtbercea marked 2 inline comments as done.
gtbercea added inline comments.


================
Comment at: lib/Headers/__clang_cuda_cmath.h:54
 __DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); }
+#ifndef _OPENMP
 __DEVICE__ int fpclassify(float __x) {
----------------
ABataev wrote:
> Why we have this guard here? It does not work for OpenMP? Why?
Because all the FP_XXX macros are defined in cmath and for OpenMP we can't include it yet because we don't support variant yet.


================
Comment at: lib/Headers/__clang_cuda_device_functions.h:49
+#if defined(__cplusplus)
 __DEVICE__ void __brkpt(int __a) { __brkpt(); }
+#endif
----------------
ABataev wrote:
> Can we do anything with this in ะก mode? I mean, to allow it in C.
We can if we rename the function.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61399/new/

https://reviews.llvm.org/D61399





More information about the cfe-commits mailing list