1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
.. Copyright (c) 2016, Johan Mabille, Sylvain Corlay
Distributed under the terms of the BSD 3-Clause License.
The full license is in the file LICENSE, distributed with this software.
.. raw:: html
<style>
.rst-content table.docutils {
width: 100%;
table-layout: fixed;
}
table.docutils .line-block {
margin-left: 0;
margin-bottom: 0;
}
table.docutils code.literal {
color: initial;
}
code.docutils {
background: initial;
}
</style>
Arithmetic operators
====================
Binary operations:
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`add` | per slot addition |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sub` | per slot subtraction |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`mul` | per slot multiply |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`div` | per slot division |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`mod` | per slot modulo |
+---------------------------------------+----------------------------------------------------+
Unary operations:
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`neg` | per slot negate |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`pos` | per slot positive |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`reciprocal` | per slot reciprocal |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`decr` | per slot decrement |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`decr_if` | per slot decrement, based on a mask |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`incr` | per slot increment |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`incr_if` | per slot increment, based on a mask |
+---------------------------------------+----------------------------------------------------+
Saturated arithmetic:
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sadd` | per slot saturated addition |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`ssub` | per slot saturated subtraction |
+---------------------------------------+----------------------------------------------------+
Fused operations:
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fma` | fused multiply add |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fms` | fused multiply sub |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fnma` | fused negate multiply add |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fnms` | fused negate multiply sub |
+---------------------------------------+----------------------------------------------------+
Average computation:
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`avg` | per slot average |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`avgr` | per slot rounded average |
+---------------------------------------+----------------------------------------------------+
----
.. doxygengroup:: batch_arithmetic
:project: xsimd
:content-only:
|