From: Pirama Arumuga Nainar Date: Tue, 21 Jun 2016 16:09:30 +0000 (+0000) Subject: Add documentation for RenderScript changes X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82c6cd26a0816f1407cea5abe30ef24c7d533589;p=clang Add documentation for RenderScript changes 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 --- diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 6da879043c..fa73054676 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -84,6 +84,11 @@ C Language Changes in Clang --------------------------- The -faltivec and -maltivec flags no longer silently include altivec.h on Power platforms. +`RenderScript +`_ +support added to the Frontend and enabled by the '-x renderscript' option or +the '.rs' file extension. + ... C11 Feature Support diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index fcf457a40c..057cf2d052 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -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]; } diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td index dfaa2144f4..ad2b8d69a7 100644 --- a/include/clang/Basic/AttrDocs.td +++ b/include/clang/Basic/AttrDocs.td @@ -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 + }]; +}