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