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

« back to all changes in this revision

Viewing changes to clamp.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 commonFunctionsInc SYSTEM "commonFunctionsInc.xml">
 
5
]>
 
6
 
 
7
<refentry>
 
8
    <refentryinfo>
 
9
        <keywordset>
 
10
            <keyword>clamp</keyword>
 
11
        </keywordset>
 
12
    </refentryinfo>
 
13
 
 
14
    <refmeta>
 
15
        <refentrytitle>clamp</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="clamp">
 
37
        <refname>clamp</refname>
 
38
 
 
39
        <refpurpose>
 
40
            Clamp <varname>x</varname> to range given by <varname>min</varname>, <varname>max</varname>
 
41
        </refpurpose>
 
42
    </refnamediv>
 
43
 
 
44
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
45
 
 
46
        <funcsynopsis>
 
47
            <funcprototype>
 
48
                <funcdef>
 
49
                    gentype
 
50
                    <function>
 
51
                        clamp
 
52
                    </function>
 
53
                </funcdef>
 
54
                <paramdef>gentype<parameter>x</parameter></paramdef>
 
55
                <paramdef>gentype<parameter>minval</parameter></paramdef>
 
56
                <paramdef>gentype<parameter>maxval</parameter></paramdef>
 
57
            </funcprototype>
 
58
        </funcsynopsis>
 
59
 
 
60
        <funcsynopsis>
 
61
            <funcprototype>
 
62
                <funcdef>
 
63
                    gentypef
 
64
                    <function>
 
65
                        clamp
 
66
                    </function>
 
67
                </funcdef>
 
68
                <paramdef>gentypef<parameter>x</parameter></paramdef>
 
69
                <paramdef><link xlink:href="scalarDataTypes.html">float</link><parameter>minval</parameter></paramdef>
 
70
                <paramdef><link xlink:href="scalarDataTypes.html">float</link><parameter>maxval</parameter></paramdef>
 
71
            </funcprototype>
 
72
        </funcsynopsis>
 
73
 
 
74
        <funcsynopsis>
 
75
            <funcprototype>
 
76
                <funcdef>
 
77
                    gentyped
 
78
                    <function>
 
79
                        clamp
 
80
                    </function>
 
81
                </funcdef>
 
82
                <paramdef>gentyped<parameter>x</parameter></paramdef>
 
83
                <paramdef><link xlink:href="scalarDataTypes.html">double</link><parameter>minval</parameter></paramdef>
 
84
                <paramdef><link xlink:href="scalarDataTypes.html">double</link><parameter>maxval</parameter></paramdef>
 
85
            </funcprototype>
 
86
        </funcsynopsis>
 
87
 
 
88
    </refsynopsisdiv>
 
89
 
 
90
<!-- Optional Half prototypes -->
 
91
 
 
92
     <refsect2 xmlns:xlink="http://www.w3.org/1999/xlink" id="double">
 
93
        <title></title>
 
94
 
 
95
        <informaltable frame="none">
 
96
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
97
                <colspec colname="col1" colnum="1" />
 
98
                <tbody>
 
99
                    <row>
 
100
 
 
101
                        <entry>
 
102
<type>gentype</type> <function>clamp</function> (<type>gentype</type> <varname>x</varname>,
 
103
               <type>gentype</type> <varname>minval</varname>,
 
104
               <type>gentype</type> <varname>maxval</varname>)   // if half extension enabled
 
105
                        </entry>
 
106
                    </row>
 
107
 
 
108
                    <row>
 
109
                        <entry>
 
110
<type>gentype</type> <function>clamp</function> (<type>gentype</type> <varname>x</varname>,
 
111
               <type><link xlink:href="scalarDataTypes.html">half</link></type> <varname>minval</varname>,
 
112
               <type><link xlink:href="scalarDataTypes.html">half</link></type> <varname>maxval</varname>)   // if half extension enabled
 
113
                        </entry>
 
114
 
 
115
                    </row>
 
116
                </tbody>
 
117
            </tgroup>
 
118
        </informaltable>
 
119
    </refsect2>
 
120
 
 
121
<!-- ================================ DESCRIPTION  -->
 
122
 
 
123
    <refsect1 id="description"><title>Description</title>
 
124
        <para>
 
125
          Returns <function>min</function>(<function>fmax</function>(<varname>x</varname>,
 
126
          <varname>minval</varname>), <varname>maxval</varname>).
 
127
        </para>
 
128
 
 
129
        <para>
 
130
          Results are undefined if <varname>minval</varname> &gt; <varname>maxval</varname>.
 
131
        </para>
 
132
    </refsect1>
 
133
 
 
134
<!-- ================================ NOTES  -->
 
135
 
 
136
    <refsect1 id="notes"><title>Notes</title>
 
137
        &commonFunctionsInc;
 
138
        <para>
 
139
          If extended with <citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry>,
 
140
          generic type name <type>gentype</type> may indicate <type>half</type> and
 
141
          <type>half{2|3|4|8|16}</type> as arguments and return values.
 
142
        </para>
 
143
    </refsect1>
 
144
 
 
145
<!-- ================================ EXAMPLE  -->
 
146
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
147
<!--
 
148
    <refsect2 id="example1">
 
149
        <title>
 
150
            Example
 
151
        </title>
 
152
 
 
153
        <informaltable frame="none">
 
154
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
155
                <colspec colname="col1" colnum="1" />
 
156
                <tbody>
 
157
                    <row>
 
158
                        <entry>
 
159
                            Example goes here - it will be set in "code" type with white space preserved.
 
160
                        </entry>
 
161
                    </row>
 
162
                </tbody>
 
163
            </tgroup>
 
164
        </informaltable>
 
165
    </refsect2>
 
166
-->
 
167
 
 
168
<!-- ================================ SPECIFICATION  -->
 
169
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
170
-->
 
171
    <refsect1 id="specification"><title>Specification</title>
 
172
        <para>
 
173
            <imageobject>
 
174
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
175
            </imageobject>
 
176
 
 
177
            <olink uri="commonFunctions">OpenCL Specification</olink>
 
178
        </para>
 
179
    </refsect1>
 
180
 
 
181
<!-- ================================ ALSO SEE  -->
 
182
 
 
183
    <refsect1 id="seealso"><title>Also see</title>
 
184
        <para>
 
185
            <citerefentry href="commonFunctions"><refentrytitle>Common Functions</refentrytitle></citerefentry>
 
186
        </para>
 
187
    </refsect1>
 
188
 
 
189
<!-- ============================== COPYRIGHT -->
 
190
<!-- Content included from copyright.inc.xsl -->
 
191
 
 
192
    <refsect3 id="Copyright"><title></title>
 
193
        <imageobject>
 
194
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
195
        </imageobject>
 
196
        <para />
 
197
    </refsect3>
 
198
 
 
199
<!-- 23-Oct-2011 -->
 
200
</refentry>
 
201