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

« back to all changes in this revision

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