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

« back to all changes in this revision

Viewing changes to barrier.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
 
 
5
<refentry>
 
6
    <refentryinfo>
 
7
        <keywordset>
 
8
            <keyword>Synchronization, barrier</keyword>
 
9
        </keywordset>
 
10
    </refentryinfo>
 
11
 
 
12
    <refmeta>
 
13
        <refentrytitle>barrier</refentrytitle>
 
14
 
 
15
        <refmiscinfo>
 
16
            <copyright>
 
17
                <year>2007-2011</year>
 
18
                <holder>The Khronos Group Inc.
 
19
 Permission is hereby granted, free of charge, to any person obtaining a
 
20
copy of this software and/or associated documentation files (the
 
21
"Materials"), to deal in the Materials without restriction, including
 
22
without limitation the rights to use, copy, modify, merge, publish,
 
23
distribute, sublicense, and/or sell copies of the Materials, and to
 
24
permit persons to whom the Materials are furnished to do so, subject to
 
25
the condition that this copyright notice and permission notice shall be included
 
26
in all copies or substantial portions of the Materials.</holder>
 
27
            </copyright>
 
28
        </refmiscinfo>
 
29
        <manvolnum>3</manvolnum>
 
30
    </refmeta>
 
31
 
 
32
<!-- ================================ SYNOPSIS -->
 
33
 
 
34
    <refnamediv id="barrier">
 
35
        <refname>barrier</refname>
 
36
 
 
37
        <refpurpose>
 
38
            All work-items in a work-group executing the kernel on a processor must execute this function before any are allowed to continue execution beyond the barrier.
 
39
        </refpurpose>
 
40
    </refnamediv>
 
41
 
 
42
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
43
        <funcsynopsis>
 
44
            <funcprototype>
 
45
                <funcdef>
 
46
                    <link xlink:href="scalarDataTypes.html">void</link>
 
47
                    <function>
 
48
                        barrier
 
49
                    </function>
 
50
                </funcdef>
 
51
                <paramdef><link xlink:href="enums.html#cl_mem_fence_flags">cl_mem_fence_flags</link><parameter>flags</parameter></paramdef>
 
52
            </funcprototype>
 
53
        </funcsynopsis>
 
54
    </refsynopsisdiv>
 
55
 
 
56
<!-- ================================ DESCRIPTION  -->
 
57
 
 
58
    <refsect1 id="description"><title>Description</title>
 
59
        <para>
 
60
          All work-items in a work-group executing the kernel on a processor must execute
 
61
          this function before any are allowed to continue execution beyond the barrier.
 
62
          This function must be encountered by all work-items in a work-group executing the kernel.
 
63
        </para>
 
64
 
 
65
        <para>
 
66
          If <function>barrier</function> is inside a conditional statement, then all work-items
 
67
          must enter the conditional if any work-item enters the conditional statement and
 
68
          executes the <function>barrier</function>.
 
69
        </para>
 
70
 
 
71
        <para>
 
72
          If <function>barrier</function> is inside a loop, all work-items must execute the
 
73
          <function>barrier</function> for each iteration of the loop before any are allowed
 
74
          to continue execution beyond the <function>barrier</function>.
 
75
        </para>
 
76
 
 
77
        <para>
 
78
          The <function>barrier</function> function also queues a memory fence (reads and writes)
 
79
          to ensure correct ordering of memory operations to local or global memory.
 
80
        </para>
 
81
 
 
82
        <para>
 
83
          The <varname>flags</varname> argument specifies the memory address space and can be
 
84
          set to a combination of the following literal values.
 
85
        </para>
 
86
 
 
87
        <para>
 
88
          <constant>CLK_LOCAL_MEM_FENCE</constant> - The <function>barrier</function> function
 
89
          will either flush any variables stored in local memory or queue a memory fence to
 
90
          ensure correct ordering of memory operations to local memory.
 
91
        </para>
 
92
 
 
93
        <para>
 
94
          <constant>CLK_GLOBAL_MEM_FENCE</constant> - The <function>barrier</function> function
 
95
          will queue a memory fence to ensure correct ordering of memory operations to global
 
96
          memory. This can be useful when work-items, for example, write to buffer or image
 
97
          objects and then want to read the updated data.
 
98
        </para>
 
99
    </refsect1>
 
100
 
 
101
<!-- ================================ NOTES
 
102
    <refsect1 id="notes"><title>Notes</title>
 
103
        <para>
 
104
 
 
105
        </para>
 
106
    </refsect1>-->
 
107
<!-- ================================ EXAMPLE  -->
 
108
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
109
<!--
 
110
    <refsect2 id="example1">
 
111
        <title>
 
112
            Example
 
113
        </title>
 
114
 
 
115
        <informaltable frame="none">
 
116
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
117
                <colspec colname="col1" colnum="1" />
 
118
                <tbody>
 
119
                    <row>
 
120
                        <entry>
 
121
                            Example goes here - it will be set in "code" type with white space preserved.
 
122
                        </entry>
 
123
                    </row>
 
124
                </tbody>
 
125
            </tgroup>
 
126
        </informaltable>
 
127
    </refsect2>
 
128
-->
 
129
 
 
130
<!-- ================================ SPECIFICATION  -->
 
131
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
132
-->
 
133
    <refsect1 id="specification"><title>Specification</title>
 
134
        <para>
 
135
            <imageobject>
 
136
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
137
            </imageobject>
 
138
 
 
139
            <olink uri="synchFunctions">OpenCL Specification</olink>
 
140
        </para>
 
141
    </refsect1>
 
142
 
 
143
<!-- ================================ ALSO SEE  -->
 
144
<!-- Enter comma-delimited list of all other pages in the system to link to, using
 
145
     <citerefentry /><refentrytitle /> to make it a link. For any case where the text of the link needs to differ
 
146
     from the filename of the html file this links to, use the "href" attribute in <citerefentry />. For example:
 
147
     <citerefentry href="thatPage"><refentrytitle>clGetDeviceInfo</refentrytitle></citerefentry>
 
148
 
 
149
 
 
150
    <refsect1 id="seealso"><title>Also see</title>
 
151
        <para>
 
152
            <citerefentry href="imageFunctions"><refentrytitle>Image Functions</refentrytitle></citerefentry>
 
153
        </para>
 
154
    </refsect1>-->
 
155
 
 
156
<!-- ============================== COPYRIGHT -->
 
157
<!-- Content included from copyright.inc.xsl -->
 
158
 
 
159
    <refsect3 id="Copyright"><title></title>
 
160
        <imageobject>
 
161
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
162
        </imageobject>
 
163
        <para />
 
164
    </refsect3>
 
165
 
 
166
<!-- 23-Oct-2011 -->
 
167
</refentry>
 
168