423 public static final ByteVector single(Species<Byte> s, byte e) { 424 return zero(s).with(0, e); 425 } 426 427 /** 428 * Returns a vector where each lane element is set to a randomly 429 * generated primitive value. 430 * 431 * The semantics are equivalent to calling 432 * (byte){@link ThreadLocalRandom#nextInt()} 433 * 434 * @param s species of the desired vector 435 * @return a vector where each lane elements is set to a randomly 436 * generated primitive value 437 */ 438 public static ByteVector random(Species<Byte> s) { 439 ThreadLocalRandom r = ThreadLocalRandom.current(); 440 return ((ByteSpecies)s).op(i -> (byte) r.nextInt()); 441 } 442 443 /** 444 * Returns a mask where each lane is set or unset according to given 445 * {@code boolean} values 446 * <p> 447 * For each mask lane, where {@code N} is the mask lane index, 448 * if the given {@code boolean} value at index {@code N} is {@code true} 449 * then the mask lane at index {@code N} is set, otherwise it is unset. 450 * 451 * @param species mask species 452 * @param bits the given {@code boolean} values 453 * @return a mask where each lane is set or unset according to the given {@code boolean} value 454 * @throws IndexOutOfBoundsException if {@code bits.length < species.length()} 455 */ 456 @ForceInline 457 public static Mask<Byte> maskFromValues(Species<Byte> species, boolean... bits) { 458 if (species.boxType() == ByteMaxVector.class) 459 return new ByteMaxVector.ByteMaxMask(bits); 460 switch (species.bitSize()) { 461 case 64: return new Byte64Vector.Byte64Mask(bits); 462 case 128: return new Byte128Vector.Byte128Mask(bits); 463 case 256: return new Byte256Vector.Byte256Mask(bits); 464 case 512: return new Byte512Vector.Byte512Mask(bits); 465 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 466 } 467 } 468 469 // @@@ This is a bad implementation -- makes lambdas capturing -- fix this 470 static Mask<Byte> trueMask(Species<Byte> species) { 471 if (species.boxType() == ByteMaxVector.class) 472 return ByteMaxVector.ByteMaxMask.TRUE_MASK; 473 switch (species.bitSize()) { 474 case 64: return Byte64Vector.Byte64Mask.TRUE_MASK; 475 case 128: return Byte128Vector.Byte128Mask.TRUE_MASK; 476 case 256: return Byte256Vector.Byte256Mask.TRUE_MASK; 477 case 512: return Byte512Vector.Byte512Mask.TRUE_MASK; 478 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 479 } 480 } 481 482 static Mask<Byte> falseMask(Species<Byte> species) { 483 if (species.boxType() == ByteMaxVector.class) 484 return ByteMaxVector.ByteMaxMask.FALSE_MASK; 485 switch (species.bitSize()) { 486 case 64: return Byte64Vector.Byte64Mask.FALSE_MASK; 487 case 128: return Byte128Vector.Byte128Mask.FALSE_MASK; 488 case 256: return Byte256Vector.Byte256Mask.FALSE_MASK; 489 case 512: return Byte512Vector.Byte512Mask.FALSE_MASK; 490 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 491 } 492 } 493 494 /** 495 * Loads a mask from a {@code boolean} array starting at an offset. 496 * <p> 497 * For each mask lane, where {@code N} is the mask lane index, 498 * if the array element at index {@code ix + N} is {@code true} then the 499 * mask lane at index {@code N} is set, otherwise it is unset. 500 * 501 * @param species mask species 502 * @param bits the {@code boolean} array 503 * @param ix the offset into the array 504 * @return the mask loaded from a {@code boolean} array 505 * @throws IndexOutOfBoundsException if {@code ix < 0}, or 506 * {@code ix > bits.length - species.length()} 507 */ 508 @ForceInline 509 @SuppressWarnings("unchecked") 510 public static Mask<Byte> maskFromArray(Species<Byte> species, boolean[] bits, int ix) { 511 Objects.requireNonNull(bits); 512 ix = VectorIntrinsics.checkIndex(ix, bits.length, species.length()); 513 return VectorIntrinsics.load((Class<Mask<Byte>>) species.maskType(), byte.class, species.length(), 514 bits, (((long) ix) << ARRAY_SHIFT) + Unsafe.ARRAY_BOOLEAN_BASE_OFFSET, 515 bits, ix, species, 516 (c, idx, s) -> (Mask<Byte>) ((ByteSpecies)s).opm(n -> c[idx + n])); 517 } 518 519 /** 520 * Returns a mask where all lanes are set. 521 * 522 * @param species mask species 523 * @return a mask where all lanes are set 524 */ 525 @ForceInline 526 @SuppressWarnings("unchecked") 527 public static Mask<Byte> maskAllTrue(Species<Byte> species) { 528 return VectorIntrinsics.broadcastCoerced((Class<Mask<Byte>>) species.maskType(), byte.class, species.length(), 529 (byte)-1, species, 530 ((z, s) -> trueMask(s))); 531 } 532 533 /** 534 * Returns a mask where all lanes are unset. 535 * 536 * @param species mask species 537 * @return a mask where all lanes are unset 538 */ 539 @ForceInline 540 @SuppressWarnings("unchecked") 541 public static Mask<Byte> maskAllFalse(Species<Byte> species) { 542 return VectorIntrinsics.broadcastCoerced((Class<Mask<Byte>>) species.maskType(), byte.class, species.length(), 543 0, species, 544 ((z, s) -> falseMask(s))); 545 } 546 547 /** 548 * Returns a shuffle of mapped indexes where each lane element is 549 * the result of applying a mapping function to the corresponding lane 550 * index. 551 * <p> 552 * Care should be taken to ensure Shuffle values produced from this 553 * method are consumed as constants to ensure optimal generation of 554 * code. For example, values held in static final fields or values 555 * held in loop constant local variables. 556 * <p> 557 * This method behaves as if a shuffle is created from an array of 558 * mapped indexes as follows: 559 * <pre>{@code 560 * int[] a = new int[species.length()]; 561 * for (int i = 0; i < a.length; i++) { 562 * a[i] = f.applyAsInt(i); 563 * } 564 * return this.shuffleFromValues(a); 565 * }</pre> 566 * 567 * @param species shuffle species 568 * @param f the lane index mapping function 569 * @return a shuffle of mapped indexes 570 */ 571 @ForceInline 572 public static Shuffle<Byte> shuffle(Species<Byte> species, IntUnaryOperator f) { 573 if (species.boxType() == ByteMaxVector.class) 574 return new ByteMaxVector.ByteMaxShuffle(f); 575 switch (species.bitSize()) { 576 case 64: return new Byte64Vector.Byte64Shuffle(f); 577 case 128: return new Byte128Vector.Byte128Shuffle(f); 578 case 256: return new Byte256Vector.Byte256Shuffle(f); 579 case 512: return new Byte512Vector.Byte512Shuffle(f); 580 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 581 } 582 } 583 584 /** 585 * Returns a shuffle where each lane element is the value of its 586 * corresponding lane index. 587 * <p> 588 * This method behaves as if a shuffle is created from an identity 589 * index mapping function as follows: 590 * <pre>{@code 591 * return this.shuffle(i -> i); 592 * }</pre> 593 * 594 * @param species shuffle species 595 * @return a shuffle of lane indexes 596 */ 597 @ForceInline 598 public static Shuffle<Byte> shuffleIota(Species<Byte> species) { 599 if (species.boxType() == ByteMaxVector.class) 600 return new ByteMaxVector.ByteMaxShuffle(AbstractShuffle.IDENTITY); 601 switch (species.bitSize()) { 602 case 64: return new Byte64Vector.Byte64Shuffle(AbstractShuffle.IDENTITY); 603 case 128: return new Byte128Vector.Byte128Shuffle(AbstractShuffle.IDENTITY); 604 case 256: return new Byte256Vector.Byte256Shuffle(AbstractShuffle.IDENTITY); 605 case 512: return new Byte512Vector.Byte512Shuffle(AbstractShuffle.IDENTITY); 606 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 607 } 608 } 609 610 /** 611 * Returns a shuffle where each lane element is set to a given 612 * {@code int} value logically AND'ed by the species length minus one. 613 * <p> 614 * For each shuffle lane, where {@code N} is the shuffle lane index, the 615 * the {@code int} value at index {@code N} logically AND'ed by 616 * {@code species.length() - 1} is placed into the resulting shuffle at 617 * lane index {@code N}. 618 * 619 * @param species shuffle species 620 * @param ixs the given {@code int} values 621 * @return a shuffle where each lane element is set to a given 622 * {@code int} value 623 * @throws IndexOutOfBoundsException if the number of int values is 624 * {@code < species.length()} 625 */ 626 @ForceInline 627 public static Shuffle<Byte> shuffleFromValues(Species<Byte> species, int... ixs) { 628 if (species.boxType() == ByteMaxVector.class) 629 return new ByteMaxVector.ByteMaxShuffle(ixs); 630 switch (species.bitSize()) { 631 case 64: return new Byte64Vector.Byte64Shuffle(ixs); 632 case 128: return new Byte128Vector.Byte128Shuffle(ixs); 633 case 256: return new Byte256Vector.Byte256Shuffle(ixs); 634 case 512: return new Byte512Vector.Byte512Shuffle(ixs); 635 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 636 } 637 } 638 639 /** 640 * Loads a shuffle from an {@code int} array starting at an offset. 641 * <p> 642 * For each shuffle lane, where {@code N} is the shuffle lane index, the 643 * array element at index {@code i + N} logically AND'ed by 644 * {@code species.length() - 1} is placed into the resulting shuffle at lane 645 * index {@code N}. 646 * 647 * @param species shuffle species 648 * @param ixs the {@code int} array 649 * @param i the offset into the array 650 * @return a shuffle loaded from the {@code int} array 651 * @throws IndexOutOfBoundsException if {@code i < 0}, or 652 * {@code i > a.length - species.length()} 653 */ 654 @ForceInline 655 public static Shuffle<Byte> shuffleFromArray(Species<Byte> species, int[] ixs, int i) { 656 if (species.boxType() == ByteMaxVector.class) 657 return new ByteMaxVector.ByteMaxShuffle(ixs, i); 658 switch (species.bitSize()) { 659 case 64: return new Byte64Vector.Byte64Shuffle(ixs, i); 660 case 128: return new Byte128Vector.Byte128Shuffle(ixs, i); 661 case 256: return new Byte256Vector.Byte256Shuffle(ixs, i); 662 case 512: return new Byte512Vector.Byte512Shuffle(ixs, i); 663 default: throw new IllegalArgumentException(Integer.toString(species.bitSize())); 664 } 665 } 666 667 // Ops 668 669 @Override 670 public abstract ByteVector add(Vector<Byte> v); 671 672 /** 673 * Adds this vector to the broadcast of an input scalar. 674 * <p> 675 * This is a vector binary operation where the primitive addition operation 676 * ({@code +}) is applied to lane elements. 677 * 678 * @param s the input scalar 679 * @return the result of adding this vector to the broadcast of an input 680 * scalar 681 */ 682 public abstract ByteVector add(byte s); 683 684 @Override 685 public abstract ByteVector add(Vector<Byte> v, Mask<Byte> m); 686 1530 * indexes in the index map compensate to produce a value within the 1531 * array bounds 1532 * @param m the mask 1533 * @param indexMap the index map 1534 * @param j the offset into the index map 1535 * @throws IndexOutOfBoundsException if {@code j < 0}, or 1536 * {@code j > indexMap.length - this.length()}, 1537 * or for any vector lane index {@code N} where the mask at lane 1538 * {@code N} is set the result of {@code i + indexMap[j + N]} is 1539 * {@code < 0} or {@code >= a.length} 1540 */ 1541 public void intoArray(byte[] a, int i, Mask<Byte> m, int[] indexMap, int j) { 1542 forEach(m, (n, e) -> a[i + indexMap[j + n]] = e); 1543 } 1544 // Species 1545 1546 @Override 1547 public abstract Species<Byte> species(); 1548 1549 /** 1550 * Class representing {@link ByteVector}'s of the same {@link Vector.Shape Shape}. 1551 */ 1552 static final class ByteSpecies extends Vector.AbstractSpecies<Byte> { 1553 final Function<byte[], ByteVector> vectorFactory; 1554 final Function<boolean[], Vector.Mask<Byte>> maskFactory; 1555 1556 private ByteSpecies(Vector.Shape shape, 1557 Class<?> boxType, 1558 Class<?> maskType, 1559 Function<byte[], ByteVector> vectorFactory, 1560 Function<boolean[], Vector.Mask<Byte>> maskFactory) { 1561 super(shape, byte.class, Byte.SIZE, boxType, maskType); 1562 this.vectorFactory = vectorFactory; 1563 this.maskFactory = maskFactory; 1564 } 1565 1566 interface FOp { 1567 byte apply(int i); 1568 } 1569 1570 interface FOpm { 1571 boolean apply(int i); 1572 } 1573 1574 ByteVector op(FOp f) { 1575 byte[] res = new byte[length()]; 1576 for (int i = 0; i < length(); i++) { 1577 res[i] = f.apply(i); 1578 } 1579 return vectorFactory.apply(res); 1580 } 1581 1582 ByteVector op(Vector.Mask<Byte> o, FOp f) { 1583 byte[] res = new byte[length()]; 1584 boolean[] mbits = ((AbstractMask<Byte>)o).getBits(); 1585 for (int i = 0; i < length(); i++) { 1586 if (mbits[i]) { 1587 res[i] = f.apply(i); 1588 } 1589 } 1590 return vectorFactory.apply(res); 1591 } 1592 1593 Vector.Mask<Byte> opm(IntVector.IntSpecies.FOpm f) { 1594 boolean[] res = new boolean[length()]; 1595 for (int i = 0; i < length(); i++) { 1596 res[i] = (boolean)f.apply(i); 1597 } 1598 return maskFactory.apply(res); 1599 } 1600 } 1601 1602 /** 1603 * Finds the preferred species for an element type of {@code byte}. 1604 * <p> 1605 * A preferred species is a species chosen by the platform that has a 1606 * shape of maximal bit size. A preferred species for different element 1607 * types will have the same shape, and therefore vectors, masks, and 1608 * shuffles created from such species will be shape compatible. 1609 * 1610 * @return the preferred species for an element type of {@code byte} 1611 */ 1612 private static ByteSpecies preferredSpecies() { 1613 return (ByteSpecies) Species.ofPreferred(byte.class); 1614 } 1615 1616 /** 1617 * Finds a species for an element type of {@code byte} and shape. 1618 * 1619 * @param s the shape 1620 * @return a species for an element type of {@code byte} and shape 1621 * @throws IllegalArgumentException if no such species exists for the shape 1622 */ 1623 static ByteSpecies species(Vector.Shape s) { 1624 Objects.requireNonNull(s); 1625 switch (s) { 1626 case S_64_BIT: return (ByteSpecies) SPECIES_64; 1627 case S_128_BIT: return (ByteSpecies) SPECIES_128; 1628 case S_256_BIT: return (ByteSpecies) SPECIES_256; 1629 case S_512_BIT: return (ByteSpecies) SPECIES_512; 1630 case S_Max_BIT: return (ByteSpecies) SPECIES_MAX; 1631 default: throw new IllegalArgumentException("Bad shape: " + s); 1632 } 1633 } 1634 1635 /** Species representing {@link ByteVector}s of {@link Vector.Shape#S_64_BIT Shape.S_64_BIT}. */ 1636 public static final Species<Byte> SPECIES_64 = new ByteSpecies(Shape.S_64_BIT, Byte64Vector.class, Byte64Vector.Byte64Mask.class, 1637 Byte64Vector::new, Byte64Vector.Byte64Mask::new); 1638 1639 /** Species representing {@link ByteVector}s of {@link Vector.Shape#S_128_BIT Shape.S_128_BIT}. */ 1640 public static final Species<Byte> SPECIES_128 = new ByteSpecies(Shape.S_128_BIT, Byte128Vector.class, Byte128Vector.Byte128Mask.class, 1641 Byte128Vector::new, Byte128Vector.Byte128Mask::new); 1642 1643 /** Species representing {@link ByteVector}s of {@link Vector.Shape#S_256_BIT Shape.S_256_BIT}. */ 1644 public static final Species<Byte> SPECIES_256 = new ByteSpecies(Shape.S_256_BIT, Byte256Vector.class, Byte256Vector.Byte256Mask.class, 1645 Byte256Vector::new, Byte256Vector.Byte256Mask::new); 1646 1647 /** Species representing {@link ByteVector}s of {@link Vector.Shape#S_512_BIT Shape.S_512_BIT}. */ 1648 public static final Species<Byte> SPECIES_512 = new ByteSpecies(Shape.S_512_BIT, Byte512Vector.class, Byte512Vector.Byte512Mask.class, 1649 Byte512Vector::new, Byte512Vector.Byte512Mask::new); 1650 1651 /** Species representing {@link ByteVector}s of {@link Vector.Shape#S_Max_BIT Shape.S_Max_BIT}. */ 1652 public static final Species<Byte> SPECIES_MAX = new ByteSpecies(Shape.S_Max_BIT, ByteMaxVector.class, ByteMaxVector.ByteMaxMask.class, 1653 ByteMaxVector::new, ByteMaxVector.ByteMaxMask::new); 1654 1655 /** 1656 * Preferred species for {@link ByteVector}s. 1657 * A preferred species is a species of maximal bit size for the platform. 1658 */ 1659 public static final Species<Byte> SPECIES_PREFERRED = (Species<Byte>) preferredSpecies(); 1660 } | 423 public static final ByteVector single(Species<Byte> s, byte e) { 424 return zero(s).with(0, e); 425 } 426 427 /** 428 * Returns a vector where each lane element is set to a randomly 429 * generated primitive value. 430 * 431 * The semantics are equivalent to calling 432 * (byte){@link ThreadLocalRandom#nextInt()} 433 * 434 * @param s species of the desired vector 435 * @return a vector where each lane elements is set to a randomly 436 * generated primitive value 437 */ 438 public static ByteVector random(Species<Byte> s) { 439 ThreadLocalRandom r = ThreadLocalRandom.current(); 440 return ((ByteSpecies)s).op(i -> (byte) r.nextInt()); 441 } 442 443 // Ops 444 445 @Override 446 public abstract ByteVector add(Vector<Byte> v); 447 448 /** 449 * Adds this vector to the broadcast of an input scalar. 450 * <p> 451 * This is a vector binary operation where the primitive addition operation 452 * ({@code +}) is applied to lane elements. 453 * 454 * @param s the input scalar 455 * @return the result of adding this vector to the broadcast of an input 456 * scalar 457 */ 458 public abstract ByteVector add(byte s); 459 460 @Override 461 public abstract ByteVector add(Vector<Byte> v, Mask<Byte> m); 462 1306 * indexes in the index map compensate to produce a value within the 1307 * array bounds 1308 * @param m the mask 1309 * @param indexMap the index map 1310 * @param j the offset into the index map 1311 * @throws IndexOutOfBoundsException if {@code j < 0}, or 1312 * {@code j > indexMap.length - this.length()}, 1313 * or for any vector lane index {@code N} where the mask at lane 1314 * {@code N} is set the result of {@code i + indexMap[j + N]} is 1315 * {@code < 0} or {@code >= a.length} 1316 */ 1317 public void intoArray(byte[] a, int i, Mask<Byte> m, int[] indexMap, int j) { 1318 forEach(m, (n, e) -> a[i + indexMap[j + n]] = e); 1319 } 1320 // Species 1321 1322 @Override 1323 public abstract Species<Byte> species(); 1324 1325 /** 1326 * Class representing {@link ByteVector}'s of the same {@link Shape Shape}. 1327 */ 1328 static final class ByteSpecies extends AbstractSpecies<Byte> { 1329 final Function<byte[], ByteVector> vectorFactory; 1330 1331 private ByteSpecies(Shape shape, 1332 Class<?> boxType, 1333 Class<?> maskType, 1334 Function<byte[], ByteVector> vectorFactory, 1335 Function<boolean[], Mask<Byte>> maskFactory, 1336 Function<IntUnaryOperator, Shuffle<Byte>> shuffleFromArrayFactory, 1337 fShuffleFromArray<Byte> shuffleFromOpFactory) { 1338 super(shape, byte.class, Byte.SIZE, boxType, maskType, maskFactory, 1339 shuffleFromArrayFactory, shuffleFromOpFactory); 1340 this.vectorFactory = vectorFactory; 1341 } 1342 1343 interface FOp { 1344 byte apply(int i); 1345 } 1346 1347 interface FOpm { 1348 boolean apply(int i); 1349 } 1350 1351 ByteVector op(FOp f) { 1352 byte[] res = new byte[length()]; 1353 for (int i = 0; i < length(); i++) { 1354 res[i] = f.apply(i); 1355 } 1356 return vectorFactory.apply(res); 1357 } 1358 1359 ByteVector op(Mask<Byte> o, FOp f) { 1360 byte[] res = new byte[length()]; 1361 boolean[] mbits = ((AbstractMask<Byte>)o).getBits(); 1362 for (int i = 0; i < length(); i++) { 1363 if (mbits[i]) { 1364 res[i] = f.apply(i); 1365 } 1366 } 1367 return vectorFactory.apply(res); 1368 } 1369 } 1370 1371 /** 1372 * Finds the preferred species for an element type of {@code byte}. 1373 * <p> 1374 * A preferred species is a species chosen by the platform that has a 1375 * shape of maximal bit size. A preferred species for different element 1376 * types will have the same shape, and therefore vectors, masks, and 1377 * shuffles created from such species will be shape compatible. 1378 * 1379 * @return the preferred species for an element type of {@code byte} 1380 */ 1381 private static ByteSpecies preferredSpecies() { 1382 return (ByteSpecies) Species.ofPreferred(byte.class); 1383 } 1384 1385 /** 1386 * Finds a species for an element type of {@code byte} and shape. 1387 * 1388 * @param s the shape 1389 * @return a species for an element type of {@code byte} and shape 1390 * @throws IllegalArgumentException if no such species exists for the shape 1391 */ 1392 static ByteSpecies species(Shape s) { 1393 Objects.requireNonNull(s); 1394 switch (s) { 1395 case S_64_BIT: return (ByteSpecies) SPECIES_64; 1396 case S_128_BIT: return (ByteSpecies) SPECIES_128; 1397 case S_256_BIT: return (ByteSpecies) SPECIES_256; 1398 case S_512_BIT: return (ByteSpecies) SPECIES_512; 1399 case S_Max_BIT: return (ByteSpecies) SPECIES_MAX; 1400 default: throw new IllegalArgumentException("Bad shape: " + s); 1401 } 1402 } 1403 1404 /** Species representing {@link ByteVector}s of {@link Shape#S_64_BIT Shape.S_64_BIT}. */ 1405 public static final Species<Byte> SPECIES_64 = new ByteSpecies(Shape.S_64_BIT, Byte64Vector.class, Byte64Vector.Byte64Mask.class, 1406 Byte64Vector::new, Byte64Vector.Byte64Mask::new, 1407 Byte64Vector.Byte64Shuffle::new, Byte64Vector.Byte64Shuffle::new); 1408 1409 /** Species representing {@link ByteVector}s of {@link Shape#S_128_BIT Shape.S_128_BIT}. */ 1410 public static final Species<Byte> SPECIES_128 = new ByteSpecies(Shape.S_128_BIT, Byte128Vector.class, Byte128Vector.Byte128Mask.class, 1411 Byte128Vector::new, Byte128Vector.Byte128Mask::new, 1412 Byte128Vector.Byte128Shuffle::new, Byte128Vector.Byte128Shuffle::new); 1413 1414 /** Species representing {@link ByteVector}s of {@link Shape#S_256_BIT Shape.S_256_BIT}. */ 1415 public static final Species<Byte> SPECIES_256 = new ByteSpecies(Shape.S_256_BIT, Byte256Vector.class, Byte256Vector.Byte256Mask.class, 1416 Byte256Vector::new, Byte256Vector.Byte256Mask::new, 1417 Byte256Vector.Byte256Shuffle::new, Byte256Vector.Byte256Shuffle::new); 1418 1419 /** Species representing {@link ByteVector}s of {@link Shape#S_512_BIT Shape.S_512_BIT}. */ 1420 public static final Species<Byte> SPECIES_512 = new ByteSpecies(Shape.S_512_BIT, Byte512Vector.class, Byte512Vector.Byte512Mask.class, 1421 Byte512Vector::new, Byte512Vector.Byte512Mask::new, 1422 Byte512Vector.Byte512Shuffle::new, Byte512Vector.Byte512Shuffle::new); 1423 1424 /** Species representing {@link ByteVector}s of {@link Shape#S_Max_BIT Shape.S_Max_BIT}. */ 1425 public static final Species<Byte> SPECIES_MAX = new ByteSpecies(Shape.S_Max_BIT, ByteMaxVector.class, ByteMaxVector.ByteMaxMask.class, 1426 ByteMaxVector::new, ByteMaxVector.ByteMaxMask::new, 1427 ByteMaxVector.ByteMaxShuffle::new, ByteMaxVector.ByteMaxShuffle::new); 1428 1429 /** 1430 * Preferred species for {@link ByteVector}s. 1431 * A preferred species is a species of maximal bit size for the platform. 1432 */ 1433 public static final Species<Byte> SPECIES_PREFERRED = (Species<Byte>) preferredSpecies(); 1434 } |