tmp/tmpe308q9vg/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Add vectors or matrices elementwise <a id="linalg.algs.blas1.add">[[linalg.algs.blas1.add]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<in-object InObj1, in-object InObj2, out-object OutObj>
|
| 5 |
+
void add(InObj1 x, InObj2 y, OutObj z);
|
| 6 |
+
template<class ExecutionPolicy, in-object InObj1, in-object InObj2, out-object OutObj>
|
| 7 |
+
void add(ExecutionPolicy&& exec,
|
| 8 |
+
InObj1 x, InObj2 y, OutObj z);
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
[*Note 1*: These functions correspond to the BLAS function
|
| 12 |
+
`xAXPY`. — *end note*]
|
| 13 |
+
|
| 14 |
+
*Constraints:* `x.rank()`, `y.rank()`, and `z.rank()` are all equal.
|
| 15 |
+
|
| 16 |
+
*Mandates:* *`possibly-addable`*`<InObj1, InObj2, OutObj>()` is `true`.
|
| 17 |
+
|
| 18 |
+
*Preconditions:* *`addable`*`(x,y,z)` is `true`.
|
| 19 |
+
|
| 20 |
+
*Effects:* Computes z = x + y.
|
| 21 |
+
|
| 22 |
+
*Remarks:* `z` may alias `x` or `y`.
|
| 23 |
+
|