< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortMaxVector.java
Print this page
*** 817,827 ****
short[] a = toArray();
int[] sa = new int[a.length];
for (int i = 0; i < a.length; i++) {
sa[i] = (int) a[i];
}
! return ShortVector.shuffleFromArray(SPECIES, sa, 0);
}
// Memory operations
private static final int ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(Unsafe.ARRAY_SHORT_INDEX_SCALE);
--- 817,827 ----
short[] a = toArray();
int[] sa = new int[a.length];
for (int i = 0; i < a.length; i++) {
sa[i] = (int) a[i];
}
! return Shuffle.fromArray(SPECIES, sa, 0);
}
// Memory operations
private static final int ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(Unsafe.ARRAY_SHORT_INDEX_SCALE);
*** 1278,1288 ****
@Override
@ForceInline
public boolean allTrue() {
return VectorIntrinsics.test(BT_overflow, ShortMaxMask.class, short.class, LENGTH,
! this, ShortVector.maskAllTrue(species()),
(m, __) -> allTrueHelper(((ShortMaxMask)m).getBits()));
}
}
// Shuffle
--- 1278,1288 ----
@Override
@ForceInline
public boolean allTrue() {
return VectorIntrinsics.test(BT_overflow, ShortMaxMask.class, short.class, LENGTH,
! this, Mask.maskAllTrue(species()),
(m, __) -> allTrueHelper(((ShortMaxMask)m).getBits()));
}
}
// Shuffle
*** 1342,1352 ****
throw new UnsupportedOperationException("Bad lane type for casting.");
}
}
@Override
! public ShortMaxShuffle rearrange(Vector.Shuffle<Short> o) {
ShortMaxShuffle s = (ShortMaxShuffle) o;
byte[] r = new byte[reorder.length];
for (int i = 0; i < reorder.length; i++) {
r[i] = reorder[s.reorder[i]];
}
--- 1342,1352 ----
throw new UnsupportedOperationException("Bad lane type for casting.");
}
}
@Override
! public ShortMaxShuffle rearrange(Shuffle<Short> o) {
ShortMaxShuffle s = (ShortMaxShuffle) o;
byte[] r = new byte[reorder.length];
for (int i = 0; i < reorder.length; i++) {
r[i] = reorder[s.reorder[i]];
}
< prev index next >