| 1024 | Mixes calls of xsum_carry_propagate with calls of xsum_add1_no_carry. */ |
| 1025 | |
| 1026 | void xsum_small_add_sqnorm (xsum_small_accumulator *restrict sacc, |
| 1027 | const xsum_flt *restrict vec, |
| 1028 | xsum_length n) |
| 1029 | { xsum_length m, i; |
| 1030 | |
| 1031 | while (n > 0) |
| 1032 | { if (sacc->adds_until_propagate == 0) |
| 1033 | { (void) xsum_carry_propagate(sacc); |
| 1034 | } |
| 1035 | m = n <= sacc->adds_until_propagate ? n : sacc->adds_until_propagate; |
| 1036 | for (i = 0; i < m; i++) |
| 1037 | { xsum_add1_no_carry (sacc, vec[i] * vec[i]); |
| 1038 | } |
| 1039 | sacc->adds_until_propagate -= m; |
| 1040 | vec += m; |
| 1041 | n -= m; |
| 1042 | } |
| 1043 | } |
| 1044 | |
| 1045 | |
| 1046 | /* ADD DOT PRODUCT OF VECTORS OF FLOATING-POINT NUMBERS TO SMALL ACCUMULATOR. |
nothing calls this directly
no test coverage detected