[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 5 07:45:23 PDT 2018


Anastasia added inline comments.


================
Comment at: include/clang/Basic/OpenCLExtensionTypes.def:1
+//===-- OpenCLExtensionTypes.def - Metadata about BuiltinTypes ------*- C++ -*-===//
+//
----------------
I am confused about the purpose of this file. Is it supposed to contain intel extension specific types or generally OpenCL types?


================
Comment at: include/clang/Basic/OpenCLExtensionTypes.def:27
+
+INTEL_SGAVC_TYPE(mce_payload_t, McePayload)
+INTEL_SGAVC_TYPE(ime_payload_t, ImePayload)
----------------
>From the specification of this extension I can't quite see if these types have to be in Clang instead of the header. Can you please elaborate on any example where it wouldn't be possible for this type to be declared in the header using the technique explained in:
https://clang.llvm.org/docs/UsersManual.html#opencl-extensions 


================
Comment at: lib/Headers/opencl-c.h:16197
+#ifdef cl_intel_device_side_avc_motion_estimation
+#pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable
+
----------------
Should we be using:
  #pragma OPENCL EXTENSION my_ext : begin
then the user can get correct diagnostics that the functions can only be used once the extension is enabled. 


Repository:
  rC Clang

https://reviews.llvm.org/D51484





More information about the cfe-commits mailing list