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

« back to all changes in this revision

Viewing changes to read_imageh2d.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
<!ENTITY imageFunctionsInc SYSTEM "imageFunctionsInc.xml">
 
5
<!ENTITY imageMappingInc SYSTEM "imageMappingInc.xml">
 
6
]>
 
7
<refentry>
 
8
    <refentryinfo>
 
9
        <keywordset>
 
10
            <keyword>read_imageh (2D, Half)</keyword>
 
11
        </keywordset>
 
12
    </refentryinfo>
 
13
 
 
14
    <refmeta>
 
15
        <refentrytitle>read_image (2D, Half)</refentrytitle>
 
16
 
 
17
        <refmiscinfo>
 
18
            <copyright>
 
19
                <year>2007-2011</year>
 
20
                <holder>The Khronos Group Inc.
 
21
 Permission is hereby granted, free of charge, to any person obtaining a
 
22
copy of this software and/or associated documentation files (the
 
23
"Materials"), to deal in the Materials without restriction, including
 
24
without limitation the rights to use, copy, modify, merge, publish,
 
25
distribute, sublicense, and/or sell copies of the Materials, and to
 
26
permit persons to whom the Materials are furnished to do so, subject to
 
27
the condition that this copyright notice and permission notice shall be included
 
28
in all copies or substantial portions of the Materials.</holder>
 
29
            </copyright>
 
30
        </refmiscinfo>
 
31
        <manvolnum>3</manvolnum>
 
32
    </refmeta>
 
33
 
 
34
<!-- ================================ SYNOPSIS -->
 
35
 
 
36
    <refnamediv id="read_image2d">
 
37
        <refname>read_imageh (2D, Half)</refname>
 
38
 
 
39
        <refpurpose>
 
40
            Do an element lookup in the 2D image object, returning half floating-point values.
 
41
        </refpurpose>
 
42
    </refnamediv>
 
43
 
 
44
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
45
        <funcsynopsis>
 
46
            <funcprototype>
 
47
                <funcdef>
 
48
                    <link xlink:href="vectorDataTypes.html">half4</link>
 
49
                    <function>
 
50
                        read_imageh
 
51
                    </function>
 
52
                </funcdef>
 
53
                <paramdef>
 
54
                    <link xlink:href="otherDataTypes.html">image2d_t</link>
 
55
                    <parameter>image</parameter>
 
56
                </paramdef>
 
57
                <paramdef>
 
58
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
59
                    <parameter>sampler</parameter>
 
60
                </paramdef>
 
61
                <paramdef>
 
62
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
63
                    <parameter>coord</parameter>
 
64
                </paramdef>
 
65
            </funcprototype>
 
66
        </funcsynopsis>
 
67
 
 
68
        <funcsynopsis>
 
69
            <funcprototype>
 
70
                <funcdef>
 
71
                    <link xlink:href="vectorDataTypes.html">half4</link>
 
72
                    <function>
 
73
                        read_imageh
 
74
                    </function>
 
75
                </funcdef>
 
76
                <paramdef>
 
77
                    <link xlink:href="otherDataTypes.html">image2d_t</link>
 
78
                    <parameter>image</parameter>
 
79
                </paramdef>
 
80
                <paramdef>
 
81
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
82
                    <parameter>sampler</parameter>
 
83
                </paramdef>
 
84
                <paramdef>
 
85
                    <link xlink:href="vectorDataTypes.html">float2</link>
 
86
                    <parameter>coord</parameter>
 
87
                </paramdef>
 
88
            </funcprototype>
 
89
        </funcsynopsis>
 
90
 
 
91
<!-- SAMPLER-LESS FORMS -->
 
92
 
 
93
         <funcsynopsis>
 
94
            <funcprototype>
 
95
                <funcdef>
 
96
                    <link xlink:href="vectorDataTypes.html">half4</link>
 
97
                    <function>
 
98
                        read_imageh
 
99
                    </function>
 
100
                </funcdef>
 
101
                <paramdef>
 
102
                    <link xlink:href="otherDataTypes.html">image2d_t</link>
 
103
                    <parameter>image</parameter>
 
