Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/clang/Basic/OpenCLExtensions.def is written in an unsupported language. File is not indexed.

0001 //===--- OpenCLExtensions.def - OpenCL extension list -----------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines the list of supported OpenCL extensions.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 // Macro OPENCLEXTNAME or OPENCL_GENERIC_EXTENSION can be defined to enumerate all
0014 // OpenCL extensions listed in this file.
0015 //
0016 // If extensions are to be enumerated with information about whether
0017 // an extension is core or optional core and minimum OpenCL version
0018 // when an extension becomes available,
0019 // define OPENCL_GENERIC_EXTENSION(ext, pragma, avail, core, opt) where
0020 //   ext - name of the extension or optional core feature.
0021 //   pragma - true if extension needs pragmas or false otherwise.
0022 //            NOTE: extension pragma without any documentation detailing
0023 //            its behavior explicitly is deprecated. Therefore the default
0024 //            value is false.
0025 //   avail - minimum OpenCL version supporting it.
0026 //   core - OpenCL versions mask when the extension becomes core feature.
0027 //          0U indicates not a core feature.
0028 //   opt - OpenCL versions mask when the extension becomes optional core
0029 //         feature. 0U indicates not a optional core feature.
0030 //
0031 // If extensions are to be enumerated without any information,
0032 // define OPENCLEXTNAME(ext) where ext is the name of the extension.
0033 //
0034 // Difference between optional core feature and core feature is that the
0035 // later is unconditionally supported in specific OpenCL version.
0036 //
0037 // As per The OpenCL Extension Specification, Section 1.2, in this file, an
0038 // extension is defined if and only it either:
0039 //  * affects the OpenCL language semantics or its syntax,
0040 //  * adds built-in functions to the language.
0041 //
0042 // For such an extension, a preprocessor #define that matches the extension
0043 // name must be created and a #pragma is required if and only if the
0044 // compilation flow is impacted, e.g. due to a difference of syntax or
0045 // semantics in the language compared to the core standard. #pragma directive
0046 // has no effect for optional core and core features.
0047 
0048 #ifndef OPENCL_GENERIC_EXTENSION
0049 #ifndef OPENCLEXTNAME
0050 #pragma error "macro OPENCLEXTNAME or OPENCL_GENERIC_EXTENSION is required"
0051 #else
0052 #define OPENCL_GENERIC_EXTENSION(ext, ...) OPENCLEXTNAME(ext)
0053 #endif // OPENCLEXTNAME
0054 #endif // OPENCL_GENERIC_EXTENSION
0055 
0056 // Declaration helpers
0057 #define OPENCL_EXTENSION(ext, pragma, avail) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, 0U, 0U)
0058 #define OPENCL_COREFEATURE(ext, pragma, avail, core)  OPENCL_GENERIC_EXTENSION(ext, pragma, avail, core, 0U)
0059 #define OPENCL_OPTIONALCOREFEATURE(ext, pragma, avail, opt) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, 0U, opt)
0060 
0061 // OpenCL 1.0.
0062 OPENCL_COREFEATURE(cl_khr_byte_addressable_store, true, 100, OCL_C_11P)
0063 OPENCL_COREFEATURE(cl_khr_global_int32_base_atomics, true, 100, OCL_C_11P)
0064 OPENCL_COREFEATURE(cl_khr_global_int32_extended_atomics, true, 100, OCL_C_11P)
0065 OPENCL_COREFEATURE(cl_khr_local_int32_base_atomics, true, 100, OCL_C_11P)
0066 OPENCL_COREFEATURE(cl_khr_local_int32_extended_atomics, true, 100, OCL_C_11P)
0067 OPENCL_OPTIONALCOREFEATURE(cl_khr_fp64, true, 100, OCL_C_12P)
0068 OPENCL_EXTENSION(cl_khr_fp16, true, 100)
0069 OPENCL_EXTENSION(cl_khr_int64_base_atomics, true, 100)
0070 OPENCL_EXTENSION(cl_khr_int64_extended_atomics, true, 100)
0071 OPENCL_GENERIC_EXTENSION(cl_khr_3d_image_writes, true, 100, OCL_C_20, OCL_C_30)
0072 
0073 // EMBEDDED_PROFILE
0074 OPENCL_EXTENSION(cles_khr_int64, true, 110)
0075 
0076 // OpenCL 1.2.
0077 OPENCL_EXTENSION(cl_khr_depth_images, true, 120)
0078 OPENCL_EXTENSION(cl_khr_gl_msaa_sharing,true, 120)
0079 
0080 // OpenCL 2.0.
0081 OPENCL_EXTENSION(cl_khr_mipmap_image, true, 200)
0082 OPENCL_EXTENSION(cl_khr_mipmap_image_writes, true, 200)
0083 OPENCL_EXTENSION(cl_khr_srgb_image_writes, true, 200)
0084 OPENCL_EXTENSION(cl_khr_subgroups, true, 200)
0085 
0086 // Clang Extensions.
0087 OPENCL_EXTENSION(cl_clang_storage_class_specifiers, true, 100)
0088 OPENCL_EXTENSION(__cl_clang_function_pointers, true, 100)
0089 OPENCL_EXTENSION(__cl_clang_variadic_functions, true, 100)
0090 OPENCL_EXTENSION(__cl_clang_non_portable_kernel_param_types, true, 100)
0091 OPENCL_EXTENSION(__cl_clang_bitfields, true, 100)
0092 
0093 // AMD OpenCL extensions
0094 OPENCL_EXTENSION(cl_amd_media_ops, true, 100)
0095 OPENCL_EXTENSION(cl_amd_media_ops2, true, 100)
0096 
0097 // Intel OpenCL extensions
0098 OPENCL_EXTENSION(cl_intel_subgroups, true, 120)
0099 OPENCL_EXTENSION(cl_intel_subgroups_short, true, 120)
0100 OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, true, 120)
0101 
0102 // OpenCL C 3.0 features (6.2.1. Features)
0103 OPENCL_OPTIONALCOREFEATURE(__opencl_c_pipes, false, 300, OCL_C_30)
0104 OPENCL_OPTIONALCOREFEATURE(__opencl_c_generic_address_space, false, 300, OCL_C_30)
0105 OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_acq_rel, false, 300, OCL_C_30)
0106 OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_seq_cst, false, 300, OCL_C_30)
0107 OPENCL_OPTIONALCOREFEATURE(__opencl_c_subgroups, false, 300, OCL_C_30)
0108 OPENCL_OPTIONALCOREFEATURE(__opencl_c_3d_image_writes, false, 300, OCL_C_30)
0109 OPENCL_OPTIONALCOREFEATURE(__opencl_c_device_enqueue, false, 300, OCL_C_30)
0110 OPENCL_OPTIONALCOREFEATURE(__opencl_c_read_write_images, false, 300, OCL_C_30)
0111 OPENCL_OPTIONALCOREFEATURE(__opencl_c_program_scope_global_variables, false, 300, OCL_C_30)
0112 OPENCL_OPTIONALCOREFEATURE(__opencl_c_fp64, false, 300, OCL_C_30)
0113 OPENCL_OPTIONALCOREFEATURE(__opencl_c_images, false, 300, OCL_C_30)
0114 
0115 #undef OPENCL_OPTIONALCOREFEATURE
0116 #undef OPENCL_COREFEATURE
0117 #undef OPENCL_GENERIC_EXTENSION
0118 
0119 #ifdef OPENCLEXTNAME
0120 #undef OPENCLEXTNAME
0121 #endif