< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java

Print this page

        

@@ -110,11 +110,11 @@
      * @return a zero vector of given species
      */
     @ForceInline
     @SuppressWarnings("unchecked")
     public static DoubleVector zero(VectorSpecies<Double> species) {
-        return VectorIntrinsics.broadcastCoerced((Class<DoubleVector>) species.boxType(), double.class, species.length(),
+        return VectorIntrinsics.broadcastCoerced((Class<DoubleVector>) species.vectorType(), double.class, species.length(),
                                                  Double.doubleToLongBits(0.0f), species,
                                                  ((bits, s) -> ((DoubleSpecies)s).op(i -> Double.longBitsToDouble((long)bits))));
     }
 
     /**

@@ -140,11 +140,11 @@
     @ForceInline
     @SuppressWarnings("unchecked")
     public static DoubleVector fromByteArray(VectorSpecies<Double> species, byte[] a, int offset) {
         Objects.requireNonNull(a);
         offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
-        return VectorIntrinsics.load((Class<DoubleVector>) species.boxType(), double.class, species.length(),
+        return VectorIntrinsics.load((Class<DoubleVector>) species.vectorType(), double.class, species.length(),
                                      a, ((long) offset) + Unsafe.ARRAY_BYTE_BASE_OFFSET,
                                      a, offset, species,
                                      (c, idx, s) -> {
                                          ByteBuffer bbc = ByteBuffer.wrap(c, idx, a.length - idx).order(ByteOrder.nativeOrder());
                                          DoubleBuffer tb = bbc.asDoubleBuffer();

@@ -198,11 +198,11 @@
     @ForceInline
     @SuppressWarnings("unchecked")
     public static DoubleVector fromArray(VectorSpecies<Double> species, double[] a, int offset){
         Objects.requireNonNull(a);
         offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
-        return VectorIntrinsics.load((Class<DoubleVector>) species.boxType(), double.class, species.length(),
+        return VectorIntrinsics.load((Class<DoubleVector>) 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]));
     }
 

@@ -264,12 +264,12 @@
         // Index vector: vix[0:n] = k -> a_offset + indexMap[i_offset + k]
         IntVector vix = IntVector.fromArray(IntVector.species(species.indexShape()), indexMap, i_offset).add(a_offset);
 
         vix = VectorIntrinsics.checkIndex(vix, a.length);
 
-        return VectorIntrinsics.loadWithMap((Class<DoubleVector>) species.boxType(), double.class, species.length(),
-                                            IntVector.species(species.indexShape()).boxType(), a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, vix,
+        return VectorIntrinsics.loadWithMap((Class<DoubleVector>) 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<Double> s) ->
                                                 ((DoubleSpecies)s).op(n -> c[idx + iMap[idy+n]]));
         }
 

@@ -334,11 +334,11 @@
     public static DoubleVector fromByteBuffer(VectorSpecies<Double> species, ByteBuffer bb, int offset) {
         if (bb.order() != ByteOrder.nativeOrder()) {
             throw new IllegalArgumentException();
         }
         offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE);
-        return VectorIntrinsics.load((Class<DoubleVector>) species.boxType(), double.class, species.length(),
+        return VectorIntrinsics.load((Class<DoubleVector>) species.vectorType(), double.class, species.length(),
                                      U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + offset,
                                      bb, offset, species,
                                      (c, idx, s) -> {
                                          ByteBuffer bbc = c.duplicate().position(idx).order(ByteOrder.nativeOrder());
                                          DoubleBuffer tb = bbc.asDoubleBuffer();

@@ -398,11 +398,11 @@
      */
     @ForceInline
     @SuppressWarnings("unchecked")
     public static DoubleVector broadcast(VectorSpecies<Double> species, double e) {
         return VectorIntrinsics.broadcastCoerced(
-            (Class<DoubleVector>) species.boxType(), double.class, species.length(),
+            (Class<DoubleVector>) species.vectorType(), double.class, species.length(),
             Double.doubleToLongBits(e), species,
             ((bits, sp) -> ((DoubleSpecies)sp).op(i -> Double.longBitsToDouble((long)bits))));
     }
 
     /**

@@ -422,11 +422,11 @@
     @ForceInline
     @SuppressWarnings("unchecked")
     public static DoubleVector scalars(VectorSpecies<Double> species, double... es) {
         Objects.requireNonNull(es);
         int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
-        return VectorIntrinsics.load((Class<DoubleVector>) species.boxType(), double.class, species.length(),
+        return VectorIntrinsics.load((Class<DoubleVector>) 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]));
     }
 

@@ -800,29 +800,29 @@
 
     /**
      * {@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.
      * <p>
      * This is a lane-wise binary operation which applies the primitive division

@@ -1978,17 +1978,17 @@
      */
     static final class DoubleSpecies extends AbstractSpecies<Double> {
         final Function<double[], DoubleVector> vectorFactory;
 
         private DoubleSpecies(VectorShape shape,
-                          Class<?> boxType,
+                          Class<?> vectorType,
                           Class<?> maskType,
                           Function<double[], DoubleVector> vectorFactory,
                           Function<boolean[], VectorMask<Double>> maskFactory,
                           Function<IntUnaryOperator, VectorShuffle<Double>> shuffleFromArrayFactory,
                           fShuffleFromArray<Double> shuffleFromOpFactory) {
-            super(shape, double.class, Double.SIZE, boxType, maskType, maskFactory,
+            super(shape, double.class, Double.SIZE, vectorType, maskType, maskFactory,
                   shuffleFromArrayFactory, shuffleFromOpFactory);
             this.vectorFactory = vectorFactory;
         }
 
         interface FOp {
< prev index next >