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>atom_min</keyword>
12
<refentrytitle>atom_min</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="atom_min">
34
<refname>atom_min</refname>
37
64-bit atom_min functions.
41
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
45
<link xlink:href="scalarDataTypes.html">long</link>
51
volatile <citerefentry href="global"><refentrytitle>__global</refentrytitle></citerefentry>
52
<link xlink:href="scalarDataTypes.html">long</link><parameter>*p</parameter>
54
<paramdef><link xlink:href="scalarDataTypes.html">long</link><parameter>val</parameter></paramdef>
61
<link xlink:href="scalarDataTypes.html">long</link>
67
volatile <citerefentry href="global"><refentrytitle>__local</refentrytitle></citerefentry>
68
<link xlink:href="scalarDataTypes.html">long</link><parameter>*p</parameter>
70
<paramdef><link xlink:href="scalarDataTypes.html">long</link><parameter>val</parameter></paramdef>
77
<link xlink:href="scalarDataTypes.html">ulong</link>
83
volatile <citerefentry href="local"><refentrytitle>__global</refentrytitle></citerefentry>
84
<link xlink:href="scalarDataTypes.html">ulong</link><parameter>*p</parameter>
86
<paramdef><link xlink:href="scalarDataTypes.html">ulong</link><parameter>val</parameter></paramdef>
93
<link xlink:href="scalarDataTypes.html">ulong</link>
99
volatile <citerefentry href="local"><refentrytitle>__local</refentrytitle></citerefentry>
100
<link xlink:href="scalarDataTypes.html">ulong</link><parameter>*p</parameter>
102
<paramdef><link xlink:href="scalarDataTypes.html">ulong</link><parameter>val</parameter></paramdef>
107
<!-- ================================ DESCRIPTION -->
109
<refsect1 id="description"><title>Description</title>
111
Read the 64-bit value (referred to as <varname>old</varname>) stored at location pointed by
112
<varname>p</varname>. Compute <citerefentry href="commonMin"><refentrytitle>min</refentrytitle></citerefentry>
113
(<varname>old</varname>, <varname>val</varname>) and store minimum value at location pointed by
114
<varname>p</varname>. The function returns <varname>old</varname>.
118
An application that wants to use this extension will need to include the <code>#pragma
119
OPENCL EXTENSION cl_khr_int64_extended_atomics : enable</code> in the OpenCL program source.
123
This function is performed in one atomic transaction. These transactions are atomic for the device
124
executing these atomic functions. There is no guarantee of atomicity if the atomic operations to
125
the same memory location are being performed by kernels executing on multiple devices.
129
Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other.
134
<!-- ================================ NOTES
136
<refsect1 id="notes"><title>Notes</title>
140
<!-- ================================ EXAMPLE -->
141
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
143
<refsect2 id="example1">
148
<informaltable frame="none">
149
<tgroup cols="1" align="left" colsep="0" rowsep="0">
150
<colspec colname="col1" colnum="1" />
154
Example goes here - it will be set in "code" type with white space preserved.
164
<!-- ================================ SPECIFICATION -->
165
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
167
<refsect1 id="specification"><title>Specification</title>
170
<imagedata fileref="pdficon_small1.gif" format="gif" />
173
<olink uri="atomicFunctions">OpenCL Specification</olink>
178
<!-- ================================ ALSO SEE -->
180
<refsect1 id="seealso"><title>Also see</title>
182
<citerefentry href="atomicFunctions"><refentrytitle>Atomic Functions</refentrytitle></citerefentry>,
183
<citerefentry><refentrytitle>atomic_min</refentrytitle></citerefentry>,
184
<citerefentry><refentrytitle>cl_khr_int64_extended_atomics</refentrytitle></citerefentry>
190
<!-- ============================== COPYRIGHT -->
191
<!-- Content included from copyright.inc.xsl -->
193
<refsect3 id="Copyright"><title></title>
195
<imagedata fileref="KhronosLogo.jpg" format="jpg" />