< prev index next >

test/jdk/jdk/incubator/vector/Double512VectorTests.java

Print this page
rev 55894 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz

@@ -728,10 +728,22 @@
 
 
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
     static double max(double a, double b) {
         return (double)(Math.max(a, b));
     }
 
     @Test(dataProvider = "doubleBinaryOpProvider")

@@ -774,20 +786,20 @@
 
 
 
 
 
-    static double addAll(double[] a, int idx) {
+    static double addLanes(double[] a, int idx) {
         double res = 0;
         for (int i = idx; i < (idx + SPECIES.length()); i++) {
             res += a[i];
         }
 
         return res;
     }
 
-    static double addAll(double[] a) {
+    static double addLanes(double[] a) {
         double res = 0;
         for (int i = 0; i < a.length; i += SPECIES.length()) {
             double tmp = 0;
             for (int j = 0; j < SPECIES.length(); j++) {
                 tmp += a[i + j];

@@ -796,42 +808,42 @@
         }
 
         return res;
     }
     @Test(dataProvider = "doubleUnaryOpProvider")
-    static void addAllDouble512VectorTests(IntFunction<double[]> fa) {
+    static void addLanesDouble512VectorTests(IntFunction<double[]> fa) {
         double[] a = fa.apply(SPECIES.length());
         double[] r = fr.apply(SPECIES.length());
         double ra = 0;
 
         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);
-                r[i] = av.addAll();
+                r[i] = av.addLanes();
             }
         }
 
         for (int ic = 0; ic < INVOC_COUNT; ic++) {
             ra = 0;
             for (int i = 0; i < a.length; i += SPECIES.length()) {
                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
-                ra += av.addAll();
+                ra += av.addLanes();
             }
         }
 
-        assertReductionArraysEquals(a, r, ra, Double512VectorTests::addAll, Double512VectorTests::addAll);
+        assertReductionArraysEquals(a, r, ra, Double512VectorTests::addLanes, Double512VectorTests::addLanes);
     }
-    static double mulAll(double[] a, int idx) {
+    static double mulLanes(double[] a, int idx) {
         double res = 1;
         for (int i = idx; i < (idx + SPECIES.length()); i++) {
             res *= a[i];
         }
 
         return res;
     }
 
-    static double mulAll(double[] a) {
+    static double mulLanes(double[] a) {
         double res = 1;
         for (int i = 0; i < a.length; i += SPECIES.length()) {
             double tmp = 1;
             for (int j = 0; j < SPECIES.length(); j++) {
                 tmp *= a[i + j];

@@ -840,111 +852,111 @@
         }
 
         return res;
     }
     @Test(dataProvider = "doubleUnaryOpProvider")
-    static void mulAllDouble512VectorTests(IntFunction<double[]> fa) {
+    static void mulLanesDouble512VectorTests(IntFunction<double[]> fa) {
         double[] a = fa.apply(SPECIES.length());
         double[] r = fr.apply(SPECIES.length());
         double ra = 1;
 
         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);
-                r[i] = av.mulAll();
+                r[i] = av.mulLanes();
             }
         }
 
         for (int ic = 0; ic < INVOC_COUNT; ic++) {
             ra = 1;
             for (int i = 0; i < a.length; i += SPECIES.length()) {
                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
-                ra *= av.mulAll();
+                ra *= av.mulLanes();
             }
         }
 
-        assertReductionArraysEquals(a, r, ra, Double512VectorTests::mulAll, Double512VectorTests::mulAll);
+        assertReductionArraysEquals(a, r, ra, Double512VectorTests::mulLanes, Double512VectorTests::mulLanes);
     }
-    static double minAll(double[] a, int idx) {
+    static double minLanes(double[] a, int idx) {
         double res = Double.POSITIVE_INFINITY;
         for (int i = idx; i < (idx + SPECIES.length()); i++) {
             res = (double)Math.min(res, a[i]);
         }
 
         return res;
     }
 
-    static double minAll(double[] a) {
+    static double minLanes(double[] a) {
         double res = Double.POSITIVE_INFINITY;
         for (int i = 0; i < a.length; i++) {
             res = (double)Math.min(res, a[i]);
         }
 
         return res;
     }
     @Test(dataProvider = "doubleUnaryOpProvider")
-    static void minAllDouble512VectorTests(IntFunction<double[]> fa) {
+    static void minLanesDouble512VectorTests(IntFunction<double[]> fa) {
         double[] a = fa.apply(SPECIES.length());
         double[] r = fr.apply(SPECIES.length());
         double ra = Double.POSITIVE_INFINITY;
 
         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);
-                r[i] = av.minAll();
+                r[i] = av.minLanes();
             }
         }
 
         for (int ic = 0; ic < INVOC_COUNT; ic++) {
             ra = Double.POSITIVE_INFINITY;
             for (int i = 0; i < a.length; i += SPECIES.length()) {
                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
-                ra = (double)Math.min(ra, av.minAll());
+                ra = (double)Math.min(ra, av.minLanes());
             }
         }
 
-        assertReductionArraysEquals(a, r, ra, Double512VectorTests::minAll, Double512VectorTests::minAll);
+        assertReductionArraysEquals(a, r, ra, Double512VectorTests::minLanes, Double512VectorTests::minLanes);
     }
-    static double maxAll(double[] a, int idx) {
+    static double maxLanes(double[] a, int idx) {
         double res = Double.NEGATIVE_INFINITY;
         for (int i = idx; i < (idx + SPECIES.length()); i++) {
             res = (double)Math.max(res, a[i]);
         }
 
         return res;
     }
 
-    static double maxAll(double[] a) {
+    static double maxLanes(double[] a) {
         double res = Double.NEGATIVE_INFINITY;
         for (int i = 0; i < a.length; i++) {
             res = (double)Math.max(res, a[i]);
         }
 
         return res;
     }
     @Test(dataProvider = "doubleUnaryOpProvider")
-    static void maxAllDouble512VectorTests(IntFunction<double[]> fa) {
+    static void maxLanesDouble512VectorTests(IntFunction<double[]> fa) {
         double[] a = fa.apply(SPECIES.length());
         double[] r = fr.apply(SPECIES.length());
         double ra = Double.NEGATIVE_INFINITY;
 
         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);
-                r[i] = av.maxAll();
+                r[i] = av.maxLanes();
             }
         }
 
         for (int ic = 0; ic < INVOC_COUNT; ic++) {
             ra = Double.NEGATIVE_INFINITY;
             for (int i = 0; i < a.length; i += SPECIES.length()) {
                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
-                ra = (double)Math.max(ra, av.maxAll());
+                ra = (double)Math.max(ra, av.maxLanes());
             }
         }
 
-        assertReductionArraysEquals(a, r, ra, Double512VectorTests::maxAll, Double512VectorTests::maxAll);
+        assertReductionArraysEquals(a, r, ra, Double512VectorTests::maxLanes, Double512VectorTests::maxLanes);
     }
 
 
 
 
< prev index next >