|
| 1 | +/* |
| 2 | + * Copyright (c) 2016-2020 The Khronos Group Inc. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + * |
| 16 | + * OpenCL is a trademark of Apple Inc. used under license by Khronos. |
| 17 | + */ |
| 18 | + |
| 19 | +#ifndef _ICD_VERSION_H_ |
| 20 | +#define _ICD_VERSION_H_ |
| 21 | + |
| 22 | +#define OPENCL_ICD_LOADER_VAL(_v) #_v |
| 23 | +#define OPENCL_ICD_LOADER_TOSTRING(_d) OPENCL_ICD_LOADER_VAL(_d) |
| 24 | +#define OPENCL_ICD_LOADER_VERSION_STRING \ |
| 25 | + OPENCL_ICD_LOADER_TOSTRING(OPENCL_ICD_LOADER_VERSION_MAJOR) "." \ |
| 26 | + OPENCL_ICD_LOADER_TOSTRING(OPENCL_ICD_LOADER_VERSION_MINOR) "." \ |
| 27 | + OPENCL_ICD_LOADER_TOSTRING(OPENCL_ICD_LOADER_VERSION_REV) |
| 28 | + |
| 29 | +#if CL_TARGET_OPENCL_VERSION == 100 |
| 30 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "1.0" |
| 31 | +#endif |
| 32 | +#if CL_TARGET_OPENCL_VERSION == 110 |
| 33 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "1.1" |
| 34 | +#endif |
| 35 | +#if CL_TARGET_OPENCL_VERSION == 120 |
| 36 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "1.2" |
| 37 | +#endif |
| 38 | +#if CL_TARGET_OPENCL_VERSION == 200 |
| 39 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "2.0" |
| 40 | +#endif |
| 41 | +#if CL_TARGET_OPENCL_VERSION == 210 |
| 42 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "2.1" |
| 43 | +#endif |
| 44 | +#if CL_TARGET_OPENCL_VERSION == 220 |
| 45 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "2.2" |
| 46 | +#endif |
| 47 | +#if CL_TARGET_OPENCL_VERSION == 300 |
| 48 | +#define OPENCL_ICD_LOADER_OCL_VERSION_NUMBER "3.0" |
| 49 | +#endif |
| 50 | + |
| 51 | +#define OPENCL_ICD_LOADER_OCL_VERSION_STRING \ |
| 52 | + "OpenCL " OPENCL_ICD_LOADER_OCL_VERSION_NUMBER |
| 53 | + |
| 54 | +#endif |
0 commit comments