~ubuntu-branches/ubuntu/trusty/khronos-opencl-man/trusty

« back to all changes in this revision

Viewing changes to atom_sub.xml

  • Committer: Package Import Robot
  • Author(s): Mathieu Malaterre
  • Date: 2013-05-21 18:06:15 UTC
  • Revision ID: package-import@ubuntu.com-20130521180615-6e0s2n3pai95ip2f
Tags: upstream-1.0~svn21772
ImportĀ upstreamĀ versionĀ 1.0~svn21772

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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" >
 
4
<refentry>
 
5
    <refentryinfo>
 
6
        <keywordset>
 
7
            <keyword>atom_sub</keyword>
 
8
        </keywordset>
 
9
    </refentryinfo>
 
10
 
 
11
    <refmeta>                                    
 
12
        <refentrytitle>atom_sub</refentrytitle>
 
13
 
 
14
        <refmiscinfo>
 
15
            <copyright>
 
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>
 
26
            </copyright>
 
27
        </refmiscinfo>
 
28
        <manvolnum>3</manvolnum>
 
29
    </refmeta>
 
30
 
 
31
<!-- ================================ SYNOPSIS -->
 
32
 
 
33
    <refnamediv id="atom_sub">             
 
34
        <refname>atom_sub</refname>
 
35
 
 
36
        <refpurpose>
 
37
            64-bit atom_sub functions. 
 
38
        </refpurpose>
 
39
    </refnamediv>
 
40
 
 
41
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
42
        <funcsynopsis>
 
43
            <funcprototype>
 
44
                <funcdef>
 
45
                    <link xlink:href="scalarDataTypes.html">long</link>
 
46
                    <function>                   
 
47
                        atom_sub
 
48
                    </function>
 
49
                </funcdef>
 
50
                <paramdef>
 
51
                    volatile <citerefentry href="global"><refentrytitle>__global</refentrytitle></citerefentry> 
 
52
                    <link xlink:href="scalarDataTypes.html">long</link><parameter>*p</parameter>
 
53
                </paramdef>    
 
54
                <paramdef><link xlink:href="scalarDataTypes.html">long</link><parameter>val</parameter></paramdef>   
 
55
            </funcprototype>
 
56
        </funcsynopsis>     
 
57
        
 
58
        <funcsynopsis>
 
59
            <funcprototype>
 
60
                <funcdef>
 
61
                    <link xlink:href="scalarDataTypes.html">long</link>
 
62
                    <function>                   
 
63
                        atom_sub
 
64
                    </function>
 
65
                </funcdef>
 
66
                <paramdef>
 
67
                    volatile <citerefentry href="global"><refentrytitle>__local</refentrytitle></citerefentry> 
 
68
                    <link xlink:href="scalarDataTypes.html">long</link><parameter>*p</parameter>
 
69
                </paramdef>   
 
70
                <paramdef><link xlink:href="scalarDataTypes.html">long</link><parameter>val</parameter></paramdef>  
 
71
            </funcprototype>
 
72
        </funcsynopsis>     
 
73
 
 
74
        <funcsynopsis>
 
75
            <funcprototype>
 
76
                <funcdef>
 
77
                    <link xlink:href="scalarDataTypes.html">ulong</link>
 
78
                    <function>                   
 
79
                        atom_sub
 
80
                    </function>
 
81
                </funcdef>
 
82
                <paramdef>
 
83
                    volatile <citerefentry href="local"><refentrytitle>__global</refentrytitle></citerefentry> 
 
84
                    <link xlink:href="scalarDataTypes.html">ulong</link><parameter>*p</parameter>
 
85
                </paramdef>  
 
86
                <paramdef><link xlink:href="scalarDataTypes.html">ulong</link><parameter>val</parameter></paramdef>   
 
87
            </funcprototype>
 
88
        </funcsynopsis>     
 
89
        
 
90
        <funcsynopsis>
 
91
            <funcprototype>
 
92
                <funcdef>
 
93
                    <link xlink:href="scalarDataTypes.html">ulong</link>
 
94
                    <function>                   
 
95
                        atom_sub
 
96
                    </function>
 
97
                </funcdef>
 
