[PATCH] D84476: Make hip math headers easier to use from C

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 10:40:54 PDT 2020


yaxunl added inline comments.


================
Comment at: clang/lib/Headers/__clang_hip_math.h:98
 // BEGIN FLOAT
+#ifdef _cplusplus
 __DEVICE__
----------------
typo ?


================
Comment at: clang/lib/Headers/__clang_hip_math.h:558
 // BEGIN DOUBLE
+#ifdef _cplusplus
 __DEVICE__
----------------
typo


================
Comment at: clang/lib/Headers/__clang_hip_math.h:561
 inline double abs(double __x) { return __ocml_fabs_f64(__x); }
+#endif
 __DEVICE__
----------------
jdoerfert wrote:
> Nit: You mix the C and C++ math declarations in this file, while possible, I somehow thing the cuda_{cmath/math} split is nicer.
right


================
Comment at: clang/lib/Headers/__clang_hip_math.h:1185
 
+#ifdef _cplusplus
 __DEVICE__
----------------
typo


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84476





More information about the cfe-commits mailing list