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

« back to all changes in this revision

Viewing changes to imageFunctionsInc.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
  <para>
 
2
    <!-- core spec p. 288, section 6.12.14 --> The built-in functions defined in this section
 
3
    can only be used with image memory objects.  An image memory object can be accessed by
 
4
    specific function calls that read from and/or write to specific locations in the image.
 
5
  </para>
 
6
 
 
7
<!-- Note: use <function> instead of <citerefentry> for the read and write functions in the text below. -->
 
8
 
 
9
  <para>
 
10
    Image memory objects that are being read by a kernel should be declared with the <citerefentry
 
11
    href="accessQualifiers"><refentrytitle>__read_only</refentrytitle></citerefentry>
 
12
    qualifier. <function>write_image</function> calls to image memory objects declared with the
 
13
    <citerefentry href="accessQualifiers"><refentrytitle>__read_only</refentrytitle></citerefentry>
 
14
    qualifier will generate a compilation error. Image memory objects that
 
15
    are being written to by a kernel should be declared with the <citerefentry
 
16
    href="accessQualifiers"><refentrytitle>__write_only</refentrytitle></citerefentry> qualifier.
 
17
    <function>read_image</function> calls to image memory objects declared with the <citerefentry
 
18
    href="accessQualifiers"><refentrytitle>__write_only</refentrytitle></citerefentry>
 
19
    qualifier will generate a compilation error. <function>read_image</function> and
 
20
    <function>write_image</function> calls to the same image memory object in a kernel are
 
21
    not supported.
 
22
  </para>
 
23
 
 
24
  <para>
 
25
    The <function>read_image</function> calls returns a four component floating-point, integer or
 
26
    unsigned integer color value. The color values returned by <function>read_image</function>
 
27
    are identified as <code>x, y, z, w</code> where <code>x</code> refers to the red component,
 
28
    <code>y</code> refers to the green component, <code>z</code> refers to the blue component
 
29
    and <code>w</code> refers to the alpha component.
 
30
  </para>
 
31
 
 
32
<!-- 16-Oct-2011 -->
 
33