jpountz commented on PR #13969:
URL: https://github.com/apache/lucene/pull/13969#issuecomment-2450030846
I wrote the javadocs this way on purpose, so that it would still work to
create an IntVector/LongVector that starts before `from` and count the number
of values that are less than the target. E.g. something like this:
```java
if (length >= LONG_SPECIES.length() && length - from <
LONG_SPECIES.length()) {
// less than LONG_SPECIES.length() doc IDs
LongVector vector = LongVector.fromArray(LONG_SPECIES, values, length -
LONG_SPECIES.length());
VectorMask<Long> mask = vector.compare(VectorOperators.LT, target);
return length - LONG_SPECIES.length() + mask.trueCount();
} else {
// other cases
}
```
The current implementation doesn't take advantage of it, so I don't mind
removing it, we could add it back later on if we want to take advantatge of it
since it's an internal API.
--
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]