Skip to content

Commit 54eb4d3

Browse files
committed
ceil: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 356013
1 parent 82c6c84 commit 54eb4d3

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#undef ceil
2-
#define ceil __clc_ceil
1+
#define __CLC_BODY <clc/math/unary_decl.inc>
2+
#define __CLC_FUNCTION ceil
33

4-
#define __CLC_FUNCTION __clc_ceil
5-
#define __CLC_INTRINSIC "llvm.ceil"
6-
#include <clc/math/unary_intrin.inc>
4+
#include <clc/math/gentype.inc>
5+
6+
#undef __CLC_BODY
7+
#undef __CLC_FUNCTION

libclc/generic/lib/SOURCES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ math/atan2pi.cl
8989
math/atanh.cl
9090
math/atanpi.cl
9191
math/cbrt.cl
92+
math/ceil.cl
9293
math/copysign.cl
9394
math/cos.cl
9495
math/cosh.cl

libclc/generic/lib/math/ceil.cl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <clc/clc.h>
2+
#include "../clcmacro.h"
3+
4+
// Map the llvm intrinsic to an OpenCL function.
5+
#define __CLC_FUNCTION __clc_ceil
6+
#define __CLC_INTRINSIC "llvm.ceil"
7+
#include <clc/math/unary_intrin.inc>
8+
9+
#undef __CLC_FUNCTION
10+
#define __CLC_FUNCTION ceil
11+
#include "unary_builtin.inc"

0 commit comments

Comments
 (0)