98
                <paramdef>
 
99
                    volatile <citerefentry href="local"><refentrytitle>__local</refentrytitle></citerefentry>
 
100
                    <link xlink:href="scalarDataTypes.html">ulong</link><parameter>*p</parameter>
 
101
                </paramdef> 
 
102
                <paramdef><link xlink:href="scalarDataTypes.html">ulong</link><parameter>val</parameter></paramdef>  
 
103
            </funcprototype>
 
104
        </funcsynopsis>     
 
105
    </refsynopsisdiv>
 
106
 
 
107
<!-- ================================ DESCRIPTION  -->
 
108
 
 
109
    <refsect1 id="description"><title>Description</title>
 
110
        <para>
 
111
            Read the 64-bit value (referred to as <varname>old</varname>) stored at location pointed by 
 
112
            <varname>p</varname>. Compute (<varname>old</varname> - <varname>val</varname>) and store 
 
113
            result at location pointed by <varname>p</varname>. The function returns <varname>old</varname>.
 
114
        </para>
 
115
 
 
116
        <para>
 
117
            An application that wants to use this extension will need to include the <code>#pragma 
 
118
            OPENCL EXTENSION cl_khr_int64_base_atomics : enable</code> in the OpenCL program source.
 
119
        </para>
 
120
 
 
121
        <para>
 
122
            This function is performed in one atomic transaction. These transactions are atomic for the device 
 
123
            executing these atomic functions. There is no guarantee of atomicity if the atomic operations to 
 
124
            the same memory location are being performed by kernels executing on multiple devices.
 
125
        </para>
 
126
 
 
127
        <para>
 
128
            Atomic operations on 64-bit integers and 32-bit integers (and float) are also atomic with regard to each other.
 
129
        </para>
 
130
 
 
131
    </refsect1>
 
132
 
 
133
<!-- ================================ NOTES  
 
134
 
 
135
    <refsect1 id="notes"><title>Notes</title>
 
136
         
 
137
    </refsect1>-->
 
138
 
 
139
<!-- ================================ EXAMPLE  -->
 
140
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
141
<!--
 
142
    <refsect2 id="example1">
 
143
        <title>
 
144
            Example
 
145
        </title>
 
146
 
 
147
        <informaltable frame="none">
 
148
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
149
                <colspec colname="col1" colnum="1" />
 
150
                <tbody>
 
151
                    <row>
 
152
                        <entry>
 
153
                            Example goes here - it will be set in "code" type with white space preserved.
 
154
                        </entry>
 
155
                    </row>
 
156
                </tbody>
 
157
            </tgroup>
 
158
        </informaltable>
 
159
    </refsect2>
 
160
-->
 
161
 
 
162
 
 
163
<!-- ================================ SPECIFICATION  -->
 
164
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
165
-->
 
166
    <refsect1 id="specification"><title>Specification</title>
 
167
        <para>
 
168
            <imageobject>
 
169
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
170
            </imageobject>
 
171
                                                 
 
172
            <olink uri="atomicFunctions">OpenCL Specification</olink>
 
173
        </para>
 
174
    </refsect1>
 
175
 
 
176
 
 
177
<!-- ================================ ALSO SEE  -->
 
178
 
 
179
    <refsect1 id="seealso"><title>Also see</title>
 
180
        <para>
 
181
            <citerefentry href="atomicFunctions"><refentrytitle>Atomic Functions</refentrytitle></citerefentry>,
 
182
            <citerefentry><refentrytitle>atomic_sub</refentrytitle></citerefentry>,
 
183
            <citerefentry><refentrytitle>cl_khr_int64_base_atomics</refentrytitle></citerefentry>  
 
184
        </para>
 
185
    </refsect1>
 
186
 
 
187
 
 
188
 
 
189
<!-- ============================== COPYRIGHT -->
 
190
<!-- Content included from copyright.inc.xsl -->
 
191
 
 
192
    <refsect3 id="Copyright"><title></title>
 
193
        <imageobject>
 
194
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
195
        </imageobject>
 
196
        <para />
 
197
    </refsect3>
 
198
<!-- 11-Oct-11 -->
 
199
</refentry>
 
200