< prev index next >

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

Print this page
rev 55892 : 8222933: [vector] Test failures after api change in JDK-8222752
Summary: Test failure becaues of renaming get() and getElement() functions to lane() in changeset http://hg.openjdk.java.net/panama/dev/rev/82514a6254e6
Reviewed-by: sviswanathan


 964                 av.with(0, (double)4).intoArray(r, i);
 965             }
 966         }
 967 
 968         assertInsertArraysEquals(a, r, (double)4, 0);
 969     }
 970 
 971     @Test(dataProvider = "doubleCompareOpProvider")
 972     static void lessThanDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
 973         double[] a = fa.apply(SPECIES.length());
 974         double[] b = fb.apply(SPECIES.length());
 975 
 976         for (int ic = 0; ic < INVOC_COUNT; ic++) {
 977             for (int i = 0; i < a.length; i += SPECIES.length()) {
 978                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
 979                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
 980                 VectorMask<Double> mv = av.lessThan(bv);
 981 
 982                 // Check results as part of computation.
 983                 for (int j = 0; j < SPECIES.length(); j++) {
 984                     Assert.assertEquals(mv.getElement(j), a[i + j] < b[i + j]);
 985                 }
 986             }
 987         }
 988     }
 989 
 990 
 991     @Test(dataProvider = "doubleCompareOpProvider")
 992     static void greaterThanDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
 993         double[] a = fa.apply(SPECIES.length());
 994         double[] b = fb.apply(SPECIES.length());
 995 
 996         for (int ic = 0; ic < INVOC_COUNT; ic++) {
 997             for (int i = 0; i < a.length; i += SPECIES.length()) {
 998                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
 999                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1000                 VectorMask<Double> mv = av.greaterThan(bv);
1001 
1002                 // Check results as part of computation.
1003                 for (int j = 0; j < SPECIES.length(); j++) {
1004                     Assert.assertEquals(mv.getElement(j), a[i + j] > b[i + j]);
1005                 }
1006             }
1007         }
1008     }
1009 
1010 
1011     @Test(dataProvider = "doubleCompareOpProvider")
1012     static void equalDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1013         double[] a = fa.apply(SPECIES.length());
1014         double[] b = fb.apply(SPECIES.length());
1015 
1016         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1017             for (int i = 0; i < a.length; i += SPECIES.length()) {
1018                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1019                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1020                 VectorMask<Double> mv = av.equal(bv);
1021 
1022                 // Check results as part of computation.
1023                 for (int j = 0; j < SPECIES.length(); j++) {
1024                     Assert.assertEquals(mv.getElement(j), a[i + j] == b[i + j]);
1025                 }
1026             }
1027         }
1028     }
1029 
1030 
1031     @Test(dataProvider = "doubleCompareOpProvider")
1032     static void notEqualDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1033         double[] a = fa.apply(SPECIES.length());
1034         double[] b = fb.apply(SPECIES.length());
1035 
1036         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1037             for (int i = 0; i < a.length; i += SPECIES.length()) {
1038                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1039                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1040                 VectorMask<Double> mv = av.notEqual(bv);
1041 
1042                 // Check results as part of computation.
1043                 for (int j = 0; j < SPECIES.length(); j++) {
1044                     Assert.assertEquals(mv.getElement(j), a[i + j] != b[i + j]);
1045                 }
1046             }
1047         }
1048     }
1049 
1050 
1051     @Test(dataProvider = "doubleCompareOpProvider")
1052     static void lessThanEqDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1053         double[] a = fa.apply(SPECIES.length());
1054         double[] b = fb.apply(SPECIES.length());
1055 
1056         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1057             for (int i = 0; i < a.length; i += SPECIES.length()) {
1058                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1059                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1060                 VectorMask<Double> mv = av.lessThanEq(bv);
1061 
1062                 // Check results as part of computation.
1063                 for (int j = 0; j < SPECIES.length(); j++) {
1064                     Assert.assertEquals(mv.getElement(j), a[i + j] <= b[i + j]);
1065                 }
1066             }
1067         }
1068     }
1069 
1070 
1071     @Test(dataProvider = "doubleCompareOpProvider")
1072     static void greaterThanEqDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1073         double[] a = fa.apply(SPECIES.length());
1074         double[] b = fb.apply(SPECIES.length());
1075 
1076         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1077             for (int i = 0; i < a.length; i += SPECIES.length()) {
1078                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1079                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1080                 VectorMask<Double> mv = av.greaterThanEq(bv);
1081 
1082                 // Check results as part of computation.
1083                 for (int j = 0; j < SPECIES.length(); j++) {
1084                     Assert.assertEquals(mv.getElement(j), a[i + j] >= b[i + j]);
1085                 }
1086             }
1087         }
1088     }
1089 
1090 
1091     static double blend(double a, double b, boolean mask) {
1092         return mask ? b : a;
1093     }
1094 
1095     @Test(dataProvider = "doubleBinaryOpMaskProvider")
1096     static void blendDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb,
1097                                           IntFunction<boolean[]> fm) {
1098         double[] a = fa.apply(SPECIES.length());
1099         double[] b = fb.apply(SPECIES.length());
1100         double[] r = fr.apply(SPECIES.length());
1101         boolean[] mask = fm.apply(SPECIES.length());
1102         VectorMask<Double> vmask = VectorMask.fromValues(SPECIES, mask);
1103 
1104         for (int ic = 0; ic < INVOC_COUNT; ic++) {


1127         }
1128 
1129         assertRearrangeArraysEquals(a, r, order, SPECIES.length());
1130     }
1131 
1132 
1133 
1134 
1135     @Test(dataProvider = "doubleUnaryOpProvider")
1136     static void getDoubleMaxVectorTests(IntFunction<double[]> fa) {
1137         double[] a = fa.apply(SPECIES.length());
1138         double[] r = fr.apply(SPECIES.length());
1139 
1140         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1141             for (int i = 0; i < a.length; i += SPECIES.length()) {
1142                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1143                 int num_lanes = SPECIES.length();
1144                 // Manually unroll because full unroll happens after intrinsification.
1145                 // Unroll is needed because get intrinsic requires for index to be a known constant.
1146                 if (num_lanes == 1) {
1147                     r[i]=av.get(0);
1148                 } else if (num_lanes == 2) {
1149                     r[i]=av.get(0);
1150                     r[i+1]=av.get(1);
1151                 } else if (num_lanes == 4) {
1152                     r[i]=av.get(0);
1153                     r[i+1]=av.get(1);
1154                     r[i+2]=av.get(2);
1155                     r[i+3]=av.get(3);
1156                 } else if (num_lanes == 8) {
1157                     r[i]=av.get(0);
1158                     r[i+1]=av.get(1);
1159                     r[i+2]=av.get(2);
1160                     r[i+3]=av.get(3);
1161                     r[i+4]=av.get(4);
1162                     r[i+5]=av.get(5);
1163                     r[i+6]=av.get(6);
1164                     r[i+7]=av.get(7);
1165                 } else if (num_lanes == 16) {
1166                     r[i]=av.get(0);
1167                     r[i+1]=av.get(1);
1168                     r[i+2]=av.get(2);
1169                     r[i+3]=av.get(3);
1170                     r[i+4]=av.get(4);
1171                     r[i+5]=av.get(5);
1172                     r[i+6]=av.get(6);
1173                     r[i+7]=av.get(7);
1174                     r[i+8]=av.get(8);
1175                     r[i+9]=av.get(9);
1176                     r[i+10]=av.get(10);
1177                     r[i+11]=av.get(11);
1178                     r[i+12]=av.get(12);
1179                     r[i+13]=av.get(13);
1180                     r[i+14]=av.get(14);
1181                     r[i+15]=av.get(15);
1182                 } else if (num_lanes == 32) {
1183                     r[i]=av.get(0);
1184                     r[i+1]=av.get(1);
1185                     r[i+2]=av.get(2);
1186                     r[i+3]=av.get(3);
1187                     r[i+4]=av.get(4);
1188                     r[i+5]=av.get(5);
1189                     r[i+6]=av.get(6);
1190                     r[i+7]=av.get(7);
1191                     r[i+8]=av.get(8);
1192                     r[i+9]=av.get(9);
1193                     r[i+10]=av.get(10);
1194                     r[i+11]=av.get(11);
1195                     r[i+12]=av.get(12);
1196                     r[i+13]=av.get(13);
1197                     r[i+14]=av.get(14);
1198                     r[i+15]=av.get(15);
1199                     r[i+16]=av.get(16);
1200                     r[i+17]=av.get(17);
1201                     r[i+18]=av.get(18);
1202                     r[i+19]=av.get(19);
1203                     r[i+20]=av.get(20);
1204                     r[i+21]=av.get(21);
1205                     r[i+22]=av.get(22);
1206                     r[i+23]=av.get(23);
1207                     r[i+24]=av.get(24);
1208                     r[i+25]=av.get(25);
1209                     r[i+26]=av.get(26);
1210                     r[i+27]=av.get(27);
1211                     r[i+28]=av.get(28);
1212                     r[i+29]=av.get(29);
1213                     r[i+30]=av.get(30);
1214                     r[i+31]=av.get(31);
1215                 } else if (num_lanes == 64) {
1216                     r[i]=av.get(0);
1217                     r[i+1]=av.get(1);
1218                     r[i+2]=av.get(2);
1219                     r[i+3]=av.get(3);
1220                     r[i+4]=av.get(4);
1221                     r[i+5]=av.get(5);
1222                     r[i+6]=av.get(6);
1223                     r[i+7]=av.get(7);
1224                     r[i+8]=av.get(8);
1225                     r[i+9]=av.get(9);
1226                     r[i+10]=av.get(10);
1227                     r[i+11]=av.get(11);
1228                     r[i+12]=av.get(12);
1229                     r[i+13]=av.get(13);
1230                     r[i+14]=av.get(14);
1231                     r[i+15]=av.get(15);
1232                     r[i+16]=av.get(16);
1233                     r[i+17]=av.get(17);
1234                     r[i+18]=av.get(18);
1235                     r[i+19]=av.get(19);
1236                     r[i+20]=av.get(20);
1237                     r[i+21]=av.get(21);
1238                     r[i+22]=av.get(22);
1239                     r[i+23]=av.get(23);
1240                     r[i+24]=av.get(24);
1241                     r[i+25]=av.get(25);
1242                     r[i+26]=av.get(26);
1243                     r[i+27]=av.get(27);
1244                     r[i+28]=av.get(28);
1245                     r[i+29]=av.get(29);
1246                     r[i+30]=av.get(30);
1247                     r[i+31]=av.get(31);
1248                     r[i+32]=av.get(32);
1249                     r[i+33]=av.get(33);
1250                     r[i+34]=av.get(34);
1251                     r[i+35]=av.get(35);
1252                     r[i+36]=av.get(36);
1253                     r[i+37]=av.get(37);
1254                     r[i+38]=av.get(38);
1255                     r[i+39]=av.get(39);
1256                     r[i+40]=av.get(40);
1257                     r[i+41]=av.get(41);
1258                     r[i+42]=av.get(42);
1259                     r[i+43]=av.get(43);
1260                     r[i+44]=av.get(44);
1261                     r[i+45]=av.get(45);
1262                     r[i+46]=av.get(46);
1263                     r[i+47]=av.get(47);
1264                     r[i+48]=av.get(48);
1265                     r[i+49]=av.get(49);
1266                     r[i+50]=av.get(50);
1267                     r[i+51]=av.get(51);
1268                     r[i+52]=av.get(52);
1269                     r[i+53]=av.get(53);
1270                     r[i+54]=av.get(54);
1271                     r[i+55]=av.get(55);
1272                     r[i+56]=av.get(56);
1273                     r[i+57]=av.get(57);
1274                     r[i+58]=av.get(58);
1275                     r[i+59]=av.get(59);
1276                     r[i+60]=av.get(60);
1277                     r[i+61]=av.get(61);
1278                     r[i+62]=av.get(62);
1279                     r[i+63]=av.get(63);
1280                 } else {
1281                     for (int j = 0; j < SPECIES.length(); j++) {
1282                         r[i+j]=av.get(j);
1283                     }
1284                 }
1285             }
1286         }
1287 
1288         assertArraysEquals(a, r, DoubleMaxVectorTests::get);
1289     }
1290 
1291     static double sin(double a) {
1292         return (double)(Math.sin((double)a));
1293     }
1294 
1295     static double strictsin(double a) {
1296         return (double)(StrictMath.sin((double)a));
1297     }
1298 
1299     @Test(dataProvider = "doubleUnaryOpProvider")
1300     static void sinDoubleMaxVectorTests(IntFunction<double[]> fa) {
1301         double[] a = fa.apply(SPECIES.length());
1302         double[] r = fr.apply(SPECIES.length());




 964                 av.with(0, (double)4).intoArray(r, i);
 965             }
 966         }
 967 
 968         assertInsertArraysEquals(a, r, (double)4, 0);
 969     }
 970 
 971     @Test(dataProvider = "doubleCompareOpProvider")
 972     static void lessThanDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
 973         double[] a = fa.apply(SPECIES.length());
 974         double[] b = fb.apply(SPECIES.length());
 975 
 976         for (int ic = 0; ic < INVOC_COUNT; ic++) {
 977             for (int i = 0; i < a.length; i += SPECIES.length()) {
 978                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
 979                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
 980                 VectorMask<Double> mv = av.lessThan(bv);
 981 
 982                 // Check results as part of computation.
 983                 for (int j = 0; j < SPECIES.length(); j++) {
 984                     Assert.assertEquals(mv.lane(j), a[i + j] < b[i + j]);
 985                 }
 986             }
 987         }
 988     }
 989 
 990 
 991     @Test(dataProvider = "doubleCompareOpProvider")
 992     static void greaterThanDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
 993         double[] a = fa.apply(SPECIES.length());
 994         double[] b = fb.apply(SPECIES.length());
 995 
 996         for (int ic = 0; ic < INVOC_COUNT; ic++) {
 997             for (int i = 0; i < a.length; i += SPECIES.length()) {
 998                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
 999                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1000                 VectorMask<Double> mv = av.greaterThan(bv);
1001 
1002                 // Check results as part of computation.
1003                 for (int j = 0; j < SPECIES.length(); j++) {
1004                     Assert.assertEquals(mv.lane(j), a[i + j] > b[i + j]);
1005                 }
1006             }
1007         }
1008     }
1009 
1010 
1011     @Test(dataProvider = "doubleCompareOpProvider")
1012     static void equalDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1013         double[] a = fa.apply(SPECIES.length());
1014         double[] b = fb.apply(SPECIES.length());
1015 
1016         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1017             for (int i = 0; i < a.length; i += SPECIES.length()) {
1018                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1019                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1020                 VectorMask<Double> mv = av.equal(bv);
1021 
1022                 // Check results as part of computation.
1023                 for (int j = 0; j < SPECIES.length(); j++) {
1024                     Assert.assertEquals(mv.lane(j), a[i + j] == b[i + j]);
1025                 }
1026             }
1027         }
1028     }
1029 
1030 
1031     @Test(dataProvider = "doubleCompareOpProvider")
1032     static void notEqualDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1033         double[] a = fa.apply(SPECIES.length());
1034         double[] b = fb.apply(SPECIES.length());
1035 
1036         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1037             for (int i = 0; i < a.length; i += SPECIES.length()) {
1038                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1039                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1040                 VectorMask<Double> mv = av.notEqual(bv);
1041 
1042                 // Check results as part of computation.
1043                 for (int j = 0; j < SPECIES.length(); j++) {
1044                     Assert.assertEquals(mv.lane(j), a[i + j] != b[i + j]);
1045                 }
1046             }
1047         }
1048     }
1049 
1050 
1051     @Test(dataProvider = "doubleCompareOpProvider")
1052     static void lessThanEqDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1053         double[] a = fa.apply(SPECIES.length());
1054         double[] b = fb.apply(SPECIES.length());
1055 
1056         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1057             for (int i = 0; i < a.length; i += SPECIES.length()) {
1058                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1059                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1060                 VectorMask<Double> mv = av.lessThanEq(bv);
1061 
1062                 // Check results as part of computation.
1063                 for (int j = 0; j < SPECIES.length(); j++) {
1064                     Assert.assertEquals(mv.lane(j), a[i + j] <= b[i + j]);
1065                 }
1066             }
1067         }
1068     }
1069 
1070 
1071     @Test(dataProvider = "doubleCompareOpProvider")
1072     static void greaterThanEqDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb) {
1073         double[] a = fa.apply(SPECIES.length());
1074         double[] b = fb.apply(SPECIES.length());
1075 
1076         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1077             for (int i = 0; i < a.length; i += SPECIES.length()) {
1078                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1079                 DoubleVector bv = DoubleVector.fromArray(SPECIES, b, i);
1080                 VectorMask<Double> mv = av.greaterThanEq(bv);
1081 
1082                 // Check results as part of computation.
1083                 for (int j = 0; j < SPECIES.length(); j++) {
1084                     Assert.assertEquals(mv.lane(j), a[i + j] >= b[i + j]);
1085                 }
1086             }
1087         }
1088     }
1089 
1090 
1091     static double blend(double a, double b, boolean mask) {
1092         return mask ? b : a;
1093     }
1094 
1095     @Test(dataProvider = "doubleBinaryOpMaskProvider")
1096     static void blendDoubleMaxVectorTests(IntFunction<double[]> fa, IntFunction<double[]> fb,
1097                                           IntFunction<boolean[]> fm) {
1098         double[] a = fa.apply(SPECIES.length());
1099         double[] b = fb.apply(SPECIES.length());
1100         double[] r = fr.apply(SPECIES.length());
1101         boolean[] mask = fm.apply(SPECIES.length());
1102         VectorMask<Double> vmask = VectorMask.fromValues(SPECIES, mask);
1103 
1104         for (int ic = 0; ic < INVOC_COUNT; ic++) {


1127         }
1128 
1129         assertRearrangeArraysEquals(a, r, order, SPECIES.length());
1130     }
1131 
1132 
1133 
1134 
1135     @Test(dataProvider = "doubleUnaryOpProvider")
1136     static void getDoubleMaxVectorTests(IntFunction<double[]> fa) {
1137         double[] a = fa.apply(SPECIES.length());
1138         double[] r = fr.apply(SPECIES.length());
1139 
1140         for (int ic = 0; ic < INVOC_COUNT; ic++) {
1141             for (int i = 0; i < a.length; i += SPECIES.length()) {
1142                 DoubleVector av = DoubleVector.fromArray(SPECIES, a, i);
1143                 int num_lanes = SPECIES.length();
1144                 // Manually unroll because full unroll happens after intrinsification.
1145                 // Unroll is needed because get intrinsic requires for index to be a known constant.
1146                 if (num_lanes == 1) {
1147                     r[i]=av.lane(0);
1148                 } else if (num_lanes == 2) {
1149                     r[i]=av.lane(0);
1150                     r[i+1]=av.lane(1);
1151                 } else if (num_lanes == 4) {
1152                     r[i]=av.lane(0);
1153                     r[i+1]=av.lane(1);
1154                     r[i+2]=av.lane(2);
1155                     r[i+3]=av.lane(3);
1156                 } else if (num_lanes == 8) {
1157                     r[i]=av.lane(0);
1158                     r[i+1]=av.lane(1);
1159                     r[i+2]=av.lane(2);
1160                     r[i+3]=av.lane(3);
1161                     r[i+4]=av.lane(4);
1162                     r[i+5]=av.lane(5);
1163                     r[i+6]=av.lane(6);
1164                     r[i+7]=av.lane(7);
1165                 } else if (num_lanes == 16) {
1166                     r[i]=av.lane(0);
1167                     r[i+1]=av.lane(1);
1168                     r[i+2]=av.lane(2);
1169                     r[i+3]=av.lane(3);
1170                     r[i+4]=av.lane(4);
1171                     r[i+5]=av.lane(5);
1172                     r[i+6]=av.lane(6);
1173                     r[i+7]=av.lane(7);
1174                     r[i+8]=av.lane(8);
1175                     r[i+9]=av.lane(9);
1176                     r[i+10]=av.lane(10);
1177                     r[i+11]=av.lane(11);
1178                     r[i+12]=av.lane(12);
1179                     r[i+13]=av.lane(13);
1180                     r[i+14]=av.lane(14);
1181                     r[i+15]=av.lane(15);
1182                 } else if (num_lanes == 32) {
1183                     r[i]=av.lane(0);
1184                     r[i+1]=av.lane(1);
1185                     r[i+2]=av.lane(2);
1186                     r[i+3]=av.lane(3);
1187                     r[i+4]=av.lane(4);
1188                     r[i+5]=av.lane(5);
1189                     r[i+6]=av.lane(6);
1190                     r[i+7]=av.lane(7);
1191                     r[i+8]=av.lane(8);
1192                     r[i+9]=av.lane(9);
1193                     r[i+10]=av.lane(10);
1194                     r[i+11]=av.lane(11);
1195                     r[i+12]=av.lane(12);
1196                     r[i+13]=av.lane(13);
1197                     r[i+14]=av.lane(14);
1198                     r[i+15]=av.lane(15);
1199                     r[i+16]=av.lane(16);
1200                     r[i+17]=av.lane(17);
1201                     r[i+18]=av.lane(18);
1202                     r[i+19]=av.lane(19);
1203                     r[i+20]=av.lane(20);
1204                     r[i+21]=av.lane(21);
1205                     r[i+22]=av.lane(22);
1206                     r[i+23]=av.lane(23);
1207                     r[i+24]=av.lane(24);
1208                     r[i+25]=av.lane(25);
1209                     r[i+26]=av.lane(26);
1210                     r[i+27]=av.lane(27);
1211                     r[i+28]=av.lane(28);
1212                     r[i+29]=av.lane(29);
1213                     r[i+30]=av.lane(30);
1214                     r[i+31]=av.lane(31);
1215                 } else if (num_lanes == 64) {
1216                     r[i]=av.lane(0);
1217                     r[i+1]=av.lane(1);
1218                     r[i+2]=av.lane(2);
1219                     r[i+3]=av.lane(3);
1220                     r[i+4]=av.lane(4);
1221                     r[i+5]=av.lane(5);
1222                     r[i+6]=av.lane(6);
1223                     r[i+7]=av.lane(7);
1224                     r[i+8]=av.lane(8);
1225                     r[i+9]=av.lane(9);
1226                     r[i+10]=av.lane(10);
1227                     r[i+11]=av.lane(11);
1228                     r[i+12]=av.lane(12);
1229                     r[i+13]=av.lane(13);
1230                     r[i+14]=av.lane(14);
1231                     r[i+15]=av.lane(15);
1232                     r[i+16]=av.lane(16);
1233                     r[i+17]=av.lane(17);
1234                     r[i+18]=av.lane(18);
1235                     r[i+19]=av.lane(19);
1236                     r[i+20]=av.lane(20);
1237                     r[i+21]=av.lane(21);
1238                     r[i+22]=av.lane(22);
1239                     r[i+23]=av.lane(23);
1240                     r[i+24]=av.lane(24);
1241                     r[i+25]=av.lane(25);
1242                     r[i+26]=av.lane(26);
1243                     r[i+27]=av.lane(27);
1244                     r[i+28]=av.lane(28);
1245                     r[i+29]=av.lane(29);
1246                     r[i+30]=av.lane(30);
1247                     r[i+31]=av.lane(31);
1248                     r[i+32]=av.lane(32);
1249                     r[i+33]=av.lane(33);
1250                     r[i+34]=av.lane(34);
1251                     r[i+35]=av.lane(35);
1252                     r[i+36]=av.lane(36);
1253                     r[i+37]=av.lane(37);
1254                     r[i+38]=av.lane(38);
1255                     r[i+39]=av.lane(39);
1256                     r[i+40]=av.lane(40);
1257                     r[i+41]=av.lane(41);
1258                     r[i+42]=av.lane(42);
1259                     r[i+43]=av.lane(43);
1260                     r[i+44]=av.lane(44);
1261                     r[i+45]=av.lane(45);
1262                     r[i+46]=av.lane(46);
1263                     r[i+47]=av.lane(47);
1264                     r[i+48]=av.lane(48);
1265                     r[i+49]=av.lane(49);
1266                     r[i+50]=av.lane(50);
1267                     r[i+51]=av.lane(51);
1268                     r[i+52]=av.lane(52);
1269                     r[i+53]=av.lane(53);
1270                     r[i+54]=av.lane(54);
1271                     r[i+55]=av.lane(55);
1272                     r[i+56]=av.lane(56);
1273                     r[i+57]=av.lane(57);
1274                     r[i+58]=av.lane(58);
1275                     r[i+59]=av.lane(59);
1276                     r[i+60]=av.lane(60);
1277                     r[i+61]=av.lane(61);
1278                     r[i+62]=av.lane(62);
1279                     r[i+63]=av.lane(63);
1280                 } else {
1281                     for (int j = 0; j < SPECIES.length(); j++) {
1282                         r[i+j]=av.lane(j);
1283                     }
1284                 }
1285             }
1286         }
1287 
1288         assertArraysEquals(a, r, DoubleMaxVectorTests::get);
1289     }
1290 
1291     static double sin(double a) {
1292         return (double)(Math.sin((double)a));
1293     }
1294 
1295     static double strictsin(double a) {
1296         return (double)(StrictMath.sin((double)a));
1297     }
1298 
1299     @Test(dataProvider = "doubleUnaryOpProvider")
1300     static void sinDoubleMaxVectorTests(IntFunction<double[]> fa) {
1301         double[] a = fa.apply(SPECIES.length());
1302         double[] r = fr.apply(SPECIES.length());


< prev index next >