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

« back to all changes in this revision

Viewing changes to length.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 geometricFunctionsInc SYSTEM "geometricFunctionsInc.xml">
 
5
]>
 
6
 
 
7
<refentry>
 
8
    <refentryinfo>
 
9
        <keywordset>
 
10
            <keyword>length</keyword>
 
11
        </keywordset>
 
12
    </refentryinfo>
 
13
 
 
14
    <refmeta>
 
15
        <refentrytitle>length</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="length">
 
37
        <refname>length</refname>
 
38
 
 
39
        <refpurpose>
 
40
            Vector length.
 
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="scalarDataTypes.html">float</link>
 
49
                    <function>
 
50
                        length
 
51
                    </function>
 
52
                </funcdef>
 
53
                <paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>p</parameter></paramdef>
 
54
            </funcprototype>
 
55
        </funcsynopsis>
 
56
 
 
57
        <funcsynopsis>
 
58
            <funcprototype>
 
59
                <funcdef>
 
60
                    <link xlink:href="scalarDataTypes.html">double</link>
 
61
                    <function>
 
62
                        length
 
63
                    </function>
 
64
                </funcdef>
 
65
<!-- !!! The following line might be a typo in the 1.2 spec. Spec says gentype when it may have meant double. -->
 
66
                <paramdef><link xlink:href="vectorDataTypes.html">double<replaceable>n</replaceable></link><parameter>p</parameter></paramdef>
 
67
            </funcprototype>
 
68
        </funcsynopsis>
 
69
    </refsynopsisdiv>
 
70
 
 
71
<!-- Optional Half prototypes -->
 
72
 
 
73
 <refsect2 xmlns:xlink="http://www.w3.org/1999/xlink" id="double">
 
74
        <title></title>
 
75
 
 
76
        <informaltable frame="none">
 
77
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
78
                <colspec colname="col1" colnum="1" />
 
79
                <tbody>
 
80
                    <row>
 
81
                        <entry>
 
82
<type><link xlink:href="scalarDataTypes.html">half</link></type> <function>length</function> (<type>gentype</type> <varname>p</varname>)      // if half extension enabled
 
83
</entry>
 
84
                    </row>
 
85
                </tbody>
 
86
            </tgroup>
 
87
        </informaltable>
 
88
    </refsect2>
 
89
 
 
90
<!-- ================================ DESCRIPTION  -->
 
91
 
 
92
    <refsect1 id="description"><title>Description</title>
 
93
        <para>
 
94
          Returns the length of vector <varname>p</varname>, i.e., the square
 
95
          root of (<emphasis>p.x</emphasis><superscript>2</superscript> +
 
96
          <emphasis>p.y</emphasis><superscript>2</superscript> + ...)
 
97
        </para>
 
98
    </refsect1>
 
99
 
 
100
<!-- ================================ NOTES  -->
 
101
 
 
102
<refsect1 id="notes"><title>Notes</title>
 
103
 
 
104
        &geometricFunctionsInc;
 
105
 
 
106
        <para>
 
107
          If extended with <citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry>,
 
108
          generic type name <type>gentype</type> may indicate <type>half</type> and
 
109
          <type>half{2|3|4}</type> as arguments.
 
110
        </para>
 
111
    </refsect1>
 
112
 
 
113
<!-- ================================ EXAMPLE  -->
 
114
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
115
<!--
 
116
    <refsect2 id="example1">
 
117
        <title>
 
118
            Example
 
119
        </title>
 
120
 
 
121
        <informaltable frame="none">
 
122
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
123
                <colspec colname="col1" colnum="1" />
 
124
                <tbody>
 
125
                    <row>
 
126
                        <entry>
 
127
                            Example goes here - it will be set in "code" type with white space preserved.
 
128
                        </entry>
 
129
                    </row>
 
130
                </tbody>
 
131
            </tgroup>
 
132
        </informaltable>
 
133
    </refsect2>
 
134
-->
 
135
 
 
136
<!-- ================================ SPECIFICATION  -->
 
137
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
138
-->
 
139
    <refsect1 id="specification"><title>Specification</title>
 
140
        <para>
 
141
            <imageobject>
 
142
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
143
            </imageobject>
 
144
 
 
145
            <olink uri="geometricFunctions">OpenCL Specification</olink>
 
146
        </para>
 
147
    </refsect1>
 
148
 
 
149
<!-- ================================ ALSO SEE  -->
 
150
 
 
151
    <refsect1 id="seealso"><title>Also see</title>
 
152
        <para>
 
153
            <citerefentry href="geometricFunctions"><refentrytitle>Geometric Functions</refentrytitle></citerefentry>
 
154
        </para>
 
155
    </refsect1>
 
156
 
 
157
<!-- ============================== COPYRIGHT -->
 
158
<!-- Content included from copyright.inc.xsl -->
 
159
 
 
160
    <refsect3 id="Copyright"><title></title>
 
161
        <imageobject>
 
162
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
163
        </imageobject>
 
164
        <para />
 
165
    </refsect3>
 
166
 
 
167
<!-- 16-Oct-2011 -->
 
168
</refentry>
 
169