[PATCH] D89971: [OpenMP][CUDA] Add missing overload for `remquo(float,float,int*)`

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 09:42:04 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: JonChesterfield, ye-luo, tra, yaxunl.
Herald added subscribers: guansong, bollu.
Herald added a project: clang.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.

Reported by Colleen Bertoni <bertoni at anl.gov> after running the OvO test
suite: https://github.com/TApplencourt/OvO/

The template overload is still hidden behind an ifdef for OpenMP. In the
future we probably want to remove the ifdef but that requires further
testing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89971

Files:
  clang/lib/Headers/__clang_cuda_cmath.h


Index: clang/lib/Headers/__clang_cuda_cmath.h
===================================================================
--- clang/lib/Headers/__clang_cuda_cmath.h
+++ clang/lib/Headers/__clang_cuda_cmath.h
@@ -174,6 +174,9 @@
 __DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); }
 __DEVICE__ float tan(float __x) { return ::tanf(__x); }
 __DEVICE__ float tanh(float __x) { return ::tanhf(__x); }
+__DEVICE__ float remquo(float __n, float __d, int *__q) {
+  return ::remquof(__n, __d, __q);
+}
 
 // Notably missing above is nexttoward.  We omit it because
 // libdevice doesn't provide an implementation, and we don't want to be in the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89971.300020.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201022/f3cb28ab/attachment.bin>


More information about the cfe-commits mailing list