ChrisHegarty commented on PR #12632:
URL: https://github.com/apache/lucene/pull/12632#issuecomment-1752024575
```
// sum into accumulators
Vector<Short> prod16 = prod16_1.add(prod16_2);
acc = acc.add(prod16.convert(VectorOperators.S2I, 0));
acc = acc.add(prod16.convert(VectorOperators.S2I, 1));
```
What is the maximum value that we can see in the input bytes? Can they every
hold `-128`? Do we need to handle "overflow" in the short accumulation and
subsequent conversion to `int`? If so then we can use
`VectorOperators.ZERO_EXTEND_S2I` (rather than `S2I`). ( this is just a
question, rather than a suggestion, since I only thought of this after leaving
my keyboard)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]