iverase commented on code in PR #15732:
URL: https://github.com/apache/lucene/pull/15732#discussion_r2944901552
##########
lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene102/Lucene102BinaryQuantizedVectorsReader.java:
##########
@@ -448,4 +565,115 @@ BinarizedByteVectorValues getQuantizedVectorValues()
throws IOException {
return quantizedVectorValues;
}
}
+
+ // When accessing vectorValue method, targerOrd here means a row ordinal.
+ static class OffHeapBinarizedQueryVectorValues {
+ private final IndexInput slice;
+ private final int dimension;
+ private final int size;
+ protected final byte[] binaryValue;
+ protected final ByteBuffer byteBuffer;
+ private final int byteSize;
+ protected final float[] correctiveValues;
+ private int lastOrd = -1;
+ private int quantizedComponentSum;
+
+ OffHeapBinarizedQueryVectorValues(IndexInput data, int dimension, int
size) {
+ this.slice = data;
+ this.dimension = dimension;
+ this.size = size;
+ // 4x the quantized binary dimensions
+ int binaryDimensions = (discretize(dimension, 64) / 8) * QUERY_BITS;
Review Comment:
sure, done in
https://github.com/apache/lucene/pull/15732/commits/85be2001ae39b9cb430abe59d67f060030cbdf35
--
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]