< prev index next >

test/jdk/jdk/incubator/vector/Double64VectorLoadStoreTests.java

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

*** 26,37 **** * @modules jdk.incubator.vector * @run testng Double64VectorLoadStoreTests * */ ! import jdk.incubator.vector.Vector.Shape; ! import jdk.incubator.vector.Vector.Species; import jdk.incubator.vector.Vector; import jdk.incubator.vector.DoubleVector; import org.testng.Assert; --- 26,38 ---- * @modules jdk.incubator.vector * @run testng Double64VectorLoadStoreTests * */ ! import jdk.incubator.vector.VectorShape; ! import jdk.incubator.vector.VectorSpecies; ! import jdk.incubator.vector.VectorMask; import jdk.incubator.vector.Vector; import jdk.incubator.vector.DoubleVector; import org.testng.Assert;
*** 44,54 **** import java.util.List; import java.util.function.IntFunction; @Test public class Double64VectorLoadStoreTests extends AbstractVectorTest { ! static final Species<Double> SPECIES = DoubleVector.SPECIES_64; static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 10); static void assertArraysEquals(double[] a, double[] r, boolean[] mask) { --- 45,55 ---- import java.util.List; import java.util.function.IntFunction; @Test public class Double64VectorLoadStoreTests extends AbstractVectorTest { ! static final VectorSpecies<Double> SPECIES = DoubleVector.SPECIES_64; static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations", 10); static void assertArraysEquals(double[] a, double[] r, boolean[] mask) {
*** 197,207 **** static void loadStoreMaskArray(IntFunction<double[]> fa, IntFunction<boolean[]> fm) { double[] a = fa.apply(SPECIES.length()); double[] r = new double[a.length]; boolean[] mask = fm.apply(SPECIES.length()); ! Vector.Mask<Double> vmask = DoubleVector.maskFromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { DoubleVector av = DoubleVector.fromArray(SPECIES, a, i, vmask); av.intoArray(r, i); --- 198,208 ---- static void loadStoreMaskArray(IntFunction<double[]> fa, IntFunction<boolean[]> fm) { double[] a = fa.apply(SPECIES.length()); double[] r = new double[a.length]; boolean[] mask = fm.apply(SPECIES.length()); ! VectorMask<Double> vmask = VectorMask.fromValues(SPECIES, mask); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < a.length; i += SPECIES.length()) { DoubleVector av = DoubleVector.fromArray(SPECIES, a, i, vmask); av.intoArray(r, i);
*** 271,281 **** 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<Double> vmask = DoubleVector.maskFromValues(SPECIES, mask); int l = a.limit(); int s = SPECIES.length() * SPECIES.elementSize() / 8; for (int ic = 0; ic < INVOC_COUNT; ic++) { --- 272,282 ---- 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()); ! VectorMask<Double> 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,321 **** 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<Double> vmask = DoubleVector.maskFromValues(SPECIES, mask); int l = a.limit(); int s = SPECIES.length() * SPECIES.elementSize() / 8; for (int ic = 0; ic < INVOC_COUNT; ic++) { --- 312,322 ---- 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()); ! VectorMask<Double> 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 >