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

« back to all changes in this revision

Viewing changes to read_imagei1d.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_imagei (1D)</keyword>
 
12
        </keywordset>
 
13
    </refentryinfo>
 
14
 
 
15
    <refmeta>
 
16
        <refentrytitle>read_imagei (1D)</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_image{i|ui} (1D)</refname>
 
39
 
 
40
        <refpurpose>
 
41
            Do an element lookup in the 1D image object, returning unnormalized signed integer and unsigned integer 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">int4</link>
 
50
                    <function>
 
51
                        read_imagei
 
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">int4</link>
 
73
                    <function>
 
74
                        read_imagei
 
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
        <funcsynopsis>
 
93
            <funcprototype>
 
94
                <funcdef>
 
95
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
96
                    <function>
 
97
                        read_imageui
 
98
                    </function>
 
99
                </funcdef>
 
100
                <paramdef>
 
101
                    <link xlink:href="otherDataTypes.html">image1d_t</link>
 
102
                    <parameter>image</parameter>
 
103
                </paramdef>
 
104
                <paramdef>
 
105
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
106
                    <parameter>sampler</parameter>
 
107
                </paramdef>
 
108
                <paramdef>
 
109
                    <link xlink:href="vectorDataTypes.html">int</link>
 
110
                    <parameter>coord</parameter>
 
111
                </paramdef>
 
112
            </funcprototype>
 
113
        </funcsynopsis>
 
114
 
 
115
        <funcsynopsis>
 
116
            <funcprototype>
 
117
                <funcdef>
 
118
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
119
                    <function>
 
120
                        read_imageui
 
121
                    </function>
 
122
                </funcdef>
 
123
                <paramdef>
 
124
                    <link xlink:href="otherDataTypes.html">image1d_t</link>
 
125
                    <parameter>image</parameter>
 
126
                </paramdef>
 
127
                <paramdef>
 
128
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
129
                    <parameter>sampler</parameter>
 
130
                </paramdef>
 
131
                <paramdef>
 
132
                    <link xlink:href="vectorDataTypes.html">float</link>
 
133
                    <parameter>coord</parameter>
 
134
                </paramdef>
 
135
            </funcprototype>
 
136
        </funcsynopsis>
 
137
 
 
138
<!-- SAMPLER-LESS FORMS  -->
 
139
 
 
140
        <funcsynopsis>
 
141
            <funcprototype>
 
142
                <funcdef>
 
143
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
144
                    <function>
 
145
                        read_imagei
 
146
                    </function>
 
147
                </funcdef>
 
148
                <paramdef>
 
149
                    <link xlink:href="otherDataTypes.html">image1d_t</link>
 
150
                    <parameter>image</parameter>
 
151
                </paramdef>
 
152
                <paramdef>
 
153
                    <link xlink:href="vectorDataTypes.html">int</link>
 
154
                    <parameter>coord</parameter>
 
155
                </paramdef>
 
156
            </funcprototype>
 
157
        </funcsynopsis>
 
158
 
 
159
        <funcsynopsis>
 
160
            <funcprototype>
 
161
                <funcdef>
 
162
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
163
                    <function>
 
164
                        read_imageui
 
165
                    </function>
 
166
                </funcdef>
 
167
                <paramdef>
 
168
                    <link xlink:href="otherDataTypes.html">image1d_t</link>
 
169
                    <parameter>image</parameter>
 
170
                </paramdef>
 
171
                <paramdef>
 
172
                    <link xlink:href="vectorDataTypes.html">int</link>
 
173
                    <parameter>coord</parameter>
 
174
                </paramdef>
 
175
            </funcprototype>
 
176
        </funcsynopsis>
 
177
 
 
178
        <funcsynopsis>
 
179
            <funcprototype>
 
180
                <funcdef>
 
181
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
182
                    <function>
 
183
                        read_imagei
 
184
                    </function>
 
185
                </funcdef>
 
186
                <paramdef>
 
187
                    <link xlink:href="otherDataTypes.html">image1d_buffer_t</link>
 
188
                    <parameter>image</parameter>
 
189
                </paramdef>
 
190
                <paramdef>
 
191
                    <link xlink:href="vectorDataTypes.html">int</link>
 
192
                    <parameter>coord</parameter>
 
193
                </paramdef>
 
194
            </funcprototype>
 
195
        </funcsynopsis>
 
196
 
 
197
        <funcsynopsis>
 
198
            <funcprototype>
 
199
                <funcdef>
 
200
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
201
                    <function>
 
202
                        read_imageui
 
203
                    </function>
 
204
                </funcdef>
 
205
                <paramdef>
 
206
                    <link xlink:href="otherDataTypes.html">image1d_buffer_t</link>
 
207
                    <parameter>image</parameter>
 
208
                </paramdef>
 
209
                <paramdef>
 
