diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-10-08 19:34:00 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-10-08 19:34:00 +0000 |
commit | 80bb52ae750f1d9f5e82e40c61a1000d3d38eb42 (patch) | |
tree | 582edff5149ada22e595c803b5d4dcd9d63bbe5e /libclc/ptx | |
parent | 1de1444d6254604b5d410ae81e09e32e56cc7a95 (diff) | |
download | llvm-80bb52ae750f1d9f5e82e40c61a1000d3d38eb42.tar.gz |
ptx: Use __clc_nextafter to implement nextafter
using clang builtin results in external library call
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 315191
Diffstat (limited to 'libclc/ptx')
-rw-r--r-- | libclc/ptx/lib/SOURCES | 1 | ||||
-rw-r--r-- | libclc/ptx/lib/math/nextafter.cl | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libclc/ptx/lib/SOURCES b/libclc/ptx/lib/SOURCES new file mode 100644 index 000000000000..ff5bff2cea54 --- /dev/null +++ b/libclc/ptx/lib/SOURCES @@ -0,0 +1 @@ +math/nextafter.cl diff --git a/libclc/ptx/lib/math/nextafter.cl b/libclc/ptx/lib/math/nextafter.cl new file mode 100644 index 000000000000..5b4521d21c26 --- /dev/null +++ b/libclc/ptx/lib/math/nextafter.cl @@ -0,0 +1,10 @@ +#include <clc/clc.h> +#include "../lib/clcmacro.h" +#include <math/clc_nextafter.h> + +_CLC_DEFINE_BINARY_BUILTIN(float, nextafter, __clc_nextafter, float, float) + +#ifdef cl_khr_fp64 +#pragma OPENCL EXTENSION cl_khr_fp64 : enable +_CLC_DEFINE_BINARY_BUILTIN(double, nextafter, __clc_nextafter, double, double) +#endif |