< prev index next >

test/jdk/jdk/incubator/vector/DoubleMaxVectorTests.java

Print this page
*** 63,11 ***
          return VectorShape.S_Max_BIT;
      }
  
      private static final int Max = 256;  // juts so we can do N/Max
  
-     private static final double CONST_SHIFT = Double.SIZE / 2;
  
      static final int BUFFER_REPS = Integer.getInteger("jdk.incubator.vector.test.buffer-vectors", 25000 / Max);
  
      interface FUnOp {
          double apply(double a);
--- 63,10 ---

*** 264,10 ***
--- 263,59 ---
              int idx = i + j;
              Assert.assertEquals(r[i+j], a[i+order[i+j]], "at index #" + idx + ", input = " + a[i+order[i+j]]);
          }
      }
  
+     static void assertcompressArraysEquals(double[] r, double[] a, boolean[] m, int vector_len) {
+         int i = 0, j = 0, k = 0;
+         try {
+             for (; i < a.length; i += vector_len) {
+                 k = 0;
+                 for (j = 0; j < vector_len; j++) {
+                     if (m[(i + j) % SPECIES.length()]) {
+                         Assert.assertEquals(r[i + k], a[i + j]);
+                         k++;
+                     }
+                 }
+                 for (; k < vector_len; k++) {
+                     Assert.assertEquals(r[i + k], (double)0);
+                 }
+             }
+         } catch (AssertionError e) {
+             int idx = i + k;
+             if (m[(i + j) % SPECIES.length()]) {
+                 Assert.assertEquals(r[idx], a[i + j], "at index #" + idx);
+             } else {
+                 Assert.assertEquals(r[idx], (double)0, "at index #" + idx);
+             }
+         }
+     }
+ 
+     static void assertexpandArraysEquals(double[] r, double[] a, boolean[] m, int vector_len) {
+         int i = 0, j = 0, k = 0;
+         try {
+             for (; i < a.length; i += vector_len) {
+                 k = 0;
+                 for (j = 0; j < vector_len; j++) {
+                     if (m[(i + j) % SPECIES.length()]) {
+                         Assert.assertEquals(r[i + j], a[i + k]);
+                         k++;
+                     } else {
+                         Assert.assertEquals(r[i + j], (double)0);
+                     }
+                 }
+             }
+         } catch (AssertionError e) {
+             int idx = i + j;
+             if (m[idx % SPECIES.length()]) {
+                 Assert.assertEquals(r[idx], a[i + k], "at index #" + idx);
+             } else {
+                 Assert.assertEquals(r[idx], (double)0, "at index #" + idx);
+             }
+         }
+     }
+ 
      static void assertSelectFromArraysEquals(double[] r, double[] a, double[] order, int vector_len) {
          int i = 0, j = 0;
          try {
              for (; i < a.length; i += vector_len) {
                  for (j = 0; j < vector_len; j++) {

*** 1016,12 ***
          } catch (AssertionError e) {
              Assert.assertEquals(r[i], (long)(a[i+offs]), "at index #" + i + ", input = " + a[i+offs]);
          }
      }
  
- 
- 
      static long bits(double e) {
          return  Double.doubleToLongBits(e);
      }
  
      static final List<IntFunction<double[]>> DOUBLE_GENERATORS = List.of(
--- 1064,10 ---

*** 1201,11 ***
                          return new Object[] {fa, fs, fm};
                  }))).
                  toArray(Object[][]::new);
      }
  
- 
      static final List<IntFunction<double[]>> DOUBLE_COMPARE_GENERATORS = List.of(
              withToString("double[i]", (int s) -> {
                  return fill(s * BUFFER_REPS,
                              i -> (double)i);
              }),
--- 1247,10 ---

*** 1322,11 ***
      static final IntFunction<long[]> lfr = (vl) -> {
          int length = BUFFER_REPS * vl;
          return new long[length];
      };
  
- 
      static boolean eq(double a, double b) {
          return a == b;
      }
  
      static boolean neq(double a, double b) {
--- 1367,10 ---

*** 1347,11 ***
  
      static boolean ge(double a, double b) {
          return a >= b;
      }
  
- 
      static double firstNonZero(double a, double b) {
          return Double.compare(a, (double) 0) != 0 ? a : b;
      }
  
      @Test
--- 1391,10 ---

*** 1464,10 ***
--- 1507,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::ADD);
      }