104
                </paramdef>
 
105
                <paramdef>
 
106
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
107
                    <parameter>coord</parameter>
 
108
                </paramdef>
 
109
            </funcprototype>
 
110
        </funcsynopsis>
 
111
 
 
112
        <funcsynopsis>
 
113
            <funcprototype>
 
114
                <funcdef>
 
115
                    <link xlink:href="vectorDataTypes.html">half4</link>
 
116
                    <function>
 
117
                        read_imageh
 
118
                    </function>
 
119
                </funcdef>
 
120
                <paramdef>
 
121
                    <link xlink:href="otherDataTypes.html">image2d_array_t</link>
 
122
                    <parameter>image</parameter>
 
123
                </paramdef>
 
124
                <paramdef>
 
125
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
126
                    <parameter>coord</parameter>
 
127
                </paramdef>
 
128
            </funcprototype>
 
129
        </funcsynopsis>
 
130
 
 
131
<!-- ARRAY FORMS -->
 
132
 
 
133
        <funcsynopsis>
 
134
            <funcprototype>
 
135
                <funcdef>
 
136
                    <link xlink:href="vectorDataTypes.html">half4</link>
 
137
                    <function>
 
138
                        read_imageh
 
139
                    </function>
 
140
                </funcdef>
 
141
                <paramdef>
 
142
                    <link xlink:href="otherDataTypes.html">image2d_array_t</link>
 
143
                    <parameter>image</parameter>
 
144
                </paramdef>
 
145
                <paramdef>
 
146
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
147
                    <parameter>sampler</parameter>
 
148
                </paramdef>
 
149
                <paramdef>
 
150
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
151
                    <parameter>coord</parameter>
 
152
                </paramdef>
 
153
            </funcprototype>
 
154
        </funcsynopsis>
 
155
 
 
156
        <funcsynopsis>
 
157
            <funcprototype>
 
158
                <funcdef>
 
159
                    <link xlink:href="vectorDataTypes.html">half4</link>
 
160
                    <function>
 
161
                        read_imageh
 
162
                    </function>
 
163
                </funcdef>
 
164
                <paramdef>
 
165
                    <link xlink:href="otherDataTypes.html">image2d_array_t</link>
 
166
                    <parameter>image</parameter>
 
167
                </paramdef>
 
168
                <paramdef>
 
169
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
170
                    <parameter>sampler</parameter>
 
171
                </paramdef>
 
172
                <paramdef>
 
173
                    <link xlink:href="vectorDataTypes.html">float4</link>
 
174
                    <parameter>coord</parameter>
 
175
                </paramdef>
 
176
            </funcprototype>
 
177
        </funcsynopsis>
 
178
    </refsynopsisdiv>
 
179
 
 
180
<!-- ================================ DESCRIPTION  -->
 
181
 
 
182
    <refsect1 id="description"><title>Description</title>
 
183
        <para>
 
184
          For the forms that take an <type>image2d_t</type>, use the coordinate <emphasis>(x,
 
185
          y)</emphasis> to do an element lookup in the 2D image object specified by
 
186
          <varname>image</varname>.
 
187
        </para>
 
188
 
 
189
        <para>
 
190
          For the forms that take an <type>image2d_array_t</type>, Use
 
191
          <emphasis>coord.xy</emphasis> to do an element lookup in the 2D image identified by
 
192
          <emphasis>coord.z</emphasis> in the 2D image array specified by <varname>image</varname>.
 
193
        </para>
 
194
 
 
195
        <para>
 
196
          The samplerless read image functions behave exactly as the corresponding read
 
197
          image functions that take integer coordinates and a sampler with filter mode
 
198
          set to <constant>CLK_FILTER_NEAREST</constant>, normalized coordinates set
 
199
          to <constant>CLK_NORMALIZED_COORDS_FALSE</constant> and addressing mode to
 
200
          <constant>CLK_ADDRESS_NONE</constant>.
 
201
        </para>
 
202
 
 
203
        <para>
 
204
          <function>read_imageh</function> returns half floating-point values in the range
 
