[Libclc-dev] [PATCH 2/3] Introduce CLC_VERSION macros

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


On Mon, Jun 23, 2014 at 05:20:58PM +0100, Jeroen Ketema wrote:
> 
> >> +#define CLC_VERSION_1_0 100
> >> +#define CLC_VERSION_1_1 110
> >> +#if __OPENCL_VERSION__ >= 120
> >> +#define CLC_VERSION_1_2 120
> >> +#endif
> > 
> > I think all these defines should be wrapped in __OPENCL_VERSION__ == 1XX,
> > because even when we support 1.2, we still want to be able to use the library with
> > a 1.1 implementation.
> 
> I don’t quite understand what you’re saying. In OpenCL 1.1 both the first two macro’s exist. In OpenCL 1.2 all three exist.

Sorry, you are right.  I overlooked that.  I checked the OpenCL 1.0 spec and it doesn't
have any of the macros, so I think we should wrap the first two in __OPENCL_VERSION__ >= 110

-Tom

> 
> Jeroen
> 




More information about the Libclc-dev mailing list