Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="atomixMax">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2012</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>atomixMax</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>atomixMax</refname>\r | |
17 | <refpurpose>perform an atomic max operation to a variable</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>Declaration</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>int <function>atomixMax</function></funcdef>\r | |
23 | <paramdef>inout int <parameter>mem</parameter></paramdef>\r | |
24 | <paramdef>int <parameter>data</parameter></paramdef>\r | |
25 | </funcprototype>\r | |
26 | <funcprototype>\r | |
27 | <funcdef>uint <function>atomixMax</function></funcdef>\r | |
28 | <paramdef>inout uint <parameter>mem</parameter></paramdef>\r | |
29 | <paramdef>uint <parameter>data</parameter></paramdef>\r | |
30 | </funcprototype>\r | |
31 | </funcsynopsis>\r | |
32 | </refsynopsisdiv>\r | |
33 | <refsect1 id="parameters"><title>Parameters</title>\r | |
34 | <variablelist>\r | |
35 | <varlistentry>\r | |
36 | <term><parameter>mem</parameter></term>\r | |
37 | <listitem>\r | |
38 | <para>\r | |
39 | The variable to use as the target of the operation.\r | |
40 | </para>\r | |
41 | </listitem>\r | |
42 | </varlistentry>\r | |
43 | <varlistentry>\r | |
44 | <term><parameter>data</parameter></term>\r | |
45 | <listitem>\r | |
46 | <para>\r | |
47 | The data to be compared to <parameter>mem</parameter>.\r | |
48 | </para>\r | |
49 | </listitem>\r | |
50 | </varlistentry>\r | |
51 | </variablelist>\r | |
52 | </refsect1>\r | |
53 | <refsect1 id="description"><title>Description</title>\r | |
54 | <para>\r | |
55 | <function>atomicMax</function> performs an atomic comparison of <parameter>data</parameter> to the contents of\r | |
56 | <parameter>mem</parameter>, writes the maximum value into <parameter>mem</parameter> and returns the original contents of <parameter>mem</parameter>\r | |
57 | from before the comparison occured. The contents of the memory being updated by the atomic operation are\r | |
58 | guaranteed not to be modified by any other assignment or atomic memory function in any shader\r | |
59 | invocation between the time the original value is read and the time the new value is written.\r | |
60 | </para>\r | |
61 | <para>\r | |
62 | Atomic memory functions are supported only for a limited set of variables. A shader will fail to compile \r | |
63 | if the value passed to the mem argument of an atomic memory function does not correspond to a buffer or \r | |
64 | shared variable. It is acceptable to pass an element of an array or a single component of a vector to the \r | |
65 | mem argument of an atomic memory function, as long as the underlying array or vector is a buffer or \r | |
66 | shared variable.\r | |
67 | </para>\r | |
68 | </refsect1>\r | |
69 | <refsect1 id="versions"><title>Version Support</title>\r | |
70 | <informaltable frame="topbot">\r | |
71 | #VARTABLECOLS#\r | |
72 | <thead>\r | |
73 | #FUNCTABLEHEADER#\r | |
74 | <row>\r | |
75 | <entry>atomixMax</entry>#newin43#\r | |
76 | </row>\r | |
77 | </thead>\r | |
78 | </tgroup>\r | |
79 | </informaltable>\r | |
80 | </refsect1>\r | |
81 | <refsect1 id="seealso"><title>See Also</title>\r | |
82 | <para>\r | |
83 | <citerefentry><refentrytitle>atomicAdd</refentrytitle></citerefentry>,\r | |
84 | <citerefentry><refentrytitle>atomicAnd</refentrytitle></citerefentry>,\r | |
85 | <citerefentry><refentrytitle>atomicOr</refentrytitle></citerefentry>,\r | |
86 | <citerefentry><refentrytitle>atomicXor</refentrytitle></citerefentry>,\r | |
87 | <citerefentry><refentrytitle>atomicMin</refentrytitle></citerefentry>,\r | |
88 | <citerefentry><refentrytitle>atomicExchange</refentrytitle></citerefentry>,\r | |
89 | <citerefentry><refentrytitle>atomicCompSwap</refentrytitle></citerefentry>\r | |
90 | </para>\r | |
91 | </refsect1>\r | |
92 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
93 | <para>\r | |
94 | Copyright <trademark class="copyright"></trademark> 2011-2012 Khronos Group.\r | |
95 | This material may be distributed subject to the terms and conditions set forth in\r | |
96 | the Open Publication License, v 1.0, 8 June 1999.\r | |
97 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
98 | </para>\r | |
99 | </refsect1>\r | |
100 | </refentry>\r |