Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clang/include/clang/Basic/OpenCLExtensions.def
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ OPENCL_EXTENSION(cl_amd_media_ops2, true, 100)

// Intel OpenCL extensions
OPENCL_EXTENSION(cl_intel_subgroups, true, 120)
OPENCL_EXTENSION(cl_intel_subgroups_char, true, 120)
OPENCL_EXTENSION(cl_intel_subgroups_long, true, 120)
OPENCL_EXTENSION(cl_intel_subgroups_short, true, 120)
OPENCL_EXTENSION(cl_intel_subgroup_buffer_prefetch, false, 120)
OPENCL_EXTENSION(cl_intel_subgroup_local_block_io, false, 120)
OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, true, 120)

// OpenCL C 3.0 features (6.2.1. Features)
Expand Down
30 changes: 30 additions & 0 deletions clang/test/SemaOpenCL/extension-version.cl
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,24 @@
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups : enable

#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_subgroups_char
#error "Missing cl_intel_subgroups_char define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_char' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups_char : enable

#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_subgroups_long
#error "Missing cl_intel_subgroups_long define"
#endif
#else
// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_long' - ignoring}}
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups_long : enable

#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_subgroups_short
#error "Missing cl_intel_subgroups_short define"
Expand All @@ -349,6 +367,18 @@
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups_short : enable

#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_subgroup_buffer_prefetch
#error "Missing cl_intel_subgroup_buffer_prefetch define"
#endif
#endif

#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_subgroup_local_block_io
#error "Missing cl_intel_subgroup_local_block_io define"
#endif
#endif

#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120)
#ifndef cl_intel_device_side_avc_motion_estimation
#error "Missing cl_intel_device_side_avc_motion_estimation define"
Expand Down