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
This commit is contained in:
Jan Vesely 2017-10-08 19:34:00 +00:00
parent 1de1444d62
commit 80bb52ae75
2 changed files with 11 additions and 0 deletions

1
libclc/ptx/lib/SOURCES Normal file
View File

@ -0,0 +1 @@
math/nextafter.cl

View File

@ -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