[PATCH] D92004: [OpenCL] add CL 3.0 optional feature support to opencl-c.h

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 24 05:27:05 PST 2020


Anastasia added a comment.

Btw how about making some checks simpler. We could always define feature macros `__opencl_c_atomic_scope_device`, `__opencl_c_generic_address_space` for  OpenCL 2.0 or C++ for OpenCL . Then everywhere we would only need to check feature macros instead of language versions and feature macros together.

  #if !(defined()) && (defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ == CL_VERSION_2_0))
  #define __opencl_c_atomic_scope_device      1
  #define __opencl_c_generic_address_space   1
  ...
  #endif


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92004/new/

https://reviews.llvm.org/D92004



More information about the cfe-commits mailing list