| 1 |
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="usubBorrow"> |
| 6 |
<info> |
| 7 |
<copyright> |
| 8 |
<year>2011-2014</year> |
| 9 |
<holder>Khronos Group</holder> |
| 10 |
</copyright> |
| 11 |
</info> |
| 12 |
<refmeta> |
| 13 |
<refentrytitle>usubBorrow</refentrytitle> |
| 14 |
<manvolnum>3G</manvolnum> |
| 15 |
</refmeta> |
| 16 |
<refnamediv> |
| 17 |
<refname>usubBorrow</refname> |
| 18 |
<refpurpose>subtract unsigned integers and generate borrow</refpurpose> |
| 19 |
</refnamediv> |
| 20 |
<refsynopsisdiv><title>Declaration</title> |
| 21 |
<funcsynopsis> |
| 22 |
<funcprototype> |
| 23 |
<funcdef>genUType <function>usubBorrow</function></funcdef> |
| 24 |
<paramdef>genUType <parameter>x</parameter></paramdef> |
| 25 |
<paramdef>genUType <parameter>y</parameter></paramdef> |
| 26 |
<paramdef>out genUType <parameter>borrow</parameter></paramdef> |
| 27 |
</funcprototype> |
| 28 |
</funcsynopsis> |
| 29 |
</refsynopsisdiv> |
| 30 |
<refsect1 xml:id="parameters"><title>Parameters</title> |
| 31 |
<variablelist> |
| 32 |
<varlistentry> |
| 33 |
<term><parameter>x</parameter></term> |
| 34 |
<listitem> |
| 35 |
<para> |
| 36 |
Specifies the first vector to be used in the subtraction operation. |
| 37 |
</para> |
| 38 |
</listitem> |
| 39 |
</varlistentry> |
| 40 |
<varlistentry> |
| 41 |
<term><parameter>y</parameter></term> |
| 42 |
<listitem> |
| 43 |
<para> |
| 44 |
Specifies the second vector to be used in the subtraction operation. |
| 45 |
</para> |
| 46 |
</listitem> |
| 47 |
</varlistentry> |
| 48 |
<varlistentry> |
| 49 |
<term><parameter>borrow</parameter></term> |
| 50 |
<listitem> |
| 51 |
<para> |
| 52 |
Specifies the variable to receive the borrow output of the difference. |
| 53 |
</para> |
| 54 |
</listitem> |
| 55 |
</varlistentry> |
| 56 |
</variablelist> |
| 57 |
</refsect1> |
| 58 |
<refsect1 xml:id="description"><title>Description</title> |
| 59 |
<para> |
| 60 |
<function>usubBorrow</function> subtracts two 32-bit unsigned integer variables (scalars or vectors) and generates |
| 61 |
a 32-bit unsigned integer result, along with a borrow output. The result is the difference of <parameter>x</parameter> and |
| 62 |
<parameter>y</parameter> if non-negative, or <inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:msup><mml:mn>2</mml:mn><mml:mn>32</mml:mn></mml:msup></mml:math></inlineequation> |
| 63 |
plus that difference otherwise. |
| 64 |
The value <parameter>borrow</parameter> is set to 0 if <parameter>x</parameter> ≥ <parameter>y</parameter> and to 1 otherwise. |
| 65 |
</para> |
| 66 |
</refsect1> |
| 67 |
<refsect1 xml:id="versions"><title>Version Support</title> |
| 68 |
<informaltable> |
| 69 |
<tgroup cols="13" align="left"> |
| 70 |
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="funchead.xml" xpointer="xpointer(/*/*)"/> |
| 71 |
<tbody> |
| 72 |
<row> |
| 73 |
<entry>usubBorrow</entry> |
| 74 |
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="version.xml" xpointer="xpointer(/*/*[@role='40']/*)"/> |
| 75 |
</row> |
| 76 |
</tbody> |
| 77 |
</tgroup> |
| 78 |
</informaltable> |
| 79 |
</refsect1> |
| 80 |
<refsect1 xml:id="seealso"><title>See Also</title> |
| 81 |
<para> |
| 82 |
<citerefentry><refentrytitle>uaddCarry</refentrytitle></citerefentry> |
| 83 |
</para> |
| 84 |
</refsect1> |
| 85 |
<refsect1 xml:id="Copyright"><title>Copyright</title> |
| 86 |
<para> |
| 87 |
Copyright <trademark class="copyright"/> 2011-2014 Khronos Group. |
| 88 |
This material may be distributed subject to the terms and conditions set forth in |
| 89 |
the Open Publication License, v 1.0, 8 June 1999. |
| 90 |
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>. |
| 91 |
</para> |
| 92 |
</refsect1> |
| 93 |
</refentry> |