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

2020-07-24 Thread Jon Chesterfield via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG679158e662aa: Make hip math headers easier to use from C (authored by JonChesterfield). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84476/new/ https://rev

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

2020-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Comment at: clang/lib/Headers/__clang_hip_math.h:561 inline double abs(double __x) { return __ocml_fabs_f64(__x); } +#endif __DEVICE__ JonChe

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

2020-07-24 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield marked 4 inline comments as done. JonChesterfield added inline comments. Comment at: clang/lib/Headers/__clang_hip_math.h:561 inline double abs(double __x) { return __ocml_fabs_f64(__x); } +#endif __DEVICE__ yaxunl wrote: > jdoerfert wrote: > >

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

2020-07-24 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 280524. JonChesterfield added a comment. - Fix missing underscores Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84476/new/ https://reviews.llvm.org/D84476 Files: clang/lib/Headers/__clang_hip_libdev

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

2020-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
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__ ---

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

2020-07-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm fine with this @yaxunl should accept though. Comment at: clang/lib/Headers/__clang_hip_math.h:561 inline double abs(double __x) { return __ocml_fabs_f64(__x); } +#endif __DEVICE__ Nit: You mix the C and C++ math declarations in

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

2020-07-23 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield created this revision. JonChesterfield added a reviewer: yaxunl. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Make hip math headers easier to use from C Motivation is a step towards using the hip math headers t