< prev index next >

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

Print this page

        

*** 144,155 **** * @param start starting value of sequence * @return a shuffle of lane indexes * @see Vector#shuffleIota(int) */ @ForceInline public static <E> VectorShuffle<E> shuffleIota(VectorSpecies<E> species, int start) { ! return ((AbstractSpecies<E>) species).shuffleFromOpFactory.apply(i -> i + start); } /** * Returns a shuffle with lane elements set to sequential {@code int} values starting from {@code start} * and looping around species length. --- 144,171 ---- * @param start starting value of sequence * @return a shuffle of lane indexes * @see Vector#shuffleIota(int) */ @ForceInline + @SuppressWarnings("unchecked") public static <E> VectorShuffle<E> shuffleIota(VectorSpecies<E> species, int start) { ! Class<?> elementType = species.elementType(); ! if (elementType == byte.class) { ! return (VectorShuffle) ByteVector.shuffleIotaHelper((VectorSpecies<Byte>) species, start); ! } else if (elementType == short.class) { ! return (VectorShuffle) ShortVector.shuffleIotaHelper((VectorSpecies<Short>) species, start); ! } else if (elementType == int.class) { ! return (VectorShuffle) IntVector.shuffleIotaHelper((VectorSpecies<Integer>) species, start); ! } else if (elementType == long.class) { ! return (VectorShuffle) LongVector.shuffleIotaHelper((VectorSpecies<Long>) species, start); ! } else if (elementType == float.class) { ! return (VectorShuffle) FloatVector.shuffleIotaHelper((VectorSpecies<Float>) species, start); ! } else if (elementType == double.class) { ! return (VectorShuffle) DoubleVector.shuffleIotaHelper((VectorSpecies<Double>) species, start); ! } else { ! throw new UnsupportedOperationException("Bad lane type for shuffleIota."); ! } } /** * Returns a shuffle with lane elements set to sequential {@code int} values starting from {@code start} * and looping around species length.
< prev index next >