+ 
      static double add(double a, double b) {
          return (double)(a + b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 1520,10 ***
--- 1564,11 ---
              av.add(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, DoubleMaxVectorTests::add);
      }
+ 
      static double SUB(double a, double b) {
          return (double)(a - b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 1540,10 ***
--- 1585,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::SUB);
      }
+ 
      static double sub(double a, double b) {
          return (double)(a - b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 1596,10 ***
--- 1642,11 ---
              av.sub(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, DoubleMaxVectorTests::sub);
      }
+ 
      static double MUL(double a, double b) {
          return (double)(a * b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 1616,10 ***
--- 1663,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::MUL);
      }
+ 
      static double mul(double a, double b) {
          return (double)(a * b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 1693,10 ***
--- 1741,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::DIV);
      }
+ 
      static double div(double a, double b) {
          return (double)(a / b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 1712,12 ***
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "doubleBinaryOpMaskProvider")
      static void DIVDoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<double[]> fb,
                                            IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 1761,10 ---

*** 1752,12 ***
          }
  
          assertArraysEquals(r, a, b, mask, DoubleMaxVectorTests::div);
      }
  
- 
- 
      static double FIRST_NONZERO(double a, double b) {
          return (double)(Double.doubleToLongBits(a)!=0?a:b);
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")
--- 1799,10 ---

*** 1795,18 ***
          }
  
          assertArraysEquals(r, a, b, mask, DoubleMaxVectorTests::FIRST_NONZERO);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
      @Test(dataProvider = "doubleBinaryOpProvider")
      static void addDoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
--- 1840,10 ---

*** 1896,11 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, DoubleMaxVectorTests::mul);
      }
  
- 
      @Test(dataProvider = "doubleBinaryOpProvider")
      static void divDoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
--- 1933,10 ---

*** 1911,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, DoubleMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "doubleBinaryOpMaskProvider")
      static void divDoubleMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb,
                                            IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 1947,10 ---

*** 1930,19 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, DoubleMaxVectorTests::div);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
      @Test(dataProvider = "doubleBinaryOpProvider")
      static void ADDDoubleMaxVectorTestsBroadcastLongSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
--- 1964,10 ---

*** 1970,67 ***
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, DoubleMaxVectorTests::ADD);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
      static double MIN(double a, double b) {
          return (double)(Math.min(a, b));
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")
--- 1995,10 ---

*** 2047,10 ***
--- 2015,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::MIN);
      }
+ 
      static double min(double a, double b) {
          return (double)(Math.min(a, b));
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 2065,10 ***
--- 2034,11 ---
              av.min(bv).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::min);
      }
+ 
      static double MAX(double a, double b) {
          return (double)(Math.max(a, b));
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 2085,10 ***
--- 2055,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, DoubleMaxVectorTests::MAX);
      }
+ 
      static double max(double a, double b) {
          return (double)(Math.max(a, b));
      }
  
      @Test(dataProvider = "doubleBinaryOpProvider")

*** 2160,21 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, DoubleMaxVectorTests::max);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
      static double ADDReduce(double[] a, int idx) {
          double res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res += a[i];
          }
--- 2131,10 ---

*** 2188,10 ***
--- 2148,11 ---
              res += ADDReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void ADDReduceDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          double ra = 0;

*** 2212,10 ***
--- 2173,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  DoubleMaxVectorTests::ADDReduce, DoubleMaxVectorTests::ADDReduceAll);
      }
