[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 10 05:04:56 PDT 2018
Anastasia added a comment.
OpenCL C is based on C99, so OpenMP isn't enabled by default. But in your tests you use `-fopenmp` to activate it.
OpenCL general philosophy is that vectors are written explicitly, but it's not always very easy. In OpenCL C++ we have added an attribute hint for auto vectorization `cl::vec_type_hint`. It's given to a kernel rather than for a loop though. So I think this `simd` pragma is useful. My only worry is that other OpenMP features might not work well in OpenCL and we have no way to reject them at the moment.
Repository:
rC Clang
https://reviews.llvm.org/D46667
More information about the cfe-commits
mailing list