update upstream sources
[clinton/guile-figl.git] / upstream-doc / manglsl / any.xml
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 <refentry id="any">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2013</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>any</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>any</refname>
17 <refpurpose>check whether any element of a boolean vector is true</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>bool <function>any</function></funcdef>
23 <paramdef>bvec <parameter>x</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="parameters"><title>Parameters</title>
28 <variablelist>
29 <varlistentry>
30 <term><parameter>x</parameter></term>
31 <listitem>
32 <para>
33 Specifies the vector to be tested for truth.
34 </para>
35 </listitem>
36 </varlistentry>
37 </variablelist>
38 </refsect1>
39 <refsect1 id="description"><title>Description</title>
40 <para>
41 <function>any</function> returns true if any element of <parameter>x</parameter> is true and false otherwise.
42 It is functionally equivalent to:
43 </para>
44 <para>
45 <programlisting><![CDATA[ bool any(bvec x) // bvec can be bvec2, bvec3 or bvec4
46 {
47 bool result = false;
48 int i;
49 for (i = 0; i < x.length(); ++i)
50 {
51 result |= x[i];
52 }
53 return result;
54 }]]></programlisting>
55 </para>
56 </refsect1>
57 <refsect1 id="versions"><title>Version Support</title>
58 <informaltable frame="topbot">
59 #VARTABLECOLS#
60 <thead>
61 #FUNCTABLEHEADER#
62 <row>
63 <entry>any</entry>#newin11#
64 </row>
65 </thead>
66 </tgroup>
67 </informaltable>
68 </refsect1>
69 <refsect1 id="seealso"><title>See Also</title>
70 <para>
71 <citerefentry><refentrytitle>all</refentrytitle></citerefentry>,
72 <citerefentry><refentrytitle>not</refentrytitle></citerefentry>
73 </para>
74 </refsect1>
75 <refsect1 id="Copyright"><title>Copyright</title>
76 <para>
77 Copyright <trademark class="copyright"></trademark> 2011-2013 Khronos Group.
78 This material may be distributed subject to the terms and conditions set forth in
79 the Open Publication License, v 1.0, 8 June 1999.
80 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
81 </para>
82 </refsect1>
83 </refentry>