diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-10-08 03:39:21 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-10-08 03:39:21 +0000 |
commit | 14e5a4f2116dd512d3bd6489d55760aa487cc3dd (patch) | |
tree | 8bfe75f4ad9455b3107c4a71a6cea00d3ed8f920 /generic/include | |
parent | 5c2bfa665589a07301860bb2da3912ce5a8323db (diff) |
Implement any() builtin. Patch by Tom Stellard!
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@165386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'generic/include')
-rw-r--r-- | generic/include/clc/clc.h | 1 | ||||
-rw-r--r-- | generic/include/clc/relational/any.h | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h index fc41f76..315693b 100644 --- a/generic/include/clc/clc.h +++ b/generic/include/clc/clc.h @@ -69,6 +69,7 @@ #include <clc/geometric/normalize.h> /* 6.11.6 Relational Functions */ +#include <clc/relational/any.h> #include <clc/relational/select.h> /* 6.11.8 Synchronization Functions */ diff --git a/generic/include/clc/relational/any.h b/generic/include/clc/relational/any.h new file mode 100644 index 0000000..4687ed2 --- /dev/null +++ b/generic/include/clc/relational/any.h @@ -0,0 +1,16 @@ + +#define _CLC_ANY_DECL(TYPE) \ + _CLC_OVERLOAD _CLC_DECL int any(TYPE v); + +#define _CLC_VECTOR_ANY_DECL(TYPE) \ + _CLC_ANY_DECL(TYPE) \ + _CLC_ANY_DECL(TYPE##2) \ + _CLC_ANY_DECL(TYPE##3) \ + _CLC_ANY_DECL(TYPE##4) \ + _CLC_ANY_DECL(TYPE##8) \ + _CLC_ANY_DECL(TYPE##16) + +_CLC_VECTOR_ANY_DECL(char) +_CLC_VECTOR_ANY_DECL(short) +_CLC_VECTOR_ANY_DECL(int) +_CLC_VECTOR_ANY_DECL(long) |