Host compile-time test for OpenCL version? Macro?
I'm working on an application that will support OpenCL 1.2 implementations and OpenCL 1.1 implementations (come on, NVIDIA).
OpenCL 1.2 has some macro definitions, such as the CL_MEM_HOST_NO_ACCESS allowed argument to clCreateBuffer that did not exist in 1.1. So my application will not compile on an OpenCL 1.1 system without some alternative code (i.e. suppressing the flag)
I'm not finding a reference to a global OpenCL version macro definition for the host code.
So, for flags like the above example, I'm not sure what else to do besides create a global macro of my own that my build system will have to set based on some driver version test. Does this really have to be so complicated, or am I overlooking something?
Tags for this Thread