diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-08-21 10:48:21 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-08-21 10:48:21 +0000 |
commit | 1e8ef6c06fd23e593f67fb5b8e4bb89eb657e8d6 (patch) | |
tree | 1a442e568557c21d2a2bc78bbf6d3d68cd1fa671 | |
parent | 833b5f1a04b3137b403a01835d1685576a24bac5 (diff) |
Add floor builtin. Patch by Cassie Epps!
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@162273 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | generic/include/clc/clc.h | 1 | ||||
-rw-r--r-- | generic/include/clc/math/floor.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h index 8b41523..4f49760 100644 --- a/generic/include/clc/clc.h +++ b/generic/include/clc/clc.h @@ -36,6 +36,7 @@ #include <clc/math/exp.h> #include <clc/math/exp2.h> #include <clc/math/fabs.h> +#include <clc/math/floor.h> #include <clc/math/fma.h> #include <clc/math/hypot.h> #include <clc/math/log.h> diff --git a/generic/include/clc/math/floor.h b/generic/include/clc/math/floor.h new file mode 100644 index 0000000..abb7c2a --- /dev/null +++ b/generic/include/clc/math/floor.h @@ -0,0 +1,6 @@ +#undef floor +#define floor __clc_floor + +#define FUNCTION __clc_floor +#define INTRINSIC "llvm.floor" +#include <clc/math/unary_intrin.inc> |