210
                    <link xlink:href="vectorDataTypes.html">int</link>
 
211
                    <parameter>coord</parameter>
 
212
                </paramdef>
 
213
            </funcprototype>
 
214
        </funcsynopsis>
 
215
 
 
216
        <funcsynopsis>
 
217
            <funcprototype>
 
218
                <funcdef>
 
219
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
220
                    <function>
 
221
                        read_imagei
 
222
                    </function>
 
223
                </funcdef>
 
224
                <paramdef>
 
225
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
226
                    <parameter>image</parameter>
 
227
                </paramdef>
 
228
                <paramdef>
 
229
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
230
                    <parameter>coord</parameter>
 
231
                </paramdef>
 
232
            </funcprototype>
 
233
        </funcsynopsis>
 
234
 
 
235
        <funcsynopsis>
 
236
            <funcprototype>
 
237
                <funcdef>
 
238
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
239
                    <function>
 
240
                        read_imageui
 
241
                    </function>
 
242
                </funcdef>
 
243
                <paramdef>
 
244
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
245
                    <parameter>image</parameter>
 
246
                </paramdef>
 
247
                <paramdef>
 
248
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
249
                    <parameter>coord</parameter>
 
250
                </paramdef>
 
251
            </funcprototype>
 
252
        </funcsynopsis>
 
253
 
 
254
<!-- ARRAY FORMS  -->
 
255
 
 
256
        <funcsynopsis>
 
257
            <funcprototype>
 
258
                <funcdef>
 
259
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
260
                    <function>
 
261
                        read_imagei
 
262
                    </function>
 
263
                </funcdef>
 
264
                <paramdef>
 
265
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
266
                    <parameter>image</parameter>
 
267
                </paramdef>
 
268
                <paramdef>
 
269
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
270
                    <parameter>sampler</parameter>
 
271
                </paramdef>
 
272
                <paramdef>
 
273
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
274
                    <parameter>coord</parameter>
 
275
                </paramdef>
 
276
            </funcprototype>
 
277
        </funcsynopsis>
 
278
 
 
279
        <funcsynopsis>
 
280
            <funcprototype>
 
281
                <funcdef>
 
282
                    <link xlink:href="vectorDataTypes.html">int4</link>
 
283
                    <function>
 
284
                        read_imagei
 
285
                    </function>
 
286
                </funcdef>
 
287
                <paramdef>
 
288
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
289
                    <parameter>image</parameter>
 
290
                </paramdef>
 
291
                <paramdef>
 
292
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
293
                    <parameter>sampler</parameter>
 
294
                </paramdef>
 
295
                <paramdef>
 
296
                    <link xlink:href="vectorDataTypes.html">float2</link>
 
297
                    <parameter>coord</parameter>
 
298
                </paramdef>
 
299
            </funcprototype>
 
300
        </funcsynopsis>
 
301
 
 
302
        <funcsynopsis>
 
303
            <funcprototype>
 
304
                <funcdef>
 
305
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
306
                    <function>
 
307
                        read_imageui
 
308
                    </function>
 
309
                </funcdef>
 
310
                <paramdef>
 
311
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
312
                    <parameter>image</parameter>
 
313
                </paramdef>
 
314
                <paramdef>
 
315
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
316
                    <parameter>sampler</parameter>
 
317
                </paramdef>
 
318
                <paramdef>
 
319
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
320
                    <parameter>coord</parameter>
 
321
                </paramdef>
 
322
            </funcprototype>
 
323
        </funcsynopsis>
 
324
 
 
325
        <funcsynopsis>
 
326
            <funcprototype>
 
327
                <funcdef>
 
328
                    <link xlink:href="vectorDataTypes.html">uint4</link>
 
329
                    <function>
 
330
                        read_imageui
 
331
                    </function>
 
332
                </funcdef>
 
333
                <paramdef>
 
334
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
335
                    <parameter>image</parameter>
 
336
                </paramdef>
 
337
                <paramdef>
 
338
                    <link xlink:href="sampler_t.html">sampler_t</link>
 
339
                    <parameter>sampler</parameter>
 
340
                </paramdef>
 
341
                <paramdef>
 
342
                    <link xlink:href="vectorDataTypes.html">float2</link>
 
343
                    <parameter>coord</parameter>
 
344
                </paramdef>
 
345
            </funcprototype>
 
346
        </funcsynopsis>
 
347
    </refsynopsisdiv>
 
348
 
 
349
<!-- ================================ DESCRIPTION  -->
 
350
 
 
351
    <refsect1 id="description"><title>Description</title>
 
352
        <para>
 
353
          For the forms that take an <type>image1d_t</type>, use the coordinate <emphasis>(coord.x,
 
354
          coord.y)</emphasis> to do an element lookup in the 2D image object specified by
 
355
          <varname>image</varname>.
 
356
        </para>
 
357
 
 
358
        <para>
 
359
          For the forms that take an <type>image1d_array_t</type>, use <emphasis>coord.x</emphasis>
 
360
          to do an element lookup in the 1D image identified by <emphasis>coord.y</emphasis>
 
361
          in the 1D image array specified by <varname>image</varname>.
 
362
        </para>
 
363
 
 
364
        <para>
 
365
          The samplerless read image functions behave exactly as the corresponding read
 
366
          image functions that take integer coordinates and a sampler with filter mode
 
367
          set to <constant>CLK_FILTER_NEAREST</constant>, normalized coordinates set
 
368
          to <constant>CLK_NORMALIZED_COORDS_FALSE</constant> and addressing mode to
 
369
          <constant>CLK_ADDRESS_NONE</constant>.
 
370
        </para>
 
371
 
 
372
        <para>
 
373
          <function>read_imagei</function> and <function>read_imageui</function> return
 
374
          unnormalized signed integer and unsigned integer values respectively. Each channel
 
375
          will be stored in a 32-bit integer.
 
376
        </para>
 
377
 
 
378
        <para>
 
379
          <function>read_imagei</function> can only be used with image objects created with
 
380
          <varname>image_channel_data_type</varname> set to one of the following values:
 
381
          <constant>CL_SIGNED_INT8</constant>, <constant>CL_SIGNED_INT16</constant>, or
 
382
          <constant>CL_SIGNED_INT32</constant>. If the <varname>image_channel_data_type</varname>
 
383
          is not one of the above values, the values returned by <function>read_imagei</function>
 
384
          are undefined.
 
385
        </para>
 
386
 
 
387
        <para>
 
388
          <function>read_imageui</function> can only be used with image objects created with
 
389
          <varname>image_channel_data_type</varname> set to one of the following values:
 
390
          <constant>CL_UNSIGNED_INT8</constant>, <constant>CL_UNSIGNED_INT16</constant>, and
 
391
          <constant>CL_UNSIGNED_INT32</constant>. If the <varname>image_channel_data_type</varname>
 
392
          is not one of the above values, the values returned by <function>read_imageui</function>
 
393
          are undefined.
 
394
        </para>
 
395
 
 
396
        <para>
 
397
          The <function>read_imagei</function> and <function>read_imageui</function> calls
 
398
          support a nearest filter only. The <varname>filter_mode</varname> specified in
 
399
          <varname>sampler</varname> must be set to <constant>CLK_FILTER_NEAREST</constant>;
 
400
          otherwise the values returned are undefined.
 
401
        </para>
 
402
 
 
403
         <para>
 
404
           Furthermore, the <function>read_imagei</function> returned are undefined.
 
405
           and <function>read_imageui</function> calls that take integer coordinates
 
406
           must use a returned are undefined.  sampler with normalized coordinates set
 
407
           to <constant>CLK_NORMALIZED_COORDS_FALSE</constant> and addressing returned
 
408
           are undefined.  mode set to <constant>CLK_ADDRESS_CLAMP_TO_EDGE</constant>,
 
409
           <constant>CLK_ADDRESS_CLAMP</constant> or <constant>CLK_ADDRESS_NONE</constant>;
 
410
           otherwise returned are undefined.  the values returned are undefined.  returned are
 
411
           undefined.
 
412
         </para>
 
413
    </refsect1>
 
414
 
 
415
<!-- ================================ NOTES  -->
 
416
 
 
417
    <refsect1 id="notes"><title>Notes</title>
 
418
 
 
419
        &imageFunctionsInc;
 
420
 
 
421
        &imageMappingInc;
 
422
 
 
423
    </refsect1>
 
424
 
 
425
<!-- ================================ SPECIFICATION  -->
 
426
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
427
-->
 
428
    <refsect1 id="specification"><title>Specification</title>
 
429
        <para>
 
430
            <imageobject>
 
431
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
432
            </imageobject>
 
433
 
 
434
            <olink uri="imageFunctions">OpenCL Specification</olink>
 
435
        </para>
 
436
    </refsect1>
 
437
 
 
438
<!-- ================================ ALSO SEE  -->
 
439
 
 
440
    <refsect1 id="seealso"><title>Also see</title>
 
441
        <para>
 
442
            <citerefentry href="imageFunctions"><refentrytitle>Image Functions</refentrytitle></citerefentry>
 
443
        </para>
 
444
    </refsect1>
 
445
 
 
446
<!-- ============================== COPYRIGHT -->
 
447
<!-- Content included from copyright.inc.xsl -->
 
448
 
 
449
    <refsect3 id="Copyright"><title></title>
 
450
        <imageobject>
 
451
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
452
        </imageobject>
 
453
        <para />
 
454
    </refsect3>
 
455
 
 
456
<!-- 14-Oct-2011 -->
 
457
</refentry>
 
458