< prev index next >

test/jdk/jdk/incubator/vector/Int256VectorTests.java

Print this page
rev 54658 : refactored mask and shuffle creation methods, moved classes to top-level

*** 25,36 **** * @test * @modules jdk.incubator.vector * @run testng/othervm -ea -esa Int256VectorTests */ ! import jdk.incubator.vector.Vector.Shape; ! import jdk.incubator.vector.Vector.Species; import jdk.incubator.vector.Vector; import jdk.incubator.vector.IntVector; import org.testng.Assert; --- 25,38 ---- * @test * @modules jdk.incubator.vector * @run testng/othervm -ea -esa Int256VectorTests */ ! import jdk.incubator.vector.VectorShape; ! import jdk.incubator.vector.VectorSpecies; ! import jdk.incubator.vector.VectorShuffle; ! import jdk.incubator.vector.VectorMask; import jdk.incubator.vector.Vector; import jdk.incubator.vector.IntVector; import org.testng.Assert;
*** 46,56 **** import java.util.stream.Stream; @Test public class Int256VectorTests extends AbstractVectorTest { ! static final Species<Integer> SPECIES = IntVector.SPECIES_256; static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 100); interface FUnOp { --- 48,58 ---- import java.util.stream.Stream; @Test public class Int256VectorTests extends AbstractVectorTest { ! static final VectorSpecies<Integer> SPECIES = IntVector.SPECIES_256; static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 100); interface FUnOp {
*** 451,461 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 453,463 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 491,501 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 493,503 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 533,543 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 535,545 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 576,586 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 578,588 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 620,630 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 622,632 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 664,674 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 666,676 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 708,718 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 710,720 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 752,762 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 754,764 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 796,806 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 798,808 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 839,849 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.aShiftR((int)b[i], vmask).intoArray(r, i); --- 841,851 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.aShiftR((int)b[i], vmask).intoArray(r, i);
*** 881,891 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.shiftR((int)b[i], vmask).intoArray(r, i); --- 883,893 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.shiftR((int)b[i], vmask).intoArray(r, i);
*** 923,933 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.shiftL((int)b[i], vmask).intoArray(r, i); --- 925,935 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.shiftL((int)b[i], vmask).intoArray(r, i);
*** 1317,1327 **** boolean[] mask = fm.apply(SPECIES.length()); boolean[] r = fmr.apply(SPECIES.length()); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < mask.length; i += SPECIES.length()) { ! Vector.Mask<Integer> vmask = IntVector.maskFromArray(SPECIES, mask, i); r[i] = vmask.anyTrue(); } } assertReductionBoolArraysEquals(mask, r, Int256VectorTests::anyTrue); --- 1319,1329 ---- boolean[] mask = fm.apply(SPECIES.length()); boolean[] r = fmr.apply(SPECIES.length()); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < mask.length; i += SPECIES.length()) { ! VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, i); r[i] = vmask.anyTrue(); } } assertReductionBoolArraysEquals(mask, r, Int256VectorTests::anyTrue);
*** 1343,1353 **** boolean[] mask = fm.apply(SPECIES.length()); boolean[] r = fmr.apply(SPECIES.length()); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < mask.length; i += SPECIES.length()) { ! Vector.Mask<Integer> vmask = IntVector.maskFromArray(SPECIES, mask, i); r[i] = vmask.allTrue(); } } assertReductionBoolArraysEquals(mask, r, Int256VectorTests::allTrue); --- 1345,1355 ---- boolean[] mask = fm.apply(SPECIES.length()); boolean[] r = fmr.apply(SPECIES.length()); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < mask.length; i += SPECIES.length()) { ! VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, i); r[i] = vmask.allTrue(); } } assertReductionBoolArraysEquals(mask, r, Int256VectorTests::allTrue);
*** 1376,1386 **** for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! Vector.Mask<Integer> mv = av.lessThan(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] < b[i + j]); } --- 1378,1388 ---- for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! VectorMask<Integer> mv = av.lessThan(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] < b[i + j]); }
*** 1396,1406 **** for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! Vector.Mask<Integer> mv = av.greaterThan(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] > b[i + j]); } --- 1398,1408 ---- for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! VectorMask<Integer> mv = av.greaterThan(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] > b[i + j]); }
*** 1416,1426 **** for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! Vector.Mask<Integer> mv = av.equal(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] == b[i + j]); } --- 1418,1428 ---- for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! VectorMask<Integer> mv = av.equal(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] == b[i + j]); }
*** 1436,1446 **** for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! Vector.Mask<Integer> mv = av.notEqual(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] != b[i + j]); } --- 1438,1448 ---- for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! VectorMask<Integer> mv = av.notEqual(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] != b[i + j]); }
*** 1456,1466 **** for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! Vector.Mask<Integer> mv = av.lessThanEq(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] <= b[i + j]); } --- 1458,1468 ---- for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! VectorMask<Integer> mv = av.lessThanEq(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] <= b[i + j]); }
*** 1476,1486 **** for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! Vector.Mask<Integer> mv = av.greaterThanEq(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] >= b[i + j]); } --- 1478,1488 ---- for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); ! VectorMask<Integer> mv = av.greaterThanEq(bv); // Check results as part of computation. for (int j = 0; j < SPECIES.length(); j++) { Assert.assertEquals(mv.getElement(j), a[i + j] >= b[i + j]); }
*** 1498,1508 **** IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i); --- 1500,1510 ---- IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] b = fb.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); IntVector bv = IntVector.fromArray(SPECIES, b, i);
*** 1521,1531 **** int[] r = fr.apply(SPECIES.length()); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); ! av.rearrange(IntVector.shuffleFromArray(SPECIES, order, i)).intoArray(r, i); } } assertRearrangeArraysEquals(a, r, order, SPECIES.length()); } --- 1523,1533 ---- int[] r = fr.apply(SPECIES.length()); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); ! av.rearrange(VectorShuffle.fromArray(SPECIES, order, i)).intoArray(r, i); } } assertRearrangeArraysEquals(a, r, order, SPECIES.length()); }
*** 1733,1743 **** static void negMaskedInt256VectorTests(IntFunction<int[]> fa, IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.neg(vmask).intoArray(r, i); --- 1735,1745 ---- static void negMaskedInt256VectorTests(IntFunction<int[]> fa, IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.neg(vmask).intoArray(r, i);
*** 1770,1780 **** static void absMaskedInt256VectorTests(IntFunction<int[]> fa, IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.abs(vmask).intoArray(r, i); --- 1772,1782 ---- static void absMaskedInt256VectorTests(IntFunction<int[]> fa, IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.abs(vmask).intoArray(r, i);
*** 1812,1822 **** static void notMaskedInt256VectorTests(IntFunction<int[]> fa, IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Integer> vmask = IntVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.not(vmask).intoArray(r, i); --- 1814,1824 ---- static void notMaskedInt256VectorTests(IntFunction<int[]> fa, IntFunction<boolean[]> fm) { int[] a = fa.apply(SPECIES.length()); int[] r = fr.apply(SPECIES.length()); boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Integer> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { IntVector av = IntVector.fromArray(SPECIES, a, i); av.not(vmask).intoArray(r, i);
< prev index next >