rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / manglsl / atomicAdd.xml
diff --git a/upstream-doc/manglsl/atomicAdd.xml b/upstream-doc/manglsl/atomicAdd.xml
new file mode 100644 (file)
index 0000000..03f9129
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
+              "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
+<refentry id="atomicAdd">\r
+    <refmeta>\r
+        <refmetainfo>\r
+            <copyright>\r
+                <year>2012</year>\r
+                <holder>Khronos Group</holder>\r
+            </copyright>\r
+        </refmetainfo>\r
+        <refentrytitle>atomicAdd</refentrytitle>\r
+        <manvolnum>3G</manvolnum>\r
+    </refmeta>\r
+    <refnamediv>\r
+        <refname>atomicAdd</refname>\r
+        <refpurpose>perform an atomic addition to a variable</refpurpose>\r
+    </refnamediv>\r
+    <refsynopsisdiv><title>Declaration</title>\r
+        <funcsynopsis>\r
+            <funcprototype>\r
+                <funcdef>int <function>atomicAdd</function></funcdef>\r
+                <paramdef>inout int <parameter>mem</parameter></paramdef>\r
+                <paramdef>int <parameter>data</parameter></paramdef>\r
+            </funcprototype>\r
+            <funcprototype>\r
+                <funcdef>uint <function>atomicAdd</function></funcdef>\r
+                <paramdef>inout uint <parameter>mem</parameter></paramdef>\r
+                <paramdef>uint <parameter>data</parameter></paramdef>\r
+            </funcprototype>\r
+        </funcsynopsis>\r
+    </refsynopsisdiv>\r
+    <refsect1 id="parameters"><title>Parameters</title>\r
+        <variablelist>\r
+        <varlistentry>\r
+            <term><parameter>mem</parameter></term>\r
+            <listitem>\r
+                <para>\r
+                    The variable to use as the target of the operation.\r
+                </para>\r
+            </listitem>\r
+        </varlistentry>\r
+        <varlistentry>\r
+            <term><parameter>data</parameter></term>\r
+            <listitem>\r
+                <para>\r
+                    The data to be added to <parameter>mem</parameter>.\r
+                </para>\r
+            </listitem>\r
+        </varlistentry>\r
+        </variablelist>\r
+    </refsect1>\r
+    <refsect1 id="description"><title>Description</title>\r
+        <para>\r
+            <function>atomicAdd</function> performs an atomic addition of <parameter>data</parameter> to the contents of\r
+            <parameter>mem</parameter> and returns the original contents of <parameter>mem</parameter>\r
+            from before the addition occured. The contents of the memory being updated by the atomic operation are\r
+            guaranteed not to be modified by any other assignment or atomic memory function in any shader\r
+            invocation between the time the original value is read and the time the new value is written.\r
+        </para>\r
+        <para>\r
+            Atomic memory functions are supported only for a limited set of variables.  A shader will fail to compile \r
+            if the value passed to the mem argument of  an atomic memory function does not correspond to a buffer or \r
+            shared variable.  It is acceptable to pass an element of an array or a single component of a vector to the \r
+            mem argument of an atomic memory function, as long as the underlying array or vector is a buffer or \r
+            shared variable.\r
+        </para>\r
+    </refsect1>\r
+    <refsect1 id="versions"><title>Version Support</title>\r
+        <informaltable frame="topbot">\r
+            #VARTABLECOLS#\r
+                <thead>\r
+                    #FUNCTABLEHEADER#\r
+                    <row>\r
+                        <entry>atomicAdd</entry>#newin43#\r
+                    </row>\r
+                </thead>\r
+            </tgroup>\r
+        </informaltable>\r
+    </refsect1>\r
+    <refsect1 id="seealso"><title>See Also</title>\r
+        <para>\r
+            <citerefentry><refentrytitle>atomicAnd</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>atomicOr</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>atomicXor</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>atomicMin</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>atomicMax</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>atomicExchange</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>atomicCompSwap</refentrytitle></citerefentry>\r
+        </para>\r
+    </refsect1>\r
+    <refsect1 id="Copyright"><title>Copyright</title>\r
+        <para>\r
+            Copyright <trademark class="copyright"></trademark> 2011-2012 Khronos Group.\r
+            This material may be distributed subject to the terms and conditions set forth in\r
+            the Open Publication License, v 1.0, 8 June 1999.\r
+            <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
+        </para>\r
+    </refsect1>\r
+</refentry>\r