+ 
      static double ADDReduceMasked(double[] a, int idx, boolean[] mask) {
          double res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res += a[i];

*** 2230,10 ***
--- 2192,11 ---
              res += ADDReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpMaskProvider")
      static void ADDReduceDoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 2256,10 ***
--- 2219,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  DoubleMaxVectorTests::ADDReduceMasked, DoubleMaxVectorTests::ADDReduceAllMasked);
      }
+ 
      static double MULReduce(double[] a, int idx) {
          double res = 1;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res *= a[i];
          }

*** 2273,10 ***
--- 2237,11 ---
              res *= MULReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void MULReduceDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          double ra = 1;

*** 2297,10 ***
--- 2262,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  DoubleMaxVectorTests::MULReduce, DoubleMaxVectorTests::MULReduceAll);
      }
+ 
      static double MULReduceMasked(double[] a, int idx, boolean[] mask) {
          double res = 1;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res *= a[i];

*** 2315,10 ***
--- 2281,11 ---
              res *= MULReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpMaskProvider")
      static void MULReduceDoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 2341,10 ***
--- 2308,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  DoubleMaxVectorTests::MULReduceMasked, DoubleMaxVectorTests::MULReduceAllMasked);
      }
+ 
      static double MINReduce(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]);
          }

*** 2358,10 ***
--- 2326,11 ---
              res = (double) Math.min(res, MINReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void MINReduceDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          double ra = Double.POSITIVE_INFINITY;

*** 2382,10 ***
--- 2351,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  DoubleMaxVectorTests::MINReduce, DoubleMaxVectorTests::MINReduceAll);
      }
+ 
      static double MINReduceMasked(double[] a, int idx, boolean[] mask) {
          double res = Double.POSITIVE_INFINITY;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (double) Math.min(res, a[i]);

*** 2400,10 ***
--- 2370,11 ---
              res = (double) Math.min(res, MINReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpMaskProvider")
      static void MINReduceDoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 2426,10 ***
--- 2397,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  DoubleMaxVectorTests::MINReduceMasked, DoubleMaxVectorTests::MINReduceAllMasked);
      }
+ 
      static double MAXReduce(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]);
          }

*** 2443,10 ***
--- 2415,11 ---
              res = (double) Math.max(res, MAXReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void MAXReduceDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          double ra = Double.NEGATIVE_INFINITY;

*** 2467,10 ***
--- 2440,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  DoubleMaxVectorTests::MAXReduce, DoubleMaxVectorTests::MAXReduceAll);
      }
+ 
      static double MAXReduceMasked(double[] a, int idx, boolean[] mask) {
          double res = Double.NEGATIVE_INFINITY;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (double) Math.max(res, a[i]);

*** 2485,10 ***
--- 2459,11 ---
              res = (double) Math.max(res, MAXReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpMaskProvider")
      static void MAXReduceDoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 2511,10 ***
--- 2486,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  DoubleMaxVectorTests::MAXReduceMasked, DoubleMaxVectorTests::MAXReduceAllMasked);
      }
+ 
      static double FIRST_NONZEROReduce(double[] a, int idx) {
          double res = (double) 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = firstNonZero(res, a[i]);
          }

*** 2528,10 ***
--- 2504,11 ---
              res = firstNonZero(res, FIRST_NONZEROReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void FIRST_NONZEROReduceDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          double ra = (double) 0;

*** 2552,10 ***
--- 2529,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  DoubleMaxVectorTests::FIRST_NONZEROReduce, DoubleMaxVectorTests::FIRST_NONZEROReduceAll);
      }
+ 
      static double FIRST_NONZEROReduceMasked(double[] a, int idx, boolean[] mask) {
          double res = (double) 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = firstNonZero(res, a[i]);

*** 2570,10 ***
--- 2548,11 ---
              res = firstNonZero(res, FIRST_NONZEROReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "doubleUnaryOpMaskProvider")
      static void FIRST_NONZEROReduceDoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 2597,14 ***
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  DoubleMaxVectorTests::FIRST_NONZEROReduceMasked, DoubleMaxVectorTests::FIRST_NONZEROReduceAllMasked);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void withDoubleMaxVectorTests(IntFunction<double []> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
  
--- 2576,10 ---

*** 2618,10 ***
--- 2593,11 ---
  
          for (int i = 0, j = 0; i < a.length; i += SPECIES.length()) {
              assertInsertArraysEquals(r, a, (double)(65535+i), (j++ & (SPECIES.length()-1)), i , i + SPECIES.length());
          }
      }
+ 
      static boolean testIS_DEFAULT(double a) {
          return bits(a)==0;
      }
  
      @Test(dataProvider = "doubleTestOpProvider")

*** 2658,10 ***
--- 2634,11 ---
                      Assert.assertEquals(mv.laneIsSet(j),  vmask.laneIsSet(j) && testIS_DEFAULT(a[i + j]));
                  }
              }
          }
      }
+ 
      static boolean testIS_NEGATIVE(double a) {
          return bits(a)<0;
      }
  
      @Test(dataProvider = "doubleTestOpProvider")

*** 2740,11 ***
                  }
              }
          }
      }
  
- 
      static boolean testIS_NAN(double a) {
          return Double.isNaN(a);
      }
  
      @Test(dataProvider = "doubleTestOpProvider")
--- 2717,10 ---

*** 2782,11 ***
                  }
              }
          }
      }
  
- 
      static boolean testIS_INFINITE(double a) {
          return Double.isInfinite(a);
      }
  
      @Test(dataProvider = "doubleTestOpProvider")
--- 2758,10 ---

*** 2824,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void LTDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 2799,10 ---

*** 2844,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void ltDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 2818,10 ---

*** 2887,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void GTDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 2860,10 ---

*** 2930,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void EQDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 2902,10 ---

*** 2950,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void eqDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 2921,10 ---

*** 2993,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void NEDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 2963,10 ---

*** 3036,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void LEDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 3005,10 ---

*** 3079,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void GEDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 3047,10 ---

*** 3122,19 ***
                  }
              }
          }
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void LTDoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 3089,10 ---

*** 3147,11 ***
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] < b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpMaskProvider")
      static void LTDoubleMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<double[]> fa,
                                  IntFunction<double[]> fb, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 3105,10 ---

*** 3184,11 ***
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] < (double)((long)b[i]));
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpMaskProvider")
      static void LTDoubleMaxVectorTestsBroadcastLongMaskedSmokeTest(IntFunction<double[]> fa,
                                  IntFunction<double[]> fb, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 3141,10 ---

*** 3221,11 ***
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] == b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpMaskProvider")
      static void EQDoubleMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<double[]> fa,
                                  IntFunction<double[]> fb, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 3177,10 ---

*** 3258,11 ***
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] == (double)((long)b[i]));
              }
          }
      }
  
- 
      @Test(dataProvider = "doubleCompareOpMaskProvider")
      static void EQDoubleMaxVectorTestsBroadcastLongMaskedSmokeTest(IntFunction<double[]> fa,
                                  IntFunction<double[]> fb, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 3213,10 ---

*** 3337,10 ***
--- 3291,47 ---
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "doubleUnaryOpMaskProvider")
+     static void compressDoubleMaxVectorTests(IntFunction<double[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         double[] a = fa.apply(SPECIES.length());
+         double[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Double> vmask = VectorMask.fromArray(SPECIES, mask, 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);
+                 av.compress(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertcompressArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
+     @Test(dataProvider = "doubleUnaryOpMaskProvider")
+     static void expandDoubleMaxVectorTests(IntFunction<double[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         double[] a = fa.apply(SPECIES.length());
+         double[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Double> vmask = VectorMask.fromArray(SPECIES, mask, 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);
+                 av.expand(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertexpandArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void getDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
  

*** 3507,14 ***
          }
  
          assertBroadcastArraysEquals(r, a);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void ZeroDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = new double[a.length];
  
--- 3498,10 ---

*** 3525,13 ***
          }
  
          Assert.assertEquals(a, r);
      }
  
- 
- 
- 
      static double[] sliceUnary(double[] a, int origin, int idx) {
          double[] res = new double[SPECIES.length()];
          for (int i = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = a[idx+i+origin];
--- 3512,10 ---

*** 3553,10 ***
--- 3537,11 ---
              }
          }
  
          assertArraysEquals(r, a, origin, DoubleMaxVectorTests::sliceUnary);
      }
+ 
      static double[] sliceBinary(double[] a, double[] b, int origin, int idx) {
          double[] res = new double[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = a[idx+i+origin];

*** 3582,10 ***
--- 3567,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, origin, DoubleMaxVectorTests::sliceBinary);
      }
+ 
      static double[] slice(double[] a, double[] b, int origin, boolean[] mask, int idx) {
          double[] res = new double[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = mask[i] ? a[idx+i+origin] : (double)0;

*** 3615,10 ***
--- 3601,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, origin, mask, DoubleMaxVectorTests::slice);
      }
+ 
      static double[] unsliceUnary(double[] a, int origin, int idx) {
          double[] res = new double[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i < origin)
                  res[i] = (double)0;

*** 3642,10 ***
--- 3629,11 ---
              }
          }
  
          assertArraysEquals(r, a, origin, DoubleMaxVectorTests::unsliceUnary);
      }
+ 
      static double[] unsliceBinary(double[] a, double[] b, int origin, int part, int idx) {
          double[] res = new double[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if (part == 0) {
                  if (i < origin)

*** 3681,10 ***
--- 3669,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, origin, part, DoubleMaxVectorTests::unsliceBinary);
      }
+ 
      static double[] unslice(double[] a, double[] b, int origin, int part, boolean[] mask, int idx) {
          double[] res = new double[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = b[idx+i+origin];

*** 3761,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::SIN, DoubleMaxVectorTests::strictSIN);
      }
  
- 
      static double EXP(double a) {
          return (double)(Math.exp((double)a));
      }
  
      static double strictEXP(double a) {
--- 3750,10 ---

*** 3785,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::EXP, DoubleMaxVectorTests::strictEXP);
      }
  
- 
      static double LOG1P(double a) {
          return (double)(Math.log1p((double)a));
      }
  
      static double strictLOG1P(double a) {
--- 3773,10 ---

*** 3809,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::LOG1P, DoubleMaxVectorTests::strictLOG1P);
      }
  
- 
      static double LOG(double a) {
          return (double)(Math.log((double)a));
      }
  
      static double strictLOG(double a) {
--- 3796,10 ---

*** 3833,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::LOG, DoubleMaxVectorTests::strictLOG);
      }
  
- 
      static double LOG10(double a) {
          return (double)(Math.log10((double)a));
      }
  
      static double strictLOG10(double a) {
--- 3819,10 ---

*** 3857,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::LOG10, DoubleMaxVectorTests::strictLOG10);
      }
  
- 
      static double EXPM1(double a) {
          return (double)(Math.expm1((double)a));
      }
  
      static double strictEXPM1(double a) {
--- 3842,10 ---

*** 3881,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::EXPM1, DoubleMaxVectorTests::strictEXPM1);
      }
  
- 
      static double COS(double a) {
          return (double)(Math.cos((double)a));
      }
  
      static double strictCOS(double a) {
--- 3865,10 ---

*** 3905,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::COS, DoubleMaxVectorTests::strictCOS);
      }
  
- 
      static double TAN(double a) {
          return (double)(Math.tan((double)a));
      }
  
      static double strictTAN(double a) {
--- 3888,10 ---

*** 3929,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::TAN, DoubleMaxVectorTests::strictTAN);
      }
  
- 
      static double SINH(double a) {
          return (double)(Math.sinh((double)a));
      }
  
      static double strictSINH(double a) {
--- 3911,10 ---

*** 3953,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::SINH, DoubleMaxVectorTests::strictSINH);
      }
  
- 
      static double COSH(double a) {
          return (double)(Math.cosh((double)a));
      }
  
      static double strictCOSH(double a) {
--- 3934,10 ---

*** 3977,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::COSH, DoubleMaxVectorTests::strictCOSH);
      }
  
- 
      static double TANH(double a) {
          return (double)(Math.tanh((double)a));
      }
  
      static double strictTANH(double a) {
--- 3957,10 ---

*** 4001,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::TANH, DoubleMaxVectorTests::strictTANH);
      }
  
- 
      static double ASIN(double a) {
          return (double)(Math.asin((double)a));
      }
  
      static double strictASIN(double a) {
--- 3980,10 ---

*** 4025,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::ASIN, DoubleMaxVectorTests::strictASIN);
      }
  
- 
      static double ACOS(double a) {
          return (double)(Math.acos((double)a));
      }
  
      static double strictACOS(double a) {
--- 4003,10 ---

*** 4049,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::ACOS, DoubleMaxVectorTests::strictACOS);
      }
  
- 
      static double ATAN(double a) {
          return (double)(Math.atan((double)a));
      }
  
      static double strictATAN(double a) {
--- 4026,10 ---

*** 4073,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::ATAN, DoubleMaxVectorTests::strictATAN);
      }
  
- 
      static double CBRT(double a) {
          return (double)(Math.cbrt((double)a));
      }
  
      static double strictCBRT(double a) {
--- 4049,10 ---

*** 4097,11 ***
          }
  
          assertArraysEqualsWithinOneUlp(r, a, DoubleMaxVectorTests::CBRT, DoubleMaxVectorTests::strictCBRT);
      }
  
- 
      static double HYPOT(double a, double b) {
          return (double)(Math.hypot((double)a, (double)b));
      }
  
      static double strictHYPOT(double a, double b) {
--- 4072,10 ---

*** 4124,11 ***
  
          assertArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::HYPOT, DoubleMaxVectorTests::strictHYPOT);
      }
  
  
- 
      static double POW(double a, double b) {
          return (double)(Math.pow((double)a, (double)b));
      }
  
      static double strictPOW(double a, double b) {
--- 4098,10 ---

*** 4150,10 ***
--- 4123,11 ---
          }
  
          assertArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::POW, DoubleMaxVectorTests::strictPOW);
      }
  
+ 
      static double pow(double a, double b) {
          return (double)(Math.pow((double)a, (double)b));
      }
  
      static double strictpow(double a, double b) {

*** 4176,11 ***
  
          assertArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::pow, DoubleMaxVectorTests::strictpow);
      }
  
  
- 
      static double ATAN2(double a, double b) {
          return (double)(Math.atan2((double)a, (double)b));
      }
  
      static double strictATAN2(double a, double b) {
--- 4150,10 ---

*** 4203,11 ***
  
          assertArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::ATAN2, DoubleMaxVectorTests::strictATAN2);
      }
  
  
- 
      @Test(dataProvider = "doubleBinaryOpProvider")
      static void POWDoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
--- 4176,10 ---

*** 4218,10 ***
--- 4190,11 ---
          }
  
          assertBroadcastArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::POW, DoubleMaxVectorTests::strictPOW);
      }
  
+ 
      @Test(dataProvider = "doubleBinaryOpProvider")
      static void powDoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());

*** 4233,19 ***
  
          assertBroadcastArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::pow, DoubleMaxVectorTests::strictpow);
      }
  
  
- 
      static double FMA(double a, double b, double c) {
          return (double)(Math.fma(a, b, c));
      }
      static double fma(double a, double b, double c) {
          return (double)(Math.fma(a, b, c));
      }
  
- 
      @Test(dataProvider = "doubleTernaryOpProvider")
      static void FMADoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb, IntFunction<double[]> fc) {
          int count = INVOC_COUNT;
          switch ("FMA") {
          case "fma": case "lanewise_FMA":
--- 4206,18 ---
  
          assertBroadcastArraysEqualsWithinOneUlp(r, a, b, DoubleMaxVectorTests::pow, DoubleMaxVectorTests::strictpow);
      }
  
  
      static double FMA(double a, double b, double c) {
          return (double)(Math.fma(a, b, c));
      }
+ 
      static double fma(double a, double b, double c) {
          return (double)(Math.fma(a, b, c));
      }
  
      @Test(dataProvider = "doubleTernaryOpProvider")
      static void FMADoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb, IntFunction<double[]> fc) {
          int count = INVOC_COUNT;
          switch ("FMA") {
          case "fma": case "lanewise_FMA":

*** 4267,10 ***
--- 4239,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, c, DoubleMaxVectorTests::FMA);
      }
+ 
      @Test(dataProvider = "doubleTernaryOpProvider")
      static void fmaDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb, IntFunction<double[]> fc) {
          int count = INVOC_COUNT;
          switch ("fma") {
          case "fma": case "lanewise_FMA":

*** 4291,11 ***
          }
  
          assertArraysEquals(r, a, b, c, DoubleMaxVectorTests::fma);
      }
  
- 
      @Test(dataProvider = "doubleTernaryOpMaskProvider")
      static void FMADoubleMaxVectorTestsMasked(IntFunction<double[]> fa, IntFunction<double[]> fb,
                                            IntFunction<double[]> fc, IntFunction<boolean[]> fm) {
          int count = INVOC_COUNT;
          switch ("FMA") {
--- 4264,10 ---

*** 4321,14 ***
          }
  
          assertArraysEquals(r, a, b, c, mask, DoubleMaxVectorTests::FMA);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "doubleTernaryOpProvider")
      static void FMADoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb, IntFunction<double[]> fc) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
          double[] c = fc.apply(SPECIES.length());
--- 4293,10 ---

*** 4355,11 ***
              av.lanewise(VectorOperators.FMA, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, DoubleMaxVectorTests::FMA);
      }
  
- 
      @Test(dataProvider = "doubleTernaryOpMaskProvider")
      static void FMADoubleMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb,
                                            IntFunction<double[]> fc, IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
--- 4323,10 ---

*** 4394,13 ***
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, DoubleMaxVectorTests::FMA);
      }
  
- 
- 
- 
      @Test(dataProvider = "doubleTernaryOpProvider")
      static void FMADoubleMaxVectorTestsDoubleBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb, IntFunction<double[]> fc) {
          int count = INVOC_COUNT;
          switch ("FMA") {
          case "fma": case "lanewise_FMA":
--- 4361,10 ---

*** 4418,10 ***
--- 4382,11 ---
              av.lanewise(VectorOperators.FMA, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, DoubleMaxVectorTests::FMA);
      }
+ 
      @Test(dataProvider = "doubleTernaryOpProvider")
      static void fmaDoubleMaxVectorTestsDoubleBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb, IntFunction<double[]> fc) {
          int count = INVOC_COUNT;
          switch ("fma") {
          case "fma": case "lanewise_FMA":

*** 4440,11 ***
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, DoubleMaxVectorTests::fma);
      }
  
- 
      @Test(dataProvider = "doubleTernaryOpMaskProvider")
      static void FMADoubleMaxVectorTestsDoubleBroadcastMaskedSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb,
                                            IntFunction<double[]> fc, IntFunction<boolean[]> fm) {
          int count = INVOC_COUNT;
          switch ("FMA") {
--- 4405,10 ---

*** 4466,13 ***
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, DoubleMaxVectorTests::FMA);
      }
  
- 
- 
- 
      static double NEG(double a) {
          return (double)(-((double)a));
      }
  
      static double neg(double a) {
--- 4430,10 ---

*** 4581,27 ***
          }
  
          assertArraysEquals(r, a, mask, DoubleMaxVectorTests::ABS);
      }
  
- 
- 
- 
- 
- 
- 
- 
      static double SQRT(double a) {
          return (double)(Math.sqrt((double)a));
      }
  
      static double sqrt(double a) {
          return (double)(Math.sqrt((double)a));
      }
  
- 
- 
      @Test(dataProvider = "doubleUnaryOpProvider")
      static void SQRTDoubleMaxVectorTests(IntFunction<double[]> fa) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
  
--- 4542,18 ---

*** 4628,12 ***
          }
  
          assertArraysEquals(r, a, DoubleMaxVectorTests::sqrt);
      }
  
- 
- 
      @Test(dataProvider = "doubleUnaryOpMaskProvider")
      static void SQRTMaskedDoubleMaxVectorTests(IntFunction<double[]> fa,
                                                  IntFunction<boolean[]> fm) {
          double[] a = fa.apply(SPECIES.length());
          double[] r = fr.apply(SPECIES.length());
--- 4580,10 ---

*** 4648,11 ***
          }
  
          assertArraysEquals(r, a, mask, DoubleMaxVectorTests::SQRT);
      }
  
- 
      @Test(dataProvider = "doubleCompareOpProvider")
      static void ltDoubleMaxVectorTestsBroadcastSmokeTest(IntFunction<double[]> fa, IntFunction<double[]> fb) {
          double[] a = fa.apply(SPECIES.length());
          double[] b = fb.apply(SPECIES.length());
  
--- 4598,10 ---

*** 5040,10 ***
--- 4989,27 ---
          }
  
          assertMaskReductionArraysEquals(r, a, DoubleMaxVectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressDoubleMaxVectorTestsSmokeTest(IntFunction<boolean[]> fa) {
+         int trueCount = 0;
+         boolean[] a = fa.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT * INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 var vmask = SPECIES.loadMask(a, i);
+                 trueCount = vmask.trueCount();
+                 var rmask = vmask.compress();
+                 for (int j = 0; j < SPECIES.length(); j++)  {
+                     Assert.assertEquals(rmask.laneIsSet(j), j < trueCount);
+                 }
+             }
+         }
+     }
+ 
  
      @DataProvider
      public static Object[][] offsetProvider() {
          return new Object[][]{
                  {0},

*** 5066,10 ***
--- 5032,24 ---
                  Assert.assertEquals(actualMask.laneIsSet(j), index >= 0 && index < limit);
              }
          }
      }
  
+     @Test(dataProvider = "offsetProvider")
+     static void indexInRangeLongDoubleMaxVectorTestsSmokeTest(int offset) {
+         long limit = SPECIES.length() * BUFFER_REPS;
+         for (long i = 0; i < limit; i += SPECIES.length()) {
+             var actualMask = SPECIES.indexInRange(i + offset, limit);
+             var expectedMask = SPECIES.maskAll(true).indexInRange(i + offset, limit);
+             assert(actualMask.equals(expectedMask));
+             for (int j = 0; j < SPECIES.length(); j++)  {
+                 long index = i + j + offset;
+                 Assert.assertEquals(actualMask.laneIsSet(j), index >= 0 && index < limit);
+             }
+         }
+     }
+ 
      @DataProvider
      public static Object[][] lengthProvider() {
          return new Object[][]{
                  {0},
                  {1},

*** 5086,10 ***
--- 5066,18 ---
          int actualLoopBound = SPECIES.loopBound(length);
          int expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
          Assert.assertEquals(actualLoopBound, expectedLoopBound);
      }
  
+     @Test(dataProvider = "lengthProvider")
+     static void loopBoundLongDoubleMaxVectorTestsSmokeTest(int _length) {
+         long length = _length;
+         long actualLoopBound = SPECIES.loopBound(length);
+         long expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
+         Assert.assertEquals(actualLoopBound, expectedLoopBound);
+     }
+ 
      @Test
      static void ElementSizeDoubleMaxVectorTestsSmokeTest() {
          DoubleVector av = DoubleVector.zero(SPECIES);
          int elsize = av.elementSize();
          Assert.assertEquals(elsize, Double.SIZE);

*** 5148,6 ***
          for (int ic = 0; ic < INVOC_COUNT; ic++) {
            Assert.assertEquals(SPECIES.maskAll(true).toLong(), -1L >>> (64 - SPECIES.length()));
          }
      }
  }
- 
--- 5136,5 ---
< prev index next >