< prev index next >
test/jdk/jdk/incubator/vector/LongMaxVectorLoadStoreTests.java
Print this page
rev 54658 : refactored mask and shuffle creation methods, moved classes to top-level
@@ -27,12 +27,13 @@
* @run testng/othervm --add-opens jdk.incubator.vector/jdk.incubator.vector=ALL-UNNAMED
* LongMaxVectorLoadStoreTests
*
*/
-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.LongVector;
import org.testng.Assert;
@@ -47,17 +48,17 @@
import java.util.List;
import java.util.function.IntFunction;
@Test
public class LongMaxVectorLoadStoreTests extends AbstractVectorTest {
- static final Species<Long> SPECIES =
+ static final VectorSpecies<Long> SPECIES =
LongVector.SPECIES_MAX;
static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 10);
- static Shape getMaxBit() {
- return Shape.S_Max_BIT;
+ static VectorShape getMaxBit() {
+ return VectorShape.S_Max_BIT;
}
static void assertArraysEquals(long[] a, long[] r, boolean[] mask) {
int i = 0;
try {
@@ -204,11 +205,11 @@
static void loadStoreMaskArray(IntFunction<long[]> fa,
IntFunction<boolean[]> fm) {
long[] a = fa.apply(SPECIES.length());
long[] r = new long[a.length];
boolean[] mask = fm.apply(SPECIES.length());
- Vector.Mask<Long> vmask = LongVector.maskFromValues(SPECIES, mask);
+ VectorMask<Long> vmask = VectorMask.fromValues(SPECIES, mask);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
LongVector av = LongVector.fromArray(SPECIES, a, i, vmask);
av.intoArray(r, i);
@@ -278,11 +279,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<Long> vmask = LongVector.maskFromValues(SPECIES, mask);
+ VectorMask<Long> vmask = VectorMask.fromValues(SPECIES, mask);
int l = a.limit();
int s = SPECIES.length() * SPECIES.elementSize() / 8;
for (int ic = 0; ic < INVOC_COUNT; ic++) {
@@ -318,11 +319,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<Long> vmask = LongVector.maskFromValues(SPECIES, mask);
+ VectorMask<Long> 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 >