205
          [0.0... 1.0] for image objects created with <varname>image_channel_data_type</varname>
 
206
          set to one of the predefined packed formats or <constant>CL_UNORM_INT8</constant>
 
207
          or <constant>CL_UNORM_INT16</constant>.
 
208
        </para>
 
209
 
 
210
        <para>
 
211
          <function>read_imageh</function> returns half floating-point values in the range
 
212
          [-1.0... 1.0] for image objects created with <varname>image_channel_data_type</varname>
 
213
          set to <constant>CL_SNORM_INT8</constant>, or <constant>CL_SNORM_INT16</constant>.
 
214
        </para>
 
215
 
 
216
        <para>
 
217
          <function>read_imageh</function> returns half floating-point values for
 
218
          image objects created with <varname>image_channel_data_type</varname> set to
 
219
          <constant>CL_HALF_FLOAT</constant>.
 
220
        </para>
 
221
 
 
222
        <para>
 
223
          The <function>read_imageh</function> calls that take integer coordinates must
 
224
          use a sampler with filter mode set to <constant>CLK_FILTER_NEAREST</constant>,
 
225
          normalized coordinates set to <constant>CLK_NORMALIZED_COORDS_FALSE</constant>
 
226
          and addressing mode set to <constant>CLK_ADDRESS_CLAMP_TO_EDGE</constant>,
 
227
          <constant>CLK_ADDRESS_CLAMP</constant> or <constant>CLK_ADDRESS_NONE</constant>;
 
228
          otherwise the values returned are undefined.
 
229
        </para>
 
230
 
 
231
        <para>
 
232
          Values returned by <function>read_imageh</function> for image objects with
 
233
          <varname>image_channel_data_type</varname> values not specified in the description
 
234
          above are undefined.
 
235
        </para>
 
236
    </refsect1>
 
237
 
 
238
<!-- ================================ NOTES  -->
 
239
    <refsect1 id="notes"><title>Notes</title>
 
240
 
 
241
        <para>
 
242
          General information about the <function>read_image</function>* functions follows.
 
243
        </para>
 
244
 
 
245
        &imageFunctionsInc;
 
246
 
 
247
        &imageMappingInc;
 
248
 
 
249
    </refsect1>
 
250
 
 
251
<!-- ================================ EXAMPLE  -->
 
252
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
253
<!--
 
254
    <refsect2 id="example1">
 
255
        <title>
 
256
            Example
 
257
        </title>
 
258
 
 
259
        <informaltable frame="none">
 
260
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
261
                <colspec colname="col1" colnum="1" />
 
262
                <tbody>
 
263
                    <row>
 
264
                        <entry>
 
265
                            Example goes here - it will be set in "code" type with white space preserved.
 
266
                        </entry>
 
267
                    </row>
 
268
                </tbody>
 
269
            </tgroup>
 
270
        </informaltable>
 
271
    </refsect2>
 
272
-->
 
273
 
 
274
<!-- ================================ SPECIFICATION  -->
 
275
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page -->
 
276
 
 
277
    <refsect1 id="specification"><title>Specification</title>
 
278
        <para>
 
279
            <imageobject>
 
280
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
281
            </imageobject>
 
282
 
 
283
            <olink uri="imageFunctionsHalf">OpenCL Specification</olink>
 
284
        </para>
 
285
    </refsect1>
 
286
 
 
287
<!-- ================================ ALSO SEE  -->
 
288
 
 
289
    <refsect1 id="seealso"><title>Also see</title>
 
290
        <para>
 
291
            <citerefentry href="imageFunctions"><refentrytitle>Image Functions</refentrytitle></citerefentry>
 
292
        </para>
 
293
    </refsect1>
 
294
 
 
295
<!-- ============================== COPYRIGHT -->
 
296
<!-- Content included from copyright.inc.xsl -->
 
297
 
 
298
    <refsect3 id="Copyright"><title></title>
 
299
        <imageobject>
 
300
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
301
        </imageobject>
 
302
        <para />
 
303
    </refsect3>
 
304
 
 
305
<!-- 14-Oct-2011 -->
 
306
</refentry>
 
307