diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2019-03-13 10:06:08 +0300 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2019-03-13 10:06:08 +0300 |
commit | 1c395b74bf6d7328a34ddf7633d647bc705c9e06 (patch) | |
tree | 4ec86257d17aaa5d396bc72cba4f1d1eae606ed3 /libclc | |
parent | b3d64e4a83e0de4f2ac1d498637432cf29c1c6a5 (diff) |
round: Remove llvm intrinsic from the header
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356017
Diffstat (limited to 'libclc')
-rw-r--r-- | libclc/generic/include/clc/math/round.h | 10 | ||||
-rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
-rw-r--r-- | libclc/generic/lib/math/round.cl | 10 |
3 files changed, 15 insertions, 6 deletions
diff --git a/libclc/generic/include/clc/math/round.h b/libclc/generic/include/clc/math/round.h index 43e16aed028f..cd76e34d287b 100644 --- a/libclc/generic/include/clc/math/round.h +++ b/libclc/generic/include/clc/math/round.h @@ -1,9 +1,7 @@ -#undef round -#define round __clc_round +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION round -#define __CLC_FUNCTION __clc_round -#define __CLC_INTRINSIC "llvm.round" -#include <clc/math/unary_intrin.inc> +#include <clc/math/gentype.inc> +#undef __CLC_BODY #undef __CLC_FUNCTION -#undef __CLC_INTRINSIC diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES index fa50f10264bf..a54aa8a02fbb 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -175,6 +175,7 @@ math/remquo.cl math/rint.cl math/clc_rootn.cl math/rootn.cl +math/round.cl math/sin.cl math/sincos.cl math/sincos_helpers.cl diff --git a/libclc/generic/lib/math/round.cl b/libclc/generic/lib/math/round.cl new file mode 100644 index 000000000000..285328aaa5d5 --- /dev/null +++ b/libclc/generic/lib/math/round.cl @@ -0,0 +1,10 @@ +#include <clc/clc.h> + +// Map the llvm intrinsic to an OpenCL function. +#define __CLC_FUNCTION __clc_round +#define __CLC_INTRINSIC "llvm.round" +#include <clc/math/unary_intrin.inc> + +#undef __CLC_FUNCTION +#define __CLC_FUNCTION round +#include "unary_builtin.inc" |