1177 @Override
1178 @ForceInline
1179 public $type$ maxAll() {
1180 return ($type$) VectorIntrinsics.reductionCoerced(
1181 VECTOR_OP_MAX, $vectortype$.class, $type$.class, LENGTH,
1182 this,
1183 v -> (long) v.rOp($Boxtype$.MIN_VALUE , (i, a, b) -> ($type$) Math.max(a, b)));
1184 }
1185
1186 @Override
1187 @ForceInline
1188 public $type$ mulAll() {
1189 return ($type$) VectorIntrinsics.reductionCoerced(
1190 VECTOR_OP_MUL, $vectortype$.class, $type$.class, LENGTH,
1191 this,
1192 v -> (long) v.rOp(($type$) 1, (i, a, b) -> ($type$) (a * b)));
1193 }
1194
1195 @Override
1196 @ForceInline
1197 public $type$ subAll() {
1198 return ($type$) VectorIntrinsics.reductionCoerced(
1199 VECTOR_OP_SUB, $vectortype$.class, $type$.class, LENGTH,
1200 this,
1201 v -> (long) v.rOp(($type$) 0, (i, a, b) -> ($type$) (a - b)));
1202 }
1203
1204 @Override
1205 @ForceInline
1206 public $type$ orAll() {
1207 return ($type$) VectorIntrinsics.reductionCoerced(
1208 VECTOR_OP_OR, $vectortype$.class, $type$.class, LENGTH,
1209 this,
1210 v -> (long) v.rOp(($type$) 0, (i, a, b) -> ($type$) (a | b)));
1211 }
1212
1213 @Override
1214 @ForceInline
1215 public $type$ orAll(Mask<$Boxtype$> m) {
1216 return blend(SPECIES.broadcast(($type$) 0), m).orAll();
1217 }
1218
1219 @Override
1220 @ForceInline
1221 public $type$ xorAll() {
1222 return ($type$) VectorIntrinsics.reductionCoerced(
1223 VECTOR_OP_XOR, $vectortype$.class, $type$.class, LENGTH,
1224 this,
1225 v -> (long) v.rOp(($type$) 0, (i, a, b) -> ($type$) (a ^ b)));
1231 return blend(SPECIES.broadcast(($type$) 0), m).xorAll();
1232 }
1233 #end[BITWISE]
1234
1235 #if[FP]
1236 @Override
1237 @ForceInline
1238 public $type$ addAll() {
1239 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1240 VECTOR_OP_ADD, $vectortype$.class, $type$.class, LENGTH,
1241 this,
1242 v -> {
1243 $type$ r = v.rOp(($type$) 0, (i, a, b) -> ($type$) (a + b));
1244 return (long)$Type$.$type$To$Bitstype$Bits(r);
1245 });
1246 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1247 }
1248
1249 @Override
1250 @ForceInline
1251 public $type$ subAll() {
1252 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1253 VECTOR_OP_SUB, $vectortype$.class, $type$.class, LENGTH,
1254 this,
1255 v -> {
1256 $type$ r = v.rOp(($type$) 0, (i, a, b) -> ($type$) (a - b));
1257 return (long)$Type$.$type$To$Bitstype$Bits(r);
1258 });
1259 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1260 }
1261
1262 @Override
1263 @ForceInline
1264 public $type$ mulAll() {
1265 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1266 VECTOR_OP_MUL, $vectortype$.class, $type$.class, LENGTH,
1267 this,
1268 v -> {
1269 $type$ r = v.rOp(($type$) 1, (i, a, b) -> ($type$) (a * b));
1270 return (long)$Type$.$type$To$Bitstype$Bits(r);
1271 });
1272 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1273 }
1274
1275 @Override
1276 @ForceInline
1277 public $type$ minAll() {
1278 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1279 VECTOR_OP_MIN, $vectortype$.class, $type$.class, LENGTH,
1280 this,
1281 v -> {
1282 $type$ r = v.rOp($Boxtype$.MAX_VALUE , (i, a, b) -> ($type$) Math.min(a, b));
1283 return (long)$Type$.$type$To$Bitstype$Bits(r);
1287
1288 @Override
1289 @ForceInline
1290 public $type$ maxAll() {
1291 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1292 VECTOR_OP_MAX, $vectortype$.class, $type$.class, LENGTH,
1293 this,
1294 v -> {
1295 $type$ r = v.rOp($Boxtype$.MIN_VALUE , (i, a, b) -> ($type$) Math.max(a, b));
1296 return (long)$Type$.$type$To$Bitstype$Bits(r);
1297 });
1298 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1299 }
1300
1301 #end[FP]
1302
1303 @Override
1304 @ForceInline
1305 public $type$ addAll(Mask<$Boxtype$> m) {
1306 return blend(SPECIES.broadcast(($type$) 0), m).addAll();
1307 }
1308
1309 @Override
1310 @ForceInline
1311 public $type$ subAll(Mask<$Boxtype$> m) {
1312 return blend(SPECIES.broadcast(($type$) 0), m).subAll();
1313 }
1314
1315 @Override
1316 @ForceInline
1317 public $type$ mulAll(Mask<$Boxtype$> m) {
1318 return blend(SPECIES.broadcast(($type$) 1), m).mulAll();
1319 }
1320
1321 @Override
1322 @ForceInline
1323 public $type$ minAll(Mask<$Boxtype$> m) {
1324 return blend(SPECIES.broadcast($Boxtype$.MAX_VALUE), m).minAll();
1325 }
1326
1327 @Override
1328 @ForceInline
1329 public $type$ maxAll(Mask<$Boxtype$> m) {
1330 return blend(SPECIES.broadcast($Boxtype$.MIN_VALUE), m).maxAll();
1331 }
1332
|
1177 @Override
1178 @ForceInline
1179 public $type$ maxAll() {
1180 return ($type$) VectorIntrinsics.reductionCoerced(
1181 VECTOR_OP_MAX, $vectortype$.class, $type$.class, LENGTH,
1182 this,
1183 v -> (long) v.rOp($Boxtype$.MIN_VALUE , (i, a, b) -> ($type$) Math.max(a, b)));
1184 }
1185
1186 @Override
1187 @ForceInline
1188 public $type$ mulAll() {
1189 return ($type$) VectorIntrinsics.reductionCoerced(
1190 VECTOR_OP_MUL, $vectortype$.class, $type$.class, LENGTH,
1191 this,
1192 v -> (long) v.rOp(($type$) 1, (i, a, b) -> ($type$) (a * b)));
1193 }
1194
1195 @Override
1196 @ForceInline
1197 public $type$ orAll() {
1198 return ($type$) VectorIntrinsics.reductionCoerced(
1199 VECTOR_OP_OR, $vectortype$.class, $type$.class, LENGTH,
1200 this,
1201 v -> (long) v.rOp(($type$) 0, (i, a, b) -> ($type$) (a | b)));
1202 }
1203
1204 @Override
1205 @ForceInline
1206 public $type$ orAll(Mask<$Boxtype$> m) {
1207 return blend(SPECIES.broadcast(($type$) 0), m).orAll();
1208 }
1209
1210 @Override
1211 @ForceInline
1212 public $type$ xorAll() {
1213 return ($type$) VectorIntrinsics.reductionCoerced(
1214 VECTOR_OP_XOR, $vectortype$.class, $type$.class, LENGTH,
1215 this,
1216 v -> (long) v.rOp(($type$) 0, (i, a, b) -> ($type$) (a ^ b)));
1222 return blend(SPECIES.broadcast(($type$) 0), m).xorAll();
1223 }
1224 #end[BITWISE]
1225
1226 #if[FP]
1227 @Override
1228 @ForceInline
1229 public $type$ addAll() {
1230 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1231 VECTOR_OP_ADD, $vectortype$.class, $type$.class, LENGTH,
1232 this,
1233 v -> {
1234 $type$ r = v.rOp(($type$) 0, (i, a, b) -> ($type$) (a + b));
1235 return (long)$Type$.$type$To$Bitstype$Bits(r);
1236 });
1237 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1238 }
1239
1240 @Override
1241 @ForceInline
1242 public $type$ mulAll() {
1243 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1244 VECTOR_OP_MUL, $vectortype$.class, $type$.class, LENGTH,
1245 this,
1246 v -> {
1247 $type$ r = v.rOp(($type$) 1, (i, a, b) -> ($type$) (a * b));
1248 return (long)$Type$.$type$To$Bitstype$Bits(r);
1249 });
1250 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1251 }
1252
1253 @Override
1254 @ForceInline
1255 public $type$ minAll() {
1256 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1257 VECTOR_OP_MIN, $vectortype$.class, $type$.class, LENGTH,
1258 this,
1259 v -> {
1260 $type$ r = v.rOp($Boxtype$.MAX_VALUE , (i, a, b) -> ($type$) Math.min(a, b));
1261 return (long)$Type$.$type$To$Bitstype$Bits(r);
1265
1266 @Override
1267 @ForceInline
1268 public $type$ maxAll() {
1269 $bitstype$ bits = ($bitstype$) VectorIntrinsics.reductionCoerced(
1270 VECTOR_OP_MAX, $vectortype$.class, $type$.class, LENGTH,
1271 this,
1272 v -> {
1273 $type$ r = v.rOp($Boxtype$.MIN_VALUE , (i, a, b) -> ($type$) Math.max(a, b));
1274 return (long)$Type$.$type$To$Bitstype$Bits(r);
1275 });
1276 return $Type$.$bitstype$BitsTo$Fptype$(bits);
1277 }
1278
1279 #end[FP]
1280
1281 @Override
1282 @ForceInline
1283 public $type$ addAll(Mask<$Boxtype$> m) {
1284 return blend(SPECIES.broadcast(($type$) 0), m).addAll();
1285 }
1286
1287 @Override
1288 @ForceInline
1289 public $type$ mulAll(Mask<$Boxtype$> m) {
1290 return blend(SPECIES.broadcast(($type$) 1), m).mulAll();
1291 }
1292
1293 @Override
1294 @ForceInline
1295 public $type$ minAll(Mask<$Boxtype$> m) {
1296 return blend(SPECIES.broadcast($Boxtype$.MAX_VALUE), m).minAll();
1297 }
1298
1299 @Override
1300 @ForceInline
1301 public $type$ maxAll(Mask<$Boxtype$> m) {
1302 return blend(SPECIES.broadcast($Boxtype$.MIN_VALUE), m).maxAll();
1303 }
1304
|