Skip to content

Commit

Permalink
rint: Remove llvm intrinsic from the header.
Browse files Browse the repository at this point in the history
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356016
  • Loading branch information
jvesely committed Mar 13, 2019
1 parent fd199f0 commit b3d64e4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libclc/generic/include/clc/math/rint.h
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions libclc/generic/lib/SOURCES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions libclc/generic/lib/math/rint.cl
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit b3d64e4

Please sign in to comment.