[Libclc-dev] [PATCH 2/7] Fix isnan definition for vector results
Aaron Watry
awatry at gmail.com
Tue Jul 15 15:24:46 PDT 2014
Vector true is -1, not 1, which means we need to use the relational unary
macro instead of the normal unary builtin one.
Signed-off-by: Aaron Watry <awatry at gmail.com>
---
generic/lib/relational/isnan.cl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/generic/lib/relational/isnan.cl b/generic/lib/relational/isnan.cl
index ab5d58a..f82dc5d 100644
--- a/generic/lib/relational/isnan.cl
+++ b/generic/lib/relational/isnan.cl
@@ -1,7 +1,7 @@
#include <clc/clc.h>
-#include "../clcmacro.h"
+#include "relational.h"
-_CLC_DEFINE_UNARY_BUILTIN(int, isnan, __builtin_isnan, float)
+_CLC_DEFINE_RELATIONAL_UNARY(int, isnan, __builtin_isnan, float)
#ifdef cl_khr_fp64
@@ -13,6 +13,6 @@ _CLC_DEF _CLC_OVERLOAD int isnan(double x) {
return __builtin_isnan(x);
}
-_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, long, isnan, double)
+_CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(long, isnan, double)
#endif
--
1.9.1
More information about the Libclc-dev
mailing list