[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361066: [OpenMP][bugfix] Add missing math functions variants for log and abs. (authored by gbercea, committed by ). Changed prior to commit: https://reviews.llvm.org/D62046?vs=200048=200076#toc

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. I'd add a comment with a brief explanation for the const variant and a TODO() to remove it. Looks OK to me otherwise. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @tra I eliminated the long double definition for log and only left the declaration. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62046/new/ https://reviews.llvm.org/D62046 ___ cfe-commits

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 200048. gtbercea added a comment. - update patch Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62046/new/ https://reviews.llvm.org/D62046 Files: lib/Headers/__clang_cuda_cmath.h

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This LGTM me, @tra or @efriedma any objections? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62046/new/ https://reviews.llvm.org/D62046 ___ cfe-commits mailing list

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:55-56 +#if defined(_OPENMP) && defined(__cplusplus) +__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); } +__DEVICE__ const double abs(const double __x) { return

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:55-56 +#if defined(_OPENMP) && defined(__cplusplus) +__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); } +__DEVICE__ const double abs(const double __x) { return

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/Headers/__clang_cuda_device_functions.h:1604 +#if defined(_OPENMP) && defined(__cplusplus) +__DEVICE__ double log(long double __a) { return __nv_log((double)__a); } +#endif

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:55-56 +#if defined(_OPENMP) && defined(__cplusplus) +__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); } +__DEVICE__ const double

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:55-56 +#if defined(_OPENMP) && defined(__cplusplus) +__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); } +__DEVICE__ const double abs(const double __x) { return ::fabs((double)__x); }

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. gtbercea added reviewers: jdoerfert, hfinkel, tra, caomhin. Herald added subscribers: cfe-commits, guansong. Herald added a project: clang. When including the random header in C++, some of the math functions it relies on are not present in the CUDA headers. We