use firstTrue for XiaohongGong

This commit is contained in:
Emanuel Peter 2026-01-20 08:20:28 +01:00
parent bf357124c0
commit 8dc77b735c
2 changed files with 2 additions and 4 deletions

View File

@ -594,8 +594,7 @@ public class VectorAlgorithmsImpl {
IntVector v = IntVector.fromArray(SPECIES_I, a, i);
var mask = v.compare(VectorOperators.EQ, es);
if (mask.anyTrue()) {
var ml = mask.toLong();
return i + Long.numberOfTrailingZeros(ml);
return i + mask.firstTrue();
}
}
for (; i < a.length; i++) {

View File

@ -594,8 +594,7 @@ public class VectorAlgorithmsImpl {
IntVector v = IntVector.fromArray(SPECIES_I, a, i);
var mask = v.compare(VectorOperators.EQ, es);
if (mask.anyTrue()) {
var ml = mask.toLong();
return i + Long.numberOfTrailingZeros(ml);
return i + mask.firstTrue();
}
}
for (; i < a.length; i++) {