Skip to content

Commit 00d4d1d

Browse files
committed
iter
1 parent 642bd4b commit 00d4d1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/simdvec/src/main/java/org/elasticsearch/simdvec/internal/vectorization/DefaultESVectorUtilSupport.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static float ipFloatBitImpl(float[] q, byte[] d, int start) {
210210
* The query vector should be {@link #B_QUERY}-bit quantized and striped, so that the first {@code n} bits
211211
* of the array are the initial bits of each of the {@code n} vector dimensions; the next {@code n}
212212
* bits are the second bits of each of the {@code n} vector dimensions, and so on
213-
* (this algorithm is only valid or vectors with dimensions a multiple of 8).
213+
* (this algorithm is only valid for vectors with dimensions a multiple of 8).
214214
* The striping is usually done by {@code BQSpaceUtils.transposeHalfByte}.
215215
* <p>
216216
* The data vector should be single-bit quantized.
@@ -232,8 +232,8 @@ static float ipFloatBitImpl(float[] q, byte[] d, int start) {
232232
* The final dot product result can be obtained by observing that the sum of each stripe of {@code n} bits
233233
* can be computed using the bit count of that stripe. Similar to
234234
* <a href="https://en.wikipedia.org/wiki/Multiplication_algorithm#Long_multiplication">long multiplication</a>,
235-
* the result of each stripe of {@code n} bits can be added together by shifting the value {@code n} bits to the left,
236-
* then adding to the overall result. Any carry is handled by the add operation.
235+
* the result of each stripe of {@code n} bits can be added together by shifting the value {@code s} bits to the left,
236+
* where {@code s} is the stripe number (0-3), then adding to the overall result. Any carry is handled by the add operation.
237237
*
238238
* @param q
239239
* @param d

0 commit comments

Comments
 (0)