[Beignet] [PATCH] add built-in function "isordered", "isunordered"
Zhigang Gong
zhigang.gong at linux.intel.com
Sun Jul 28 22:14:18 PDT 2013
LGTM, pushed, thanks.
On Mon, Jul 29, 2013 at 10:25:18AM +0800, Homer Hsing wrote:
>
> Signed-off-by: Homer Hsing <homer.xing at intel.com>
> ---
> backend/src/ocl_stdlib.tmpl.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h
> index 003eedc..0a3ebf6 100644
> --- a/backend/src/ocl_stdlib.tmpl.h
> +++ b/backend/src/ocl_stdlib.tmpl.h
> @@ -204,6 +204,8 @@ INLINE_OVERLOADABLE int isfinite(float x) { return __builtin_isfinite(x); }
> INLINE_OVERLOADABLE int isinf(float x) { return __builtin_isinf(x); }
> INLINE_OVERLOADABLE int isnan(float x) { return __builtin_isnan(x); }
> INLINE_OVERLOADABLE int isnormal(float x) { return __builtin_isnormal(x); }
> +INLINE_OVERLOADABLE int isordered(float x, float y) { return isequal(x, x) && isequal(y, y); }
> +INLINE_OVERLOADABLE int isunordered(float x, float y) { return isnan(x) || isnan(y); }
> INLINE_OVERLOADABLE int signbit(float x) { return __builtin_signbit(x); }
>
> #define DEC1(type) INLINE_OVERLOADABLE int any(type a) { return a<0; }
> --
> 1.8.1.2
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list