--- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java 2019-04-26 14:49:56.485302900 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java 2019-04-26 14:49:55.887870900 -0700 @@ -112,7 +112,7 @@ @ForceInline @SuppressWarnings("unchecked") public static DoubleVector zero(VectorSpecies species) { - return VectorIntrinsics.broadcastCoerced((Class) species.boxType(), double.class, species.length(), + return VectorIntrinsics.broadcastCoerced((Class) species.vectorType(), double.class, species.length(), Double.doubleToLongBits(0.0f), species, ((bits, s) -> ((DoubleSpecies)s).op(i -> Double.longBitsToDouble((long)bits)))); } @@ -142,7 +142,7 @@ public static DoubleVector fromByteArray(VectorSpecies species, byte[] a, int offset) { Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE); - return VectorIntrinsics.load((Class) species.boxType(), double.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), double.class, species.length(), a, ((long) offset) + Unsafe.ARRAY_BYTE_BASE_OFFSET, a, offset, species, (c, idx, s) -> { @@ -200,7 +200,7 @@ public static DoubleVector fromArray(VectorSpecies species, double[] a, int offset){ Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.length()); - return VectorIntrinsics.load((Class) species.boxType(), double.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), double.class, species.length(), a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_DOUBLE_BASE_OFFSET, a, offset, species, (c, idx, s) -> ((DoubleSpecies)s).op(n -> c[idx + n])); @@ -266,8 +266,8 @@ vix = VectorIntrinsics.checkIndex(vix, a.length); - return VectorIntrinsics.loadWithMap((Class) species.boxType(), double.class, species.length(), - IntVector.species(species.indexShape()).boxType(), a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, vix, + return VectorIntrinsics.loadWithMap((Class) species.vectorType(), double.class, species.length(), + IntVector.species(species.indexShape()).vectorType(), a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, vix, a, a_offset, indexMap, i_offset, species, (double[] c, int idx, int[] iMap, int idy, VectorSpecies s) -> ((DoubleSpecies)s).op(n -> c[idx + iMap[idy+n]])); @@ -336,7 +336,7 @@ throw new IllegalArgumentException(); } offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE); - return VectorIntrinsics.load((Class) species.boxType(), double.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), double.class, species.length(), U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + offset, bb, offset, species, (c, idx, s) -> { @@ -392,7 +392,7 @@ * value {@code e}. * * @param species species of the desired vector - * @param e the value + * @param e the value to be broadcasted * @return a vector of vector where all lane elements are set to * the primitive value {@code e} */ @@ -400,7 +400,7 @@ @SuppressWarnings("unchecked") public static DoubleVector broadcast(VectorSpecies species, double e) { return VectorIntrinsics.broadcastCoerced( - (Class) species.boxType(), double.class, species.length(), + (Class) species.vectorType(), double.class, species.length(), Double.doubleToLongBits(e), species, ((bits, sp) -> ((DoubleSpecies)sp).op(i -> Double.longBitsToDouble((long)bits)))); } @@ -424,7 +424,7 @@ public static DoubleVector scalars(VectorSpecies species, double... es) { Objects.requireNonNull(es); int ix = VectorIntrinsics.checkIndex(0, es.length, species.length()); - return VectorIntrinsics.load((Class) species.boxType(), double.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), double.class, species.length(), es, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, es, ix, species, (c, idx, sp) -> ((DoubleSpecies)sp).op(n -> c[idx + n])); @@ -802,25 +802,25 @@ * {@inheritDoc} */ @Override - public abstract DoubleVector rotateEL(int i); + public abstract DoubleVector rotateLanesLeft(int i); /** * {@inheritDoc} */ @Override - public abstract DoubleVector rotateER(int i); + public abstract DoubleVector rotateLanesRight(int i); /** * {@inheritDoc} */ @Override - public abstract DoubleVector shiftEL(int i); + public abstract DoubleVector shiftLanesLeft(int i); /** * {@inheritDoc} */ @Override - public abstract DoubleVector shiftER(int i); + public abstract DoubleVector shiftLanesRight(int i); /** * Divides this vector by an input vector. @@ -1722,7 +1722,7 @@ * * @return the addition of all the lane elements of this vector */ - public abstract double addAll(); + public abstract double addLanes(); /** * Adds all lane elements of this vector, selecting lane elements @@ -1744,7 +1744,7 @@ * @param m the mask controlling lane selection * @return the addition of the selected lane elements of this vector */ - public abstract double addAll(VectorMask m); + public abstract double addLanes(VectorMask m); /** * Multiplies all lane elements of this vector. @@ -1763,7 +1763,7 @@ * * @return the multiplication of all the lane elements of this vector */ - public abstract double mulAll(); + public abstract double mulLanes(); /** * Multiplies all lane elements of this vector, selecting lane elements @@ -1784,7 +1784,7 @@ * @param m the mask controlling lane selection * @return the multiplication of all the lane elements of this vector */ - public abstract double mulAll(VectorMask m); + public abstract double mulLanes(VectorMask m); /** * Returns the minimum lane element of this vector. @@ -1796,7 +1796,7 @@ * * @return the minimum lane element of this vector */ - public abstract double minAll(); + public abstract double minLanes(); /** * Returns the minimum lane element of this vector, selecting lane elements @@ -1810,7 +1810,7 @@ * @param m the mask controlling lane selection * @return the minimum lane element of this vector */ - public abstract double minAll(VectorMask m); + public abstract double minLanes(VectorMask m); /** * Returns the maximum lane element of this vector. @@ -1822,7 +1822,7 @@ * * @return the maximum lane element of this vector */ - public abstract double maxAll(); + public abstract double maxLanes(); /** * Returns the maximum lane element of this vector, selecting lane elements @@ -1836,7 +1836,7 @@ * @param m the mask controlling lane selection * @return the maximum lane element of this vector */ - public abstract double maxAll(VectorMask m); + public abstract double maxLanes(VectorMask m); // Type specific accessors @@ -1980,13 +1980,13 @@ final Function vectorFactory; private DoubleSpecies(VectorShape shape, - Class boxType, + Class vectorType, Class maskType, Function vectorFactory, Function> maskFactory, Function> shuffleFromArrayFactory, fShuffleFromArray shuffleFromOpFactory) { - super(shape, double.class, Double.SIZE, boxType, maskType, maskFactory, + super(shape, double.class, Double.SIZE, vectorType, maskType, maskFactory, shuffleFromArrayFactory, shuffleFromOpFactory); this.vectorFactory = vectorFactory; }