[PATCH] D28080: [Docs][OpenCL] Added OpenCL feature description to user manual.
Alexey Bader via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 01:09:13 PST 2017
bader added a comment.
Thanks for working on this!
Looks good, except a few pedantic notes.
================
Comment at: docs/UsersManual.rst:44
- :ref:`Objective C++ Language <objcxx>`
+- :ref:`OpenCL Language <opencl>`: v1.0, v1.1, v1.2, v2.0.
----------------
It should and to be perfectly clear we might consider using term "OpenCL C kernel language" to avoid confusion with OpenCL host code language or OpenCL C++ kernel language.
================
Comment at: docs/UsersManual.rst:2009
+
+ $ clang test.cl -c -emit-llvm
+
----------------
Just for the sake of consistency it would be nice to switch input file name with the options:
clang -c -emit-llvm test.cl
================
Comment at: docs/UsersManual.rst:2014
+
+Clang currently supports OpenCL standards up to v2.0.
+
----------------
I suggest specifying that Clang support OpenCL C kernel language standards up to v2.0.
For instance OpenCL v2.1 doesn't introduce new OpenCL C kernel language standard - it still uses v2.0. So existing clang is sufficient enough to serve as front-end compiler in OpenCL 2.1 driver.
================
Comment at: docs/UsersManual.rst:2120
+ that can be used across GPU toolchains. The implementation follows `the SPIR
+ specification <https://www.khronos.org/spir>`_. There are two flavors available
+ for 32 and 64 bits.
----------------
pekka.jaaskelainen wrote:
> Which version of SPIR is generated?
For -cl-std=CL1.x (where x is 0, 1 or 2), SPIR version is 1.2.
For -cl-std=CL2.0, SPIR version is 2.0.
================
Comment at: docs/UsersManual.rst:2142-2143
+
+By default Clang will not include standard headers and therefore OpenCL builtin
+functions are unknown. The default CL header is, however, provided in the Clang
+installation and can be enabled by passing the ``-finclude-default-header`` flag
----------------
Not sure it's worth to mention, but even built-in vector types are defined in the opencl-c.h.
https://reviews.llvm.org/D28080
More information about the cfe-commits
mailing list