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

« back to all changes in this revision

Viewing changes to read_imagef1d.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_imagef (1D)</keyword>
 
12
        </keywordset>
 
13
    </refentryinfo>
 
14
 
 
15
    <refmeta>
 
16
        <refentrytitle>read_imagef (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_image2d">
 
38
        <refname>read_imagef (1D)</refname>
 
39
 
 
40
        <refpurpose>
 
41
            Do an element lookup in the 1D image object, returning 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">float4</link>
 
50
                    <function>
 
51
                        read_imagef
 
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">float4</link>
 
73
                    <function>
 
74
                        read_imagef
 
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">float4</link>
 
96
                    <function>
 
97
                        read_imagef
 
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="vectorDataTypes.html">int</link>
 
106
                    <parameter>coord</parameter>
 
107
                </paramdef>
 
108
            </funcprototype>
 
109
        </funcsynopsis>
 
110
 
 
111
        <funcsynopsis>
 
112
            <funcprototype>
 
113
                <funcdef>
 
114
                    <link xlink:href="vectorDataTypes.html">float4</link>
 
115
                    <function>
 
116
                        read_imagef
 
117
                    </function>
 
118
                </funcdef>
 
119
                <paramdef>
 
120
                    <link xlink:href="otherDataTypes.html">image1d_buffer_t</link>
 
121
                    <parameter>image</parameter>
 
122
                </paramdef>
 
123
               <paramdef>
 
124
                    <link xlink:href="vectorDataTypes.html">int</link>
 
125
                    <parameter>coord</parameter>
 
126
                </paramdef>
 
127
            </funcprototype>
 
128
        </funcsynopsis>
 
129
 
 
130
        <funcsynopsis>
 
131
            <funcprototype>
 
132
                <funcdef>
 
133
                    <link xlink:href="vectorDataTypes.html">float4</link>
 
134
                    <function>
 
135
                        read_imagef
 
136
                    </function>
 
137
                </funcdef>
 
138
                <paramdef>
 
139
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
140
                    <parameter>image</parameter>
 
141
                </paramdef>
 
142
               <paramdef>
 
143
                    <link xlink:href="vectorDataTypes.html">int2</link>
 
144
                    <parameter>coord</parameter>
 
145
                </paramdef>
 
146
            </funcprototype>
 
147
        </funcsynopsis>
 
148
 
 
149
        <funcsynopsis>
 
150
            <funcprototype>
 
151
                <funcdef>
 
152
                    <link xlink:href="vectorDataTypes.html">float4</link>
 
153
                    <function>
 
154
                        read_imagef
 
155
                    </function>
 
156
                </funcdef>
 
157
                <paramdef>
 
158
                    <link xlink:href="otherDataTypes.html">image1d_array_t</link>
 
159
                    <parameter>image</parameter>
 
160
                </paramdef>
 
161
            <paramdef>
 
162
                <link xlink:href="sampler_t.html">sampler_t</link>
 
163
                <parameter>sampler</parameter>
 
164
            </paramdef>
 
165
            <paramdef>
 
166
                <link xlink:href="vectorDataTypes.html">float4</link>
 
167
                <parameter>coord</parameter>
 
168
            </paramdef>
 
169
            </funcprototype>
 
170
        </funcsynopsis>
 
171
    </refsynopsisdiv>
 
172
 
 
173
<!-- ================================ DESCRIPTION  -->
 
174
 
 
175
    <refsect1 id="description"><title>Functions to read 1D images and image arrays</title>
 
176
        <para>
 
177
          For forms that take <type>image1d_t</type>, use <emphasis>coord</emphasis> to do an
 
178
          element lookup in the 1D image object specified by <varname>image</varname>.
 
179
        </para>
 
180
 
 
181
        <para>
 
182
          For forms that take <type>image1d_array_t</type>, use <emphasis>coord.x</emphasis>
 
183
          to do an element lookup in the 1D image identified by <emphasis>coord.y</emphasis>
 
184
          in the 1D image array specified by <varname>image</varname>.
 
185
        </para>
 
186
 
 
187
        <para>
 
188
          The samplerless read image functions behave exactly as the corresponding read
 
189
          image functions that take integer coordinates and a sampler with filter mode
 
190
          set to <constant>CLK_FILTER_NEAREST</constant>, normalized coordinates set
 
191
          to <constant>CLK_NORMALIZED_COORDS_FALSE</constant> and addressing mode to
 
192
          <constant>CLK_ADDRESS_NONE</constant>.
 
193
        </para>
 
194
 
 
195
        <para>
 
196
          <function>read_imagef</function> returns floating-point values in the range
 
197
          [0.0... 1.0] for image objects created with <varname>image_channel_data_type</varname>
 
198
          set to one of the predefined packed formats or <constant>CL_UNORM_INT8</constant>
 
199
          or <constant>CL_UNORM_INT16</constant>.
 
200
        </para>
 
201
 
 
202
        <para>
 
203
          <function>read_imagef</function> returns floating-point values in the range [-1.0... 1.0]
 
204
          for image objects created with <varname>image_channel_data_type</varname> set to
 
205
          <constant>CL_SNORM_INT8</constant>, or <constant>CL_SNORM_INT16</constant>.
 
206
        </para>
 
207
 
 
208
        <para>
 
209
          <function>read_imagef</function> returns floating-point values for image objects created
 
210
          with <varname>image_channel_data_type</varname> set to <constant>CL_HALF_FLOAT</constant>
 
211
          or <constant>CL_FLOAT</constant>.
 
212
        </para>
 
213
 
 
214
        <para>
 
215
          The <function>read_imagef</function> calls that take integer coordinates must
 
216
          use a sampler with filter mode set to <constant>CLK_FILTER_NEAREST</constant>,
 
217
          normalized coordinates set to <constant>CLK_NORMALIZED_COORDS_FALSE</constant>
 
218
          and addressing mode set to <constant>CLK_ADDRESS_CLAMP_TO_EDGE</constant>,
 
219
          <constant>CLK_ADDRESS_CLAMP</constant> or <constant>CLK_ADDRESS_NONE</constant>;
 
220
          otherwise the values returned are undefined.
 
221
        </para>
 
222
 
 
223
        <para>
 
224
          Values returned by <function>read_imagef</function> for image objects with
 
225
          <varname>image_channel_data_type</varname> values not specified in the description
 
226
          above are undefined.
 
227
        </para>
 
228
    </refsect1>
 
229
 
 
230
<!-- ================================ NOTES  -->
 
231
    <refsect1 id="notes"><title>Notes</title>
 
232
 
 
233
        <para>
 
234
          General information about the <function>read_image</function>* functions follows.
 
235
        </para>
 
236
 
 
237
        &imageFunctionsInc;
 
238
 
 
239
        &imageMappingInc;
 
240
 
 
241
    </refsect1>
 
242
 
 
243
<!-- ================================ SPECIFICATION  -->
 
244
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
245
-->
 
246
    <refsect1 id="specification"><title>Specification</title>
 
247
        <para>
 
248
            <imageobject>
 
249
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
250
            </imageobject>
 
251
 
 
252
            <olink uri="imageFunctions">OpenCL Specification</olink>
 
253
        </para>
 
254
    </refsect1>
 
255
 
 
256
<!-- ================================ ALSO SEE  -->
 
257
 
 
258
    <refsect1 id="seealso"><title>Also see</title>
 
259
        <para>
 
260
            <citerefentry href="imageFunctions"><refentrytitle>Image Functions</refentrytitle></citerefentry>
 
261
        </para>
 
262
    </refsect1>
 
263
 
 
264
<!-- ============================== COPYRIGHT -->
 
265
<!-- Content included from copyright.inc.xsl -->
 
266
 
 
267
    <refsect3 id="Copyright"><title></title>
 
268
        <imageobject>
 
269
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
270
        </imageobject>
 
271
        <para />
 
272
    </refsect3>
 
273
 
 
274
<!-- 14-Oct-2011 -->
 
275
</refentry>
 
276