trunc: Remove llvm intrinsic from the header.

Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356018
This commit is contained in:
Jan Vesely 2019-03-13 07:06:10 +00:00
parent 1c395b74bf
commit ee555aa992
3 changed files with 15 additions and 6 deletions

View File

@ -1,9 +1,7 @@
#undef trunc
#define trunc __clc_trunc
#define __CLC_BODY <clc/math/unary_decl.inc>
#define __CLC_FUNCTION trunc
#define __CLC_FUNCTION __clc_trunc
#define __CLC_INTRINSIC "llvm.trunc"
#include <clc/math/unary_intrin.inc>
#include <clc/math/gentype.inc>
#undef __CLC_BODY
#undef __CLC_FUNCTION
#undef __CLC_INTRINSIC

View File

@ -189,6 +189,7 @@ math/tanh.cl
math/clc_tanpi.cl
math/tanpi.cl
math/tgamma.cl
math/trunc.cl
misc/shuffle.cl
misc/shuffle2.cl
relational/all.cl

View File

@ -0,0 +1,10 @@
#include <clc/clc.h>
// Map the llvm intrinsic to an OpenCL function.
#define __CLC_FUNCTION __clc_trunc
#define __CLC_INTRINSIC "llvm.trunc"
#include <clc/math/unary_intrin.inc>
#undef __CLC_FUNCTION
#define __CLC_FUNCTION trunc
#include "unary_builtin.inc"