[Beignet] [PATCH] GBE: fix some predfeined OCL macros.

Yang, Rong R rong.r.yang at intel.com
Wed Sep 10 00:36:15 PDT 2014


LGTM, thanks.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Zhigang Gong
> Sent: Tuesday, September 09, 2014 5:12 PM
> To: beignet at lists.freedesktop.org
> Cc: Gong, Zhigang
> Subject: [Beignet] [PATCH] GBE: fix some predfeined OCL macros.
> 
> Now beignet is a pure opencl 1.2 implementation.
> Set some predefined macros correctly.
> __OPENCL_C_VERSION__ and __OPENCL_VERSION__ should be 120 by
> default.
> 
> Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> ---
>  backend/src/ocl_stdlib.tmpl.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h index
> 2e37513..6f05dac 100755
> --- a/backend/src/ocl_stdlib.tmpl.h
> +++ b/backend/src/ocl_stdlib.tmpl.h
> @@ -120,9 +120,13 @@ typedef size_t __event_t;
> /////////////////////////////////////////////////////////////////////////////
>  // OpenCL preprocessor directives & macros
> /////////////////////////////////////////////////////////////////////////////
> -#define __OPENCL_VERSION__ 110
> +#define __OPENCL_VERSION__ 120
>  #define __CL_VERSION_1_0__ 100
>  #define __CL_VERSION_1_1__ 110
> +#define __CL_VERSION_1_2__ 120
> +#ifndef __OPENCL_C_VERSION
> +#define __OPENCL_C_VERSION__ 120
> +#endif
>  #define __ENDIAN_LITTLE__ 1
>  #define __IMAGE_SUPPORT__ 1
>  #define __kernel_exec(X, TYPE) __kernel
> __attribute__((work_group_size_hint(X,1,1))) \
> --
> 1.8.3.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list