You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/simdvec/src/main21/java/org/elasticsearch/simdvec/internal/vectorization/PanamaESVectorUtilSupport.java
+8-24Lines changed: 8 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -238,7 +238,6 @@ static int ipByteBit512(byte[] q, byte[] d) {
238
238
239
239
sectionLength = INT_SPECIES_256.length();
240
240
if (q.length - i >= sectionLength) {
241
-
// don't unroll this, we want to catch as many as we can before going scalar
242
241
IntVectoracc = IntVector.zero(INT_SPECIES_256);
243
242
intlimit = limit(q.length, sectionLength);
244
243
for (; i < limit; i += sectionLength) {
@@ -252,11 +251,8 @@ static int ipByteBit512(byte[] q, byte[] d) {
252
251
sum += acc.reduceLanes(VectorOperators.ADD);
253
252
}
254
253
255
-
if (i < q.length) {
256
-
// do the tail
257
-
// default implementation uses length of data vector, not query vector
258
-
sum += DefaultESVectorUtilSupport.ipByteBitImpl(q, d, i / 8);
259
-
}
254
+
// that should have got them all (q.length is a multiple of 8, which fits in a 256-bit vector)
255
+
asserti == q.length;
260
256
returnsum;
261
257
}
262
258
@@ -295,11 +291,8 @@ static int ipByteBit256(byte[] q, byte[] d) {
295
291
+ acc3.reduceLanes(VectorOperators.ADD);
296
292
}
297
293
298
-
if (i < q.length) {
299
-
// do the tail
300
-
// default implementation uses length of data vector, not query vector
301
-
sum += DefaultESVectorUtilSupport.ipByteBitImpl(q, d, i / 8);
302
-
}
294
+
// that should have got them all (q.length is a multiple of 8, which fits in a 256-bit vector)
0 commit comments