Go to the documentation of this file.
17 #ifndef __CL_VERSION_H
18 #define __CL_VERSION_H
21 #if !defined(CL_TARGET_OPENCL_VERSION)
22 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
23 #define CL_TARGET_OPENCL_VERSION 300
25 #if CL_TARGET_OPENCL_VERSION != 100 && \
26 CL_TARGET_OPENCL_VERSION != 110 && \
27 CL_TARGET_OPENCL_VERSION != 120 && \
28 CL_TARGET_OPENCL_VERSION != 200 && \
29 CL_TARGET_OPENCL_VERSION != 210 && \
30 CL_TARGET_OPENCL_VERSION != 220 && \
31 CL_TARGET_OPENCL_VERSION != 300
32 #pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300). Defaulting to 300 (OpenCL 3.0)")
33 #undef CL_TARGET_OPENCL_VERSION
34 #define CL_TARGET_OPENCL_VERSION 300
39 #if CL_TARGET_OPENCL_VERSION >= 300 && !defined(CL_VERSION_3_0)
40 #define CL_VERSION_3_0 1
42 #if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
43 #define CL_VERSION_2_2 1
45 #if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
46 #define CL_VERSION_2_1 1
48 #if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
49 #define CL_VERSION_2_0 1
51 #if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
52 #define CL_VERSION_1_2 1
54 #if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
55 #define CL_VERSION_1_1 1
57 #if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
58 #define CL_VERSION_1_0 1
62 #if CL_TARGET_OPENCL_VERSION <= 220 && !defined(CL_USE_DEPRECATED_OPENCL_2_2_APIS)
63 #define CL_USE_DEPRECATED_OPENCL_2_2_APIS
65 #if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
66 #define CL_USE_DEPRECATED_OPENCL_2_1_APIS
68 #if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
69 #define CL_USE_DEPRECATED_OPENCL_2_0_APIS
71 #if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
72 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
74 #if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
75 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
77 #if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
78 #define CL_USE_DEPRECATED_OPENCL_1_0_APIS