]> granicus.if.org Git - clang/commitdiff
Add documentation for RenderScript changes
authorPirama Arumuga Nainar <pirama@google.com>
Tue, 21 Jun 2016 16:09:30 +0000 (16:09 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Tue, 21 Jun 2016 16:09:30 +0000 (16:09 +0000)
Summary:
- Document the new 'kernel' attribute
- Mention RenderScript support in the Release Notes.

Reviewers: rsmith

Subscribers: tberghammer, danalbert, cfe-commits, srhines

Differential Revision: http://reviews.llvm.org/D21212

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273283 91177308-0d34-0410-b5e6-96231b3b80d8

docs/ReleaseNotes.rst
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td

index 6da879043ccfb7c5ae36213e683aeb60714e26bf..fa7305467687a43c1b9e7b378a3a66952f0b147f 100644 (file)
@@ -84,6 +84,11 @@ C Language Changes in Clang
 ---------------------------
 The -faltivec and -maltivec flags no longer silently include altivec.h on Power platforms.
 
+`RenderScript
+<https://developer.android.com/guide/topics/renderscript/compute.html>`_
+support added to the Frontend and enabled by the '-x renderscript' option or
+the '.rs' file extension.
+
 ...
 
 C11 Feature Support
index fcf457a40cc9e699d3e7c2ee17a0c10aa5fcbcf5..057cf2d0522f4c0584cd8fec6f4f8d932a9cfecd 100644 (file)
@@ -734,7 +734,7 @@ def OpenCLNoSVM : Attr {
 def RenderScriptKernel : Attr {
   let Spellings = [GNU<"kernel">];
   let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
+  let Documentation = [RenderScriptKernelAttributeDocs];
   let LangOpts = [RenderScript];
 }
 
index dfaa2144f4cd0add5b998ca17f84aa54a32c5b37..ad2b8d69a7d9ee1ea3fa9983af621441bafb4882 100644 (file)
@@ -2433,3 +2433,18 @@ def LTOVisibilityDocs : Documentation {
 See :doc:`LTOVisibility`.
   }];
 }
+
+def RenderScriptKernelAttributeDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+``__attribute__((kernel))`` is used to mark a ``kernel`` function in
+RenderScript.
+
+In RenderScript, ``kernel`` functions are used to express data-parallel
+computations.  The RenderScript runtime efficiently parallelizes ``kernel``
+functions to run on computational resources such as multi-core CPUs and GPUs.
+See the RenderScript_ documentation for more information.
+
+.. _RenderScript: https://developer.android.com/guide/topics/renderscript/compute.html
+  }];
+}