[Libclc-dev] [PATCH] Introduce CLC_VERSION macros v2

Tom Stellard tom at stellard.net
Mon Jun 23 09:42:46 PDT 2014


On Mon, Jun 23, 2014 at 05:41:04PM +0100, Jeroen Ketema wrote:
> Add these out-of-order in clc.h so we can use these in other headers.
> 
> v2: Take into account the lack of a definition in OpenCL 1.0

LGTM.

> ---
> generic/include/clc/clc.h        | 3 +++
> generic/include/clc/clcversion.h | 8 ++++++++
> 2 files changed, 11 insertions(+)
> create mode 100644 generic/include/clc/clcversion.h
> 
> diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
> index c7c8dfb..e93a8c0 100644
> --- a/generic/include/clc/clc.h
> +++ b/generic/include/clc/clc.h
> @@ -11,6 +11,9 @@
> /* Function Attributes */
> #include <clc/clcfunc.h>
> 
> +/* 6.9 Preprocessor Directives and Macros */
> +#include <clc/clcversion.h>
> +
> /* 6.1 Supported Data Types */
> #include <clc/clctypes.h>
> 
> diff --git a/generic/include/clc/clcversion.h b/generic/include/clc/clcversion.h
> new file mode 100644
> index 0000000..57c989e
> --- /dev/null
> +++ b/generic/include/clc/clcversion.h
> @@ -0,0 +1,8 @@
> +#if __OPENCL_VERSION__ >= 110
> +#define CLC_VERSION_1_0 100
> +#define CLC_VERSION_1_1 110
> +#endif
> +
> +#if __OPENCL_VERSION__ >= 120
> +#define CLC_VERSION_1_2 120
> +#endif
> -- 
> 1.8.5.2 (Apple Git-48)
> 
> 
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev




More information about the Libclc-dev mailing list