< prev index next >
test/jdk/jdk/incubator/vector/Short256VectorLoadStoreTests.java
Print this page
rev 54658 : refactored mask and shuffle creation methods, moved classes to top-level
@@ -26,12 +26,13 @@
* @modules jdk.incubator.vector
* @run testng Short256VectorLoadStoreTests
*
*/
-import jdk.incubator.vector.Vector.Shape;
-import jdk.incubator.vector.Vector.Species;
+import jdk.incubator.vector.VectorShape;
+import jdk.incubator.vector.VectorSpecies;
+import jdk.incubator.vector.VectorMask;
import jdk.incubator.vector.Vector;
import jdk.incubator.vector.ShortVector;
import org.testng.Assert;
@@ -44,11 +45,11 @@
import java.util.List;
import java.util.function.IntFunction;
@Test
public class Short256VectorLoadStoreTests extends AbstractVectorTest {
- static final Species<Short> SPECIES =
+ static final VectorSpecies<Short> SPECIES =
ShortVector.SPECIES_256;
static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 10);
static void assertArraysEquals(short[] a, short[] r, boolean[] mask) {
@@ -197,11 +198,11 @@
static void loadStoreMaskArray(IntFunction<short[]> fa,
IntFunction<boolean[]> fm) {
short[] a = fa.apply(SPECIES.length());
short[] r = new short[a.length];
boolean[] mask = fm.apply(SPECIES.length());
- Vector.Mask<Short> vmask = ShortVector.maskFromValues(SPECIES, mask);
+ VectorMask<Short> vmask = VectorMask.fromValues(SPECIES, mask);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ShortVector av = ShortVector.fromArray(SPECIES, a, i, vmask);
av.intoArray(r, i);
@@ -271,11 +272,11 @@
IntFunction<ByteBuffer> fb,
IntFunction<boolean[]> fm) {
ByteBuffer a = toBuffer(fa.apply(SPECIES.length()), fb);
ByteBuffer r = fb.apply(a.limit());
boolean[] mask = fm.apply(SPECIES.length());
- Vector.Mask<Short> vmask = ShortVector.maskFromValues(SPECIES, mask);
+ VectorMask<Short> vmask = VectorMask.fromValues(SPECIES, mask);
int l = a.limit();
int s = SPECIES.length() * SPECIES.elementSize() / 8;
for (int ic = 0; ic < INVOC_COUNT; ic++) {
@@ -311,11 +312,11 @@
IntFunction<boolean[]> fm) {
ByteBuffer a = toBuffer(fa.apply(SPECIES.length()), fb);
a = a.asReadOnlyBuffer().order(a.order());
ByteBuffer r = fb.apply(a.limit());
boolean[] mask = fm.apply(SPECIES.length());
- Vector.Mask<Short> vmask = ShortVector.maskFromValues(SPECIES, mask);
+ VectorMask<Short> vmask = VectorMask.fromValues(SPECIES, mask);
int l = a.limit();
int s = SPECIES.length() * SPECIES.elementSize() / 8;
for (int ic = 0; ic < INVOC_COUNT; ic++) {
< prev index next >