< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java

Print this page




 424     public static final ShortVector single(Species<Short> s, short e) {
 425         return zero(s).with(0, e);
 426     }
 427 
 428     /**
 429      * Returns a vector where each lane element is set to a randomly
 430      * generated primitive value.
 431      *
 432      * The semantics are equivalent to calling
 433      * (short){@link ThreadLocalRandom#nextInt()}
 434      *
 435      * @param s species of the desired vector
 436      * @return a vector where each lane elements is set to a randomly
 437      * generated primitive value
 438      */
 439     public static ShortVector random(Species<Short> s) {
 440         ThreadLocalRandom r = ThreadLocalRandom.current();
 441         return ((ShortSpecies)s).op(i -> (short) r.nextInt());
 442     }
 443 
 444     /**
 445      * Returns a mask where each lane is set or unset according to given
 446      * {@code boolean} values
 447      * <p>
 448      * For each mask lane, where {@code N} is the mask lane index,
 449      * if the given {@code boolean} value at index {@code N} is {@code true}
 450      * then the mask lane at index {@code N} is set, otherwise it is unset.
 451      *
 452      * @param species mask species
 453      * @param bits the given {@code boolean} values
 454      * @return a mask where each lane is set or unset according to the given {@code boolean} value
 455      * @throws IndexOutOfBoundsException if {@code bits.length < species.length()}
 456      */
 457     @ForceInline
 458     public static Mask<Short> maskFromValues(Species<Short> species, boolean... bits) {
 459         if (species.boxType() == ShortMaxVector.class)
 460             return new ShortMaxVector.ShortMaxMask(bits);
 461         switch (species.bitSize()) {
 462             case 64: return new Short64Vector.Short64Mask(bits);
 463             case 128: return new Short128Vector.Short128Mask(bits);
 464             case 256: return new Short256Vector.Short256Mask(bits);
 465             case 512: return new Short512Vector.Short512Mask(bits);
 466             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 467         }
 468     }
 469 
 470     // @@@ This is a bad implementation -- makes lambdas capturing -- fix this
 471     static Mask<Short> trueMask(Species<Short> species) {
 472         if (species.boxType() == ShortMaxVector.class)
 473             return ShortMaxVector.ShortMaxMask.TRUE_MASK;
 474         switch (species.bitSize()) {
 475             case 64: return Short64Vector.Short64Mask.TRUE_MASK;
 476             case 128: return Short128Vector.Short128Mask.TRUE_MASK;
 477             case 256: return Short256Vector.Short256Mask.TRUE_MASK;
 478             case 512: return Short512Vector.Short512Mask.TRUE_MASK;
 479             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 480         }
 481     }
 482 
 483     static Mask<Short> falseMask(Species<Short> species) {
 484         if (species.boxType() == ShortMaxVector.class)
 485             return ShortMaxVector.ShortMaxMask.FALSE_MASK;
 486         switch (species.bitSize()) {
 487             case 64: return Short64Vector.Short64Mask.FALSE_MASK;
 488             case 128: return Short128Vector.Short128Mask.FALSE_MASK;
 489             case 256: return Short256Vector.Short256Mask.FALSE_MASK;
 490             case 512: return Short512Vector.Short512Mask.FALSE_MASK;
 491             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 492         }
 493     }
 494 
 495     /**
 496      * Loads a mask from a {@code boolean} array starting at an offset.
 497      * <p>
 498      * For each mask lane, where {@code N} is the mask lane index,
 499      * if the array element at index {@code ix + N} is {@code true} then the
 500      * mask lane at index {@code N} is set, otherwise it is unset.
 501      *
 502      * @param species mask species
 503      * @param bits the {@code boolean} array
 504      * @param ix the offset into the array
 505      * @return the mask loaded from a {@code boolean} array
 506      * @throws IndexOutOfBoundsException if {@code ix < 0}, or
 507      * {@code ix > bits.length - species.length()}
 508      */
 509     @ForceInline
 510     @SuppressWarnings("unchecked")
 511     public static Mask<Short> maskFromArray(Species<Short> species, boolean[] bits, int ix) {
 512         Objects.requireNonNull(bits);
 513         ix = VectorIntrinsics.checkIndex(ix, bits.length, species.length());
 514         return VectorIntrinsics.load((Class<Mask<Short>>) species.maskType(), short.class, species.length(),
 515                                      bits, (((long) ix) << ARRAY_SHIFT) + Unsafe.ARRAY_BOOLEAN_BASE_OFFSET,
 516                                      bits, ix, species,
 517                                      (c, idx, s) -> (Mask<Short>) ((ShortSpecies)s).opm(n -> c[idx + n]));
 518     }
 519 
 520     /**
 521      * Returns a mask where all lanes are set.
 522      *
 523      * @param species mask species
 524      * @return a mask where all lanes are set
 525      */
 526     @ForceInline
 527     @SuppressWarnings("unchecked")
 528     public static Mask<Short> maskAllTrue(Species<Short> species) {
 529         return VectorIntrinsics.broadcastCoerced((Class<Mask<Short>>) species.maskType(), short.class, species.length(),
 530                                                  (short)-1,  species,
 531                                                  ((z, s) -> trueMask(s)));
 532     }
 533 
 534     /**
 535      * Returns a mask where all lanes are unset.
 536      *
 537      * @param species mask species
 538      * @return a mask where all lanes are unset
 539      */
 540     @ForceInline
 541     @SuppressWarnings("unchecked")
 542     public static Mask<Short> maskAllFalse(Species<Short> species) {
 543         return VectorIntrinsics.broadcastCoerced((Class<Mask<Short>>) species.maskType(), short.class, species.length(),
 544                                                  0, species, 
 545                                                  ((z, s) -> falseMask(s)));
 546     }
 547 
 548     /**
 549      * Returns a shuffle of mapped indexes where each lane element is
 550      * the result of applying a mapping function to the corresponding lane
 551      * index.
 552      * <p>
 553      * Care should be taken to ensure Shuffle values produced from this
 554      * method are consumed as constants to ensure optimal generation of
 555      * code.  For example, values held in static final fields or values
 556      * held in loop constant local variables.
 557      * <p>
 558      * This method behaves as if a shuffle is created from an array of
 559      * mapped indexes as follows:
 560      * <pre>{@code
 561      *   int[] a = new int[species.length()];
 562      *   for (int i = 0; i < a.length; i++) {
 563      *       a[i] = f.applyAsInt(i);
 564      *   }
 565      *   return this.shuffleFromValues(a);
 566      * }</pre>
 567      *
 568      * @param species shuffle species
 569      * @param f the lane index mapping function
 570      * @return a shuffle of mapped indexes
 571      */
 572     @ForceInline
 573     public static Shuffle<Short> shuffle(Species<Short> species, IntUnaryOperator f) {
 574         if (species.boxType() == ShortMaxVector.class)
 575             return new ShortMaxVector.ShortMaxShuffle(f);
 576         switch (species.bitSize()) {
 577             case 64: return new Short64Vector.Short64Shuffle(f);
 578             case 128: return new Short128Vector.Short128Shuffle(f);
 579             case 256: return new Short256Vector.Short256Shuffle(f);
 580             case 512: return new Short512Vector.Short512Shuffle(f);
 581             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 582         }
 583     }
 584 
 585     /**
 586      * Returns a shuffle where each lane element is the value of its
 587      * corresponding lane index.
 588      * <p>
 589      * This method behaves as if a shuffle is created from an identity
 590      * index mapping function as follows:
 591      * <pre>{@code
 592      *   return this.shuffle(i -> i);
 593      * }</pre>
 594      *
 595      * @param species shuffle species
 596      * @return a shuffle of lane indexes
 597      */
 598     @ForceInline
 599     public static Shuffle<Short> shuffleIota(Species<Short> species) {
 600         if (species.boxType() == ShortMaxVector.class)
 601             return new ShortMaxVector.ShortMaxShuffle(AbstractShuffle.IDENTITY);
 602         switch (species.bitSize()) {
 603             case 64: return new Short64Vector.Short64Shuffle(AbstractShuffle.IDENTITY);
 604             case 128: return new Short128Vector.Short128Shuffle(AbstractShuffle.IDENTITY);
 605             case 256: return new Short256Vector.Short256Shuffle(AbstractShuffle.IDENTITY);
 606             case 512: return new Short512Vector.Short512Shuffle(AbstractShuffle.IDENTITY);
 607             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 608         }
 609     }
 610 
 611     /**
 612      * Returns a shuffle where each lane element is set to a given
 613      * {@code int} value logically AND'ed by the species length minus one.
 614      * <p>
 615      * For each shuffle lane, where {@code N} is the shuffle lane index, the
 616      * the {@code int} value at index {@code N} logically AND'ed by
 617      * {@code species.length() - 1} is placed into the resulting shuffle at
 618      * lane index {@code N}.
 619      *
 620      * @param species shuffle species
 621      * @param ixs the given {@code int} values
 622      * @return a shuffle where each lane element is set to a given
 623      * {@code int} value
 624      * @throws IndexOutOfBoundsException if the number of int values is
 625      * {@code < species.length()}
 626      */
 627     @ForceInline
 628     public static Shuffle<Short> shuffleFromValues(Species<Short> species, int... ixs) {
 629         if (species.boxType() == ShortMaxVector.class)
 630             return new ShortMaxVector.ShortMaxShuffle(ixs);
 631         switch (species.bitSize()) {
 632             case 64: return new Short64Vector.Short64Shuffle(ixs);
 633             case 128: return new Short128Vector.Short128Shuffle(ixs);
 634             case 256: return new Short256Vector.Short256Shuffle(ixs);
 635             case 512: return new Short512Vector.Short512Shuffle(ixs);
 636             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 637         }
 638     }
 639 
 640     /**
 641      * Loads a shuffle from an {@code int} array starting at an offset.
 642      * <p>
 643      * For each shuffle lane, where {@code N} is the shuffle lane index, the
 644      * array element at index {@code i + N} logically AND'ed by
 645      * {@code species.length() - 1} is placed into the resulting shuffle at lane
 646      * index {@code N}.
 647      *
 648      * @param species shuffle species
 649      * @param ixs the {@code int} array
 650      * @param i the offset into the array
 651      * @return a shuffle loaded from the {@code int} array
 652      * @throws IndexOutOfBoundsException if {@code i < 0}, or
 653      * {@code i > a.length - species.length()}
 654      */
 655     @ForceInline
 656     public static Shuffle<Short> shuffleFromArray(Species<Short> species, int[] ixs, int i) {
 657         if (species.boxType() == ShortMaxVector.class)
 658             return new ShortMaxVector.ShortMaxShuffle(ixs, i);
 659         switch (species.bitSize()) {
 660             case 64: return new Short64Vector.Short64Shuffle(ixs, i);
 661             case 128: return new Short128Vector.Short128Shuffle(ixs, i);
 662             case 256: return new Short256Vector.Short256Shuffle(ixs, i);
 663             case 512: return new Short512Vector.Short512Shuffle(ixs, i);
 664             default: throw new IllegalArgumentException(Integer.toString(species.bitSize()));
 665         }
 666     }
 667 
 668     // Ops
 669 
 670     @Override
 671     public abstract ShortVector add(Vector<Short> v);
 672 
 673     /**
 674      * Adds this vector to the broadcast of an input scalar.
 675      * <p>
 676      * This is a vector binary operation where the primitive addition operation
 677      * ({@code +}) is applied to lane elements.
 678      *
 679      * @param s the input scalar
 680      * @return the result of adding this vector to the broadcast of an input
 681      * scalar
 682      */
 683     public abstract ShortVector add(short s);
 684 
 685     @Override
 686     public abstract ShortVector add(Vector<Short> v, Mask<Short> m);
 687 


1531      * indexes in the index map compensate to produce a value within the
1532      * array bounds
1533      * @param m the mask
1534      * @param indexMap the index map
1535      * @param j the offset into the index map
1536      * @throws IndexOutOfBoundsException if {@code j < 0}, or
1537      * {@code j > indexMap.length - this.length()},
1538      * or for any vector lane index {@code N} where the mask at lane
1539      * {@code N} is set the result of {@code i + indexMap[j + N]} is
1540      * {@code < 0} or {@code >= a.length}
1541      */
1542     public void intoArray(short[] a, int i, Mask<Short> m, int[] indexMap, int j) {
1543         forEach(m, (n, e) -> a[i + indexMap[j + n]] = e);
1544     }
1545     // Species
1546 
1547     @Override
1548     public abstract Species<Short> species();
1549 
1550     /**
1551      * Class representing {@link ShortVector}'s of the same {@link Vector.Shape Shape}.
1552      */
1553     static final class ShortSpecies extends Vector.AbstractSpecies<Short> {
1554         final Function<short[], ShortVector> vectorFactory;
1555         final Function<boolean[], Vector.Mask<Short>> maskFactory;
1556 
1557         private ShortSpecies(Vector.Shape shape,
1558                           Class<?> boxType,
1559                           Class<?> maskType,
1560                           Function<short[], ShortVector> vectorFactory,
1561                           Function<boolean[], Vector.Mask<Short>> maskFactory) {
1562             super(shape, short.class, Short.SIZE, boxType, maskType);



1563             this.vectorFactory = vectorFactory;
1564             this.maskFactory = maskFactory;
1565         }
1566 
1567         interface FOp {
1568             short apply(int i);
1569         }
1570 
1571         interface FOpm {
1572             boolean apply(int i);
1573         }
1574 
1575         ShortVector op(FOp f) {
1576             short[] res = new short[length()];
1577             for (int i = 0; i < length(); i++) {
1578                 res[i] = f.apply(i);
1579             }
1580             return vectorFactory.apply(res);
1581         }
1582 
1583         ShortVector op(Vector.Mask<Short> o, FOp f) {
1584             short[] res = new short[length()];
1585             boolean[] mbits = ((AbstractMask<Short>)o).getBits();
1586             for (int i = 0; i < length(); i++) {
1587                 if (mbits[i]) {
1588                     res[i] = f.apply(i);
1589                 }
1590             }
1591             return vectorFactory.apply(res);
1592         }
1593 
1594         Vector.Mask<Short> opm(IntVector.IntSpecies.FOpm f) {
1595             boolean[] res = new boolean[length()];
1596             for (int i = 0; i < length(); i++) {
1597                 res[i] = (boolean)f.apply(i);
1598             }
1599             return maskFactory.apply(res);
1600         }
1601     }
1602 
1603     /**
1604      * Finds the preferred species for an element type of {@code short}.
1605      * <p>
1606      * A preferred species is a species chosen by the platform that has a
1607      * shape of maximal bit size.  A preferred species for different element
1608      * types will have the same shape, and therefore vectors, masks, and
1609      * shuffles created from such species will be shape compatible.
1610      *
1611      * @return the preferred species for an element type of {@code short}
1612      */
1613     private static ShortSpecies preferredSpecies() {
1614         return (ShortSpecies) Species.ofPreferred(short.class);
1615     }
1616 
1617     /**
1618      * Finds a species for an element type of {@code short} and shape.
1619      *
1620      * @param s the shape
1621      * @return a species for an element type of {@code short} and shape
1622      * @throws IllegalArgumentException if no such species exists for the shape
1623      */
1624     static ShortSpecies species(Vector.Shape s) {
1625         Objects.requireNonNull(s);
1626         switch (s) {
1627             case S_64_BIT: return (ShortSpecies) SPECIES_64;
1628             case S_128_BIT: return (ShortSpecies) SPECIES_128;
1629             case S_256_BIT: return (ShortSpecies) SPECIES_256;
1630             case S_512_BIT: return (ShortSpecies) SPECIES_512;
1631             case S_Max_BIT: return (ShortSpecies) SPECIES_MAX;
1632             default: throw new IllegalArgumentException("Bad shape: " + s);
1633         }
1634     }
1635 
1636     /** Species representing {@link ShortVector}s of {@link Vector.Shape#S_64_BIT Shape.S_64_BIT}. */
1637     public static final Species<Short> SPECIES_64 = new ShortSpecies(Shape.S_64_BIT, Short64Vector.class, Short64Vector.Short64Mask.class,
1638                                                                      Short64Vector::new, Short64Vector.Short64Mask::new);

1639 
1640     /** Species representing {@link ShortVector}s of {@link Vector.Shape#S_128_BIT Shape.S_128_BIT}. */
1641     public static final Species<Short> SPECIES_128 = new ShortSpecies(Shape.S_128_BIT, Short128Vector.class, Short128Vector.Short128Mask.class,
1642                                                                       Short128Vector::new, Short128Vector.Short128Mask::new);

1643 
1644     /** Species representing {@link ShortVector}s of {@link Vector.Shape#S_256_BIT Shape.S_256_BIT}. */
1645     public static final Species<Short> SPECIES_256 = new ShortSpecies(Shape.S_256_BIT, Short256Vector.class, Short256Vector.Short256Mask.class,
1646                                                                       Short256Vector::new, Short256Vector.Short256Mask::new);

1647 
1648     /** Species representing {@link ShortVector}s of {@link Vector.Shape#S_512_BIT Shape.S_512_BIT}. */
1649     public static final Species<Short> SPECIES_512 = new ShortSpecies(Shape.S_512_BIT, Short512Vector.class, Short512Vector.Short512Mask.class,
1650                                                                       Short512Vector::new, Short512Vector.Short512Mask::new);

1651 
1652     /** Species representing {@link ShortVector}s of {@link Vector.Shape#S_Max_BIT Shape.S_Max_BIT}. */
1653     public static final Species<Short> SPECIES_MAX = new ShortSpecies(Shape.S_Max_BIT, ShortMaxVector.class, ShortMaxVector.ShortMaxMask.class,
1654                                                                       ShortMaxVector::new, ShortMaxVector.ShortMaxMask::new);

1655 
1656     /**
1657      * Preferred species for {@link ShortVector}s.
1658      * A preferred species is a species of maximal bit size for the platform.
1659      */
1660     public static final Species<Short> SPECIES_PREFERRED = (Species<Short>) preferredSpecies();
1661 }


 424     public static final ShortVector single(Species<Short> s, short e) {
 425         return zero(s).with(0, e);
 426     }
 427 
 428     /**
 429      * Returns a vector where each lane element is set to a randomly
 430      * generated primitive value.
 431      *
 432      * The semantics are equivalent to calling
 433      * (short){@link ThreadLocalRandom#nextInt()}
 434      *
 435      * @param s species of the desired vector
 436      * @return a vector where each lane elements is set to a randomly
 437      * generated primitive value
 438      */
 439     public static ShortVector random(Species<Short> s) {
 440         ThreadLocalRandom r = ThreadLocalRandom.current();
 441         return ((ShortSpecies)s).op(i -> (short) r.nextInt());
 442     }
 443 
































































































































































































































 444     // Ops
 445 
 446     @Override
 447     public abstract ShortVector add(Vector<Short> v);
 448 
 449     /**
 450      * Adds this vector to the broadcast of an input scalar.
 451      * <p>
 452      * This is a vector binary operation where the primitive addition operation
 453      * ({@code +}) is applied to lane elements.
 454      *
 455      * @param s the input scalar
 456      * @return the result of adding this vector to the broadcast of an input
 457      * scalar
 458      */
 459     public abstract ShortVector add(short s);
 460 
 461     @Override
 462     public abstract ShortVector add(Vector<Short> v, Mask<Short> m);
 463 


1307      * indexes in the index map compensate to produce a value within the
1308      * array bounds
1309      * @param m the mask
1310      * @param indexMap the index map
1311      * @param j the offset into the index map
1312      * @throws IndexOutOfBoundsException if {@code j < 0}, or
1313      * {@code j > indexMap.length - this.length()},
1314      * or for any vector lane index {@code N} where the mask at lane
1315      * {@code N} is set the result of {@code i + indexMap[j + N]} is
1316      * {@code < 0} or {@code >= a.length}
1317      */
1318     public void intoArray(short[] a, int i, Mask<Short> m, int[] indexMap, int j) {
1319         forEach(m, (n, e) -> a[i + indexMap[j + n]] = e);
1320     }
1321     // Species
1322 
1323     @Override
1324     public abstract Species<Short> species();
1325 
1326     /**
1327      * Class representing {@link ShortVector}'s of the same {@link Shape Shape}.
1328      */
1329     static final class ShortSpecies extends AbstractSpecies<Short> {
1330         final Function<short[], ShortVector> vectorFactory;

1331 
1332         private ShortSpecies(Shape shape,
1333                           Class<?> boxType,
1334                           Class<?> maskType,
1335                           Function<short[], ShortVector> vectorFactory,
1336                           Function<boolean[], Mask<Short>> maskFactory,
1337                           Function<IntUnaryOperator, Shuffle<Short>> shuffleFromArrayFactory,
1338                           fShuffleFromArray<Short> shuffleFromOpFactory) {
1339             super(shape, short.class, Short.SIZE, boxType, maskType, maskFactory,
1340                   shuffleFromArrayFactory, shuffleFromOpFactory);
1341             this.vectorFactory = vectorFactory;

1342         }
1343 
1344         interface FOp {
1345             short apply(int i);
1346         }
1347 
1348         interface FOpm {
1349             boolean apply(int i);
1350         }
1351 
1352         ShortVector op(FOp f) {
1353             short[] res = new short[length()];
1354             for (int i = 0; i < length(); i++) {
1355                 res[i] = f.apply(i);
1356             }
1357             return vectorFactory.apply(res);
1358         }
1359 
1360         ShortVector op(Mask<Short> o, FOp f) {
1361             short[] res = new short[length()];
1362             boolean[] mbits = ((AbstractMask<Short>)o).getBits();
1363             for (int i = 0; i < length(); i++) {
1364                 if (mbits[i]) {
1365                     res[i] = f.apply(i);
1366                 }
1367             }
1368             return vectorFactory.apply(res);
1369         }








1370     }
1371 
1372     /**
1373      * Finds the preferred species for an element type of {@code short}.
1374      * <p>
1375      * A preferred species is a species chosen by the platform that has a
1376      * shape of maximal bit size.  A preferred species for different element
1377      * types will have the same shape, and therefore vectors, masks, and
1378      * shuffles created from such species will be shape compatible.
1379      *
1380      * @return the preferred species for an element type of {@code short}
1381      */
1382     private static ShortSpecies preferredSpecies() {
1383         return (ShortSpecies) Species.ofPreferred(short.class);
1384     }
1385 
1386     /**
1387      * Finds a species for an element type of {@code short} and shape.
1388      *
1389      * @param s the shape
1390      * @return a species for an element type of {@code short} and shape
1391      * @throws IllegalArgumentException if no such species exists for the shape
1392      */
1393     static ShortSpecies species(Shape s) {
1394         Objects.requireNonNull(s);
1395         switch (s) {
1396             case S_64_BIT: return (ShortSpecies) SPECIES_64;
1397             case S_128_BIT: return (ShortSpecies) SPECIES_128;
1398             case S_256_BIT: return (ShortSpecies) SPECIES_256;
1399             case S_512_BIT: return (ShortSpecies) SPECIES_512;
1400             case S_Max_BIT: return (ShortSpecies) SPECIES_MAX;
1401             default: throw new IllegalArgumentException("Bad shape: " + s);
1402         }
1403     }
1404 
1405     /** Species representing {@link ShortVector}s of {@link Shape#S_64_BIT Shape.S_64_BIT}. */
1406     public static final Species<Short> SPECIES_64 = new ShortSpecies(Shape.S_64_BIT, Short64Vector.class, Short64Vector.Short64Mask.class,
1407                                                                      Short64Vector::new, Short64Vector.Short64Mask::new,
1408                                                                      Short64Vector.Short64Shuffle::new, Short64Vector.Short64Shuffle::new);
1409 
1410     /** Species representing {@link ShortVector}s of {@link Shape#S_128_BIT Shape.S_128_BIT}. */
1411     public static final Species<Short> SPECIES_128 = new ShortSpecies(Shape.S_128_BIT, Short128Vector.class, Short128Vector.Short128Mask.class,
1412                                                                       Short128Vector::new, Short128Vector.Short128Mask::new,
1413                                                                       Short128Vector.Short128Shuffle::new, Short128Vector.Short128Shuffle::new);
1414 
1415     /** Species representing {@link ShortVector}s of {@link Shape#S_256_BIT Shape.S_256_BIT}. */
1416     public static final Species<Short> SPECIES_256 = new ShortSpecies(Shape.S_256_BIT, Short256Vector.class, Short256Vector.Short256Mask.class,
1417                                                                       Short256Vector::new, Short256Vector.Short256Mask::new,
1418                                                                       Short256Vector.Short256Shuffle::new, Short256Vector.Short256Shuffle::new);
1419 
1420     /** Species representing {@link ShortVector}s of {@link Shape#S_512_BIT Shape.S_512_BIT}. */
1421     public static final Species<Short> SPECIES_512 = new ShortSpecies(Shape.S_512_BIT, Short512Vector.class, Short512Vector.Short512Mask.class,
1422                                                                       Short512Vector::new, Short512Vector.Short512Mask::new,
1423                                                                       Short512Vector.Short512Shuffle::new, Short512Vector.Short512Shuffle::new);
1424 
1425     /** Species representing {@link ShortVector}s of {@link Shape#S_Max_BIT Shape.S_Max_BIT}. */
1426     public static final Species<Short> SPECIES_MAX = new ShortSpecies(Shape.S_Max_BIT, ShortMaxVector.class, ShortMaxVector.ShortMaxMask.class,
1427                                                                       ShortMaxVector::new, ShortMaxVector.ShortMaxMask::new,
1428                                                                       ShortMaxVector.ShortMaxShuffle::new, ShortMaxVector.ShortMaxShuffle::new);
1429 
1430     /**
1431      * Preferred species for {@link ShortVector}s.
1432      * A preferred species is a species of maximal bit size for the platform.
1433      */
1434     public static final Species<Short> SPECIES_PREFERRED = (Species<Short>) preferredSpecies();
1435 }
< prev index next >