File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
lib/src/main/java/dev/linl33/adventofcode/lib/graph Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -185,14 +185,10 @@ private static <R> R aStarIntInternal(int start,
185
185
}
186
186
187
187
minFScore = minVector .reduceLanes (VectorOperators .MIN );
188
- minVector = (IntVector ) SPECIES .broadcast (minFScore );
189
-
190
- for (int i = 0 ; i < alignedSize ; i += SPECIES .length ()) {
191
- var next = SPECIES .fromArray (openSetFScore , i );
192
- var eqMask = next .compare (VectorOperators .EQ , minVector );
193
- var eqIdx = eqMask .firstTrue ();
194
- if (eqIdx != SPECIES .length ()) {
195
- minNode = i + eqIdx ;
188
+ var idx = minVector .compare (VectorOperators .EQ , minFScore ).firstTrue ();
189
+ for (int i = idx ; i < size ; i += SPECIES .length ()) {
190
+ if (openSetFScore [i ] == minFScore ) {
191
+ minNode = i ;
196
192
break ;
197
193
}
198
194
}
You can’t perform that action at this time.
0 commit comments