[Beignet] [PATCH 1/2] GBE: add some macros for atom_xxx builtin functions.
Lu, Guanqun
guanqun.lu at intel.com
Thu Aug 29 23:49:22 PDT 2013
typo: s/tes/test
> -----Original Message-----
> From: beignet-bounces+guanqun.lu=intel.com at lists.freedesktop.org
> [mailto:beignet-bounces+guanqun.lu=intel.com at lists.freedesktop.org] On
> Behalf Of Zhigang Gong
> Sent: Friday, August 30, 2013 11:16 AM
> To: beignet at lists.freedesktop.org
> Cc: Zhigang Gong
> Subject: [Beignet] [PATCH 1/2] GBE: add some macros for atom_xxx builtin
> functions.
>
> The atom_xxx APIs are on OpenCL spec 1.0, but the conformance test suite will
> tes them anyway.
>
> Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
> ---
> backend/src/ocl_stdlib.tmpl.h | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h index
> c428fac..ddad29a 100644
> --- a/backend/src/ocl_stdlib.tmpl.h
> +++ b/backend/src/ocl_stdlib.tmpl.h
> @@ -1458,6 +1458,21 @@ DECL_ATOMIC_OP(cmpxchg) #undef
> DECL_ATOMIC_OP_TYPE #undef DECL_ATOMIC_OP_SPACE
>
> +// XXX for conformance test
> +// The following atom_xxx api is on OpenCL spec 1.0.
> +// But the conformance test suite will tes them anyway.
> +#define atom_add atomic_add
> +#define atom_sub atomic_sub
> +#define atom_and atomic_and
> +#define atom_or atomic_or
> +#define atom_xor atomic_xor
> +#define atom_xchg atomic_xchg
> +#define atom_min atomic_min
> +#define atom_max atomic_max
> +#define atom_inc atomic_inc
> +#define atom_dec atomic_dec
> +#define atom_cmpxchg atomic_cmpxchg
> +
> /////////////////////////////////////////////////////////////////////////////
> // Force the compilation to SIMD8 or SIMD16
> /////////////////////////////////////////////////////////////////////////////
> --
> 1.7.9.5
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list