1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" >
7
<keyword>atomic_max</keyword>
12
<refentrytitle>atomic_max</refentrytitle>
16
<year>2007-2011</year>
17
<holder>The Khronos Group Inc.
18
Permission is hereby granted, free of charge, to any person obtaining a
19
copy of this software and/or associated documentation files (the
20
"Materials"), to deal in the Materials without restriction, including
21
without limitation the rights to use, copy, modify, merge, publish,
22
distribute, sublicense, and/or sell copies of the Materials, and to
23
permit persons to whom the Materials are furnished to do so, subject to
24
the condition that this copyright notice and permission notice shall be included
25
in all copies or substantial portions of the Materials.</holder>
28
<manvolnum>3</manvolnum>
31
<!-- ================================ SYNOPSIS -->
33
<refnamediv id="atomic_max">
34
<refname>atomic_max</refname>
41
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
45
<link xlink:href="scalarDataTypes.html">int</link>
51
volatile <citerefentry href="global"><refentrytitle>__global</refentrytitle></citerefentry>
52
<link xlink:href="scalarDataTypes.html">int</link><parameter>*p</parameter>
54
<paramdef><link xlink:href="scalarDataTypes.html">int</link><parameter>val</parameter></paramdef>
61
<link xlink:href="scalarDataTypes.html">unsigned int</link>
67
volatile <citerefentry href="global"><refentrytitle>__global</refentrytitle></citerefentry>
68
<link xlink:href="scalarDataTypes.html">unsigned int</link><parameter>*p</parameter>
70
<paramdef><link xlink:href="scalarDataTypes.html">unsigned int</link><parameter>val</parameter></paramdef>
77
<link xlink:href="scalarDataTypes.html">int</link>
83
volatile <citerefentry href="local"><refentrytitle>__local</refentrytitle></citerefentry>
84
<link xlink:href="scalarDataTypes.html">int</link><parameter>*p</parameter>
86
<paramdef><link xlink:href="scalarDataTypes.html">int</link><parameter>val</parameter></paramdef>
93
<link xlink:href="scalarDataTypes.html">unsigned int</link>
99
volatile <citerefentry href="local"><refentrytitle>__local</refentrytitle></citerefentry>
100
<link xlink:href="scalarDataTypes.html">unsigned int</link><parameter>*p</parameter>
102
<paramdef><link xlink:href="scalarDataTypes.html">unsigned int</link><parameter>val</parameter></paramdef>
107
<!-- ================================ DESCRIPTION -->
109
<refsect1 id="description"><title>Description</title>
111
Read the 32-bit value (referred to as <varname>old</varname>) stored at location pointed by
112
<varname>p</varname>. Compute <citerefentry href="commonMax"><refentrytitle>max</refentrytitle></citerefentry>
113
(<varname>old</varname>, <varname>val</varname>) and store result at location pointed by
114
<varname>p</varname>. The function returns <varname>old</varname>.
118
A 64-bit version of this function, <citerefentry><refentrytitle>atom_max</refentrytitle></citerefentry>,
119
is enabled by <citerefentry><refentrytitle>cl_khr_int64_extended_atomics</refentrytitle></citerefentry>.
123
<!-- ================================ NOTES
125
<refsect1 id="notes"><title>Notes</title>
129
<!-- ================================ EXAMPLE -->
130
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
132
<refsect2 id="example1">
137
<informaltable frame="none">
138
<tgroup cols="1" align="left" colsep="0" rowsep="0">
139
<colspec colname="col1" colnum="1" />
143
Example goes here - it will be set in "code" type with white space preserved.
153
<!-- ================================ SPECIFICATION -->
154
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
156
<refsect1 id="specification"><title>Specification</title>
159
<imagedata fileref="pdficon_small1.gif" format="gif" />
162
<olink uri="atomicFunctions">OpenCL Specification</olink>
167
<!-- ================================ ALSO SEE -->
169
<refsect1 id="seealso"><title>Also see</title>
171
<citerefentry href="atomicFunctions"><refentrytitle>Atomic Functions</refentrytitle></citerefentry>,
172
<citerefentry><refentrytitle>atom_max</refentrytitle></citerefentry>
178
<!-- ============================== COPYRIGHT -->
179
<!-- Content included from copyright.inc.xsl -->
181
<refsect3 id="Copyright"><title></title>
183
<imagedata fileref="KhronosLogo.jpg" format="jpg" />