[libc-commits] [PATCH] D152575: Added modf for NVPTX and AMDGPU targets to implement 'libmgpu.a' for math on the GPU
Jon Chesterfield via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 14 11:43:19 PDT 2023
JonChesterfield added inline comments.
================
Comment at: libc/src/math/gpu/vendor/nvptx/nvptx.h:19
+LIBC_INLINE double modf(double x, double *iptr) { return __nv_modf(x, iptr); }
+LIBC_INLINE float modff(float x, float *iptr) { return __nv_modff(x, iptr); }
----------------
Why is this stuff all in a header? It means it has to be different for different targets even though the interface is the same.
I was hoping for `float remainderf(float x, float y);` in a header and the nvptx specific implementation in a source file
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152575/new/
https://reviews.llvm.org/D152575
More information about the libc-commits
mailing list