15 #ifndef LLVM_CLANG_BASIC_OPENCLOPTIONS_H
16 #define LLVM_CLANG_BASIC_OPENCLOPTIONS_H
26 #define OPENCLEXT(nm) unsigned nm : 1;
27 #include "clang/Basic/OpenCLExtensions.def"
30 #define OPENCLEXT(nm) nm = 0;
31 #include "clang/Basic/OpenCLExtensions.def"
36 #define OPENCLEXT(nm) nm = 1;
37 #include "clang/Basic/OpenCLExtensions.def"
41 #define OPENCLEXT_INTERNAL(Ext, Avail, ...) \
42 bool is_##Ext##_supported(unsigned OCLVer) const { \
43 return Ext && OCLVer >= Avail; \
45 #include "clang/Basic/OpenCLExtensions.def"
50 #define OPENCLEXT_INTERNAL(Ext, Avail, Core) \
51 bool is_##Ext##_supported_extension(unsigned CLVer) const { \
52 return is_##Ext##_supported(CLVer) && (Core == ~0U || CLVer < Core); \
54 #include "clang/Basic/OpenCLExtensions.def"
58 #define OPENCLEXT_INTERNAL(Ext, Avail, Core) \
59 bool is_##Ext##_supported_core(unsigned CLVer) const { \
60 return is_##Ext##_supported(CLVer) && Core != ~0U && CLVer >= Core; \
62 #include "clang/Basic/OpenCLExtensions.def"
OpenCL supported extensions and optional core features.