Skip to content

Commit 80bb52a

Browse files
committed
ptx: Use __clc_nextafter to implement nextafter
using clang builtin results in external library call Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <[email protected]> llvm-svn: 315191
1 parent 1de1444 commit 80bb52a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libclc/ptx/lib/SOURCES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
math/nextafter.cl

libclc/ptx/lib/math/nextafter.cl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <clc/clc.h>
2+
#include "../lib/clcmacro.h"
3+
#include <math/clc_nextafter.h>
4+
5+
_CLC_DEFINE_BINARY_BUILTIN(float, nextafter, __clc_nextafter, float, float)
6+
7+
#ifdef cl_khr_fp64
8+
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
9+
_CLC_DEFINE_BINARY_BUILTIN(double, nextafter, __clc_nextafter, double, double)
10+
#endif

0 commit comments

Comments
 (0)