rint: Remove llvm intrinsic from the header.

Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356016
This commit is contained in:
Jan Vesely 2019-03-13 07:06:06 +00:00
parent fd199f0139
commit b3d64e4a83
3 changed files with 17 additions and 5 deletions

View File

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

View File

@ -172,6 +172,7 @@ math/clc_remainder.cl
math/remainder.cl
math/clc_remquo.cl
math/remquo.cl
math/rint.cl
math/clc_rootn.cl
math/rootn.cl
math/sin.cl

View File

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