--- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java 2019-04-26 14:50:23.474806000 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java 2019-04-26 14:50:22.851956600 -0700 @@ -112,7 +112,7 @@ @ForceInline @SuppressWarnings("unchecked") public static FloatVector zero(VectorSpecies species) { - return VectorIntrinsics.broadcastCoerced((Class) species.boxType(), float.class, species.length(), + return VectorIntrinsics.broadcastCoerced((Class) species.vectorType(), float.class, species.length(), Float.floatToIntBits(0.0f), species, ((bits, s) -> ((FloatSpecies)s).op(i -> Float.intBitsToFloat((int)bits)))); } @@ -142,7 +142,7 @@ public static FloatVector 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(), float.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), float.class, species.length(), a, ((long) offset) + Unsafe.ARRAY_BYTE_BASE_OFFSET, a, offset, species, (c, idx, s) -> { @@ -200,7 +200,7 @@ public static FloatVector fromArray(VectorSpecies species, float[] a, int offset){ Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.length()); - return VectorIntrinsics.load((Class) species.boxType(), float.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), float.class, species.length(), a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_FLOAT_BASE_OFFSET, a, offset, species, (c, idx, s) -> ((FloatSpecies)s).op(n -> c[idx + n])); @@ -263,8 +263,8 @@ vix = VectorIntrinsics.checkIndex(vix, a.length); - return VectorIntrinsics.loadWithMap((Class) species.boxType(), float.class, species.length(), - IntVector.species(species.indexShape()).boxType(), a, Unsafe.ARRAY_FLOAT_BASE_OFFSET, vix, + return VectorIntrinsics.loadWithMap((Class) species.vectorType(), float.class, species.length(), + IntVector.species(species.indexShape()).vectorType(), a, Unsafe.ARRAY_FLOAT_BASE_OFFSET, vix, a, a_offset, indexMap, i_offset, species, (float[] c, int idx, int[] iMap, int idy, VectorSpecies s) -> ((FloatSpecies)s).op(n -> c[idx + iMap[idy+n]])); @@ -333,7 +333,7 @@ throw new IllegalArgumentException(); } offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE); - return VectorIntrinsics.load((Class) species.boxType(), float.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), float.class, species.length(), U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + offset, bb, offset, species, (c, idx, s) -> { @@ -389,7 +389,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} */ @@ -397,7 +397,7 @@ @SuppressWarnings("unchecked") public static FloatVector broadcast(VectorSpecies species, float e) { return VectorIntrinsics.broadcastCoerced( - (Class) species.boxType(), float.class, species.length(), + (Class) species.vectorType(), float.class, species.length(), Float.floatToIntBits(e), species, ((bits, sp) -> ((FloatSpecies)sp).op(i -> Float.intBitsToFloat((int)bits)))); } @@ -421,7 +421,7 @@ public static FloatVector scalars(VectorSpecies species, float... es) { Objects.requireNonNull(es); int ix = VectorIntrinsics.checkIndex(0, es.length, species.length()); - return VectorIntrinsics.load((Class) species.boxType(), float.class, species.length(), + return VectorIntrinsics.load((Class) species.vectorType(), float.class, species.length(), es, Unsafe.ARRAY_FLOAT_BASE_OFFSET, es, ix, species, (c, idx, sp) -> ((FloatSpecies)sp).op(n -> c[idx + n])); @@ -799,25 +799,25 @@ * {@inheritDoc} */ @Override - public abstract FloatVector rotateEL(int i); + public abstract FloatVector rotateLanesLeft(int i); /** * {@inheritDoc} */ @Override - public abstract FloatVector rotateER(int i); + public abstract FloatVector rotateLanesRight(int i); /** * {@inheritDoc} */ @Override - public abstract FloatVector shiftEL(int i); + public abstract FloatVector shiftLanesLeft(int i); /** * {@inheritDoc} */ @Override - public abstract FloatVector shiftER(int i); + public abstract FloatVector shiftLanesRight(int i); /** * Divides this vector by an input vector. @@ -1719,7 +1719,7 @@ * * @return the addition of all the lane elements of this vector */ - public abstract float addAll(); + public abstract float addLanes(); /** * Adds all lane elements of this vector, selecting lane elements @@ -1741,7 +1741,7 @@ * @param m the mask controlling lane selection * @return the addition of the selected lane elements of this vector */ - public abstract float addAll(VectorMask m); + public abstract float addLanes(VectorMask m); /** * Multiplies all lane elements of this vector. @@ -1760,7 +1760,7 @@ * * @return the multiplication of all the lane elements of this vector */ - public abstract float mulAll(); + public abstract float mulLanes(); /** * Multiplies all lane elements of this vector, selecting lane elements @@ -1781,7 +1781,7 @@ * @param m the mask controlling lane selection * @return the multiplication of all the lane elements of this vector */ - public abstract float mulAll(VectorMask m); + public abstract float mulLanes(VectorMask m); /** * Returns the minimum lane element of this vector. @@ -1793,7 +1793,7 @@ * * @return the minimum lane element of this vector */ - public abstract float minAll(); + public abstract float minLanes(); /** * Returns the minimum lane element of this vector, selecting lane elements @@ -1807,7 +1807,7 @@ * @param m the mask controlling lane selection * @return the minimum lane element of this vector */ - public abstract float minAll(VectorMask m); + public abstract float minLanes(VectorMask m); /** * Returns the maximum lane element of this vector. @@ -1819,7 +1819,7 @@ * * @return the maximum lane element of this vector */ - public abstract float maxAll(); + public abstract float maxLanes(); /** * Returns the maximum lane element of this vector, selecting lane elements @@ -1833,7 +1833,7 @@ * @param m the mask controlling lane selection * @return the maximum lane element of this vector */ - public abstract float maxAll(VectorMask m); + public abstract float maxLanes(VectorMask m); // Type specific accessors @@ -1977,13 +1977,13 @@ final Function vectorFactory; private FloatSpecies(VectorShape shape, - Class boxType, + Class vectorType, Class maskType, Function vectorFactory, Function> maskFactory, Function> shuffleFromArrayFactory, fShuffleFromArray shuffleFromOpFactory) { - super(shape, float.class, Float.SIZE, boxType, maskType, maskFactory, + super(shape, float.class, Float.SIZE, vectorType, maskType, maskFactory, shuffleFromArrayFactory, shuffleFromOpFactory); this.vectorFactory = vectorFactory; }