< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorShuffle.java
Print this page
rev 56969 : Javadoc corrections
*** 152,162 ****
* element type {@code F}.
*
* The various lane source indexes are unmodified, except that any
* index that fails to validate against a changed {@code VLENGTH}
* is partially wrapped to an exceptional index, whether it was
! * originally normal or exception.
*
* @param species the species of desired shuffle
* @param <F> the boxed element type of the species
* @return a shuffle converted by shape and element type
* @throws IllegalArgumentException if this shuffle length and the
--- 152,162 ----
* element type {@code F}.
*
* The various lane source indexes are unmodified, except that any
* index that fails to validate against a changed {@code VLENGTH}
* is partially wrapped to an exceptional index, whether it was
! * originally normal or exceptional.
*
* @param species the species of desired shuffle
* @param <F> the boxed element type of the species
* @return a shuffle converted by shape and element type
* @throws IllegalArgumentException if this shuffle length and the
*** 261,275 ****
* is partially wrapped to an exceptional index in the
* range {@code [-VLENGTH..-1]}.
*
* @param species shuffle species
* @param sourceIndexes the source indexes which the shuffle will draw from
- * @param offset the offset into the array
* @return a shuffle where each lane's source index is set to the given
* {@code int} value, partially wrapped if exceptional
! * @throws IndexOutOfBoundsException if {@code offset < 0}, or
! * {@code offset > sourceIndexes.length - VLENGTH}
* @see VectorSpecies#shuffleFromValues(int...)
*/
@ForceInline
public static <E> VectorShuffle<E> fromValues(VectorSpecies<E> species,
int... sourceIndexes) {
--- 261,273 ----
* is partially wrapped to an exceptional index in the
* range {@code [-VLENGTH..-1]}.
*
* @param species shuffle species
* @param sourceIndexes the source indexes which the shuffle will draw from
* @return a shuffle where each lane's source index is set to the given
* {@code int} value, partially wrapped if exceptional
! * @throws IndexOutOfBoundsException if {@code sourceIndexes.length != VLENGTH}
* @see VectorSpecies#shuffleFromValues(int...)
*/
@ForceInline
public static <E> VectorShuffle<E> fromValues(VectorSpecies<E> species,
int... sourceIndexes) {
*** 281,291 ****
/**
* Loads a shuffle for a given species from
* an {@code int} array starting at an offset.
*
* <p> For each shuffle lane, where {@code N} is the shuffle lane
! * index, the array element at index {@code i + N} is validated
* against the species {@code VLENGTH}, and (if invalid)
* is partially wrapped to an exceptional index in the
* range {@code [-VLENGTH..-1]}.
*
* @param species shuffle species
--- 279,289 ----
/**
* Loads a shuffle for a given species from
* an {@code int} array starting at an offset.
*
* <p> For each shuffle lane, where {@code N} is the shuffle lane
! * index, the array element at index {@code offset + N} is validated
* against the species {@code VLENGTH}, and (if invalid)
* is partially wrapped to an exceptional index in the
* range {@code [-VLENGTH..-1]}.
*
* @param species shuffle species
*** 322,338 ****
* <p> This method behaves as if a shuffle is created from an array of
* mapped indexes as follows:
* <pre>{@code
* int[] a = new int[species.length()];
* for (int i = 0; i < a.length; i++) {
! * a[i] = f.applyAsInt(i);
* }
* return VectorShuffle.fromArray(a, 0);
* }</pre>
*
* @param species shuffle species
! * @param f the lane index mapping function
* @return a shuffle of mapped indexes
* @see VectorSpecies#shuffleFromOp(IntUnaryOperator)
*/
@ForceInline
public static <E> VectorShuffle<E> fromOp(VectorSpecies<E> species, IntUnaryOperator fn) {
--- 320,336 ----
* <p> This method behaves as if a shuffle is created from an array of
* mapped indexes as follows:
* <pre>{@code
* int[] a = new int[species.length()];
* for (int i = 0; i < a.length; i++) {
! * a[i] = fn.applyAsInt(i);
* }
* return VectorShuffle.fromArray(a, 0);
* }</pre>
*
* @param species shuffle species
! * @param fn the lane index mapping function
* @return a shuffle of mapped indexes
* @see VectorSpecies#shuffleFromOp(IntUnaryOperator)
*/
@ForceInline
public static <E> VectorShuffle<E> fromOp(VectorSpecies<E> species, IntUnaryOperator fn) {
< prev index next >