Repository navigation
Commit 13b9bbe
authored
Add runtime batch_bool mask overloads for complex batch load/store (#1391)
The scalar batch<T, A> already accepted both batch_bool_constant (compile-time)
and batch_bool (runtime) masks for load/store, but batch<std::complex<T>, A>
was missing the runtime overloads. This made it impossible to use a dynamic
mask with complex batches.
Changes:
- Declare and define load(value_type const*, batch_bool<T,A>, Mode)
and store(value_type*, batch_bool<T,A>, Mode) for batch<std::complex<T>>.
- Implement both with a scalar fallback: load zeroes inactive lanes,
store only writes active lanes.
- Add runtime-mask load/store tests in test_batch_complex.cpp.
The existing free-function API in xsimd_api.hpp already documented that
batch_bool overloads exist and are slower than batch_bool_constant; no
documentation or comment churn in the headers was needed.1 parent 5491a13 commit 13b9bbe
2 files changed
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
556 | 558 | | |
557 | 559 | | |
558 | 560 | | |
| |||
562 | 564 | | |
563 | 565 | | |
564 | 566 | | |
| 567 | + | |
| 568 | + | |
565 | 569 | | |
566 | 570 | | |
567 | 571 | | |
| |||
1506 | 1510 | | |
1507 | 1511 | | |
1508 | 1512 | | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1509 | 1524 | | |
1510 | 1525 | | |
1511 | 1526 | | |
| |||
1544 | 1559 | | |
1545 | 1560 | | |
1546 | 1561 | | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
1547 | 1572 | | |
1548 | 1573 | | |
1549 | 1574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
117 | 151 | | |
118 | 152 | | |
119 | 153 | | |
| |||
0 commit comments