< prev index next >

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

Print this page
rev 56969 : Javadoc corrections

*** 241,251 **** * @param outputSpecies the proposed output species * @param lanewise whether to take lane sizes into account * @return an indication of the size change, as a signed ratio or zero * * @see Vector#reinterpretShape(VectorSpecies,int) ! * @see Vector#convertShape(VectorOperations.Conversion,VectorSpecies,int) */ public abstract int partLimit(VectorSpecies<?> outputSpecies, boolean lanewise); // Factories --- 241,251 ---- * @param outputSpecies the proposed output species * @param lanewise whether to take lane sizes into account * @return an indication of the size change, as a signed ratio or zero * * @see Vector#reinterpretShape(VectorSpecies,int) ! * @see Vector#convertShape(VectorOperators.Conversion,VectorSpecies,int) */ public abstract int partLimit(VectorSpecies<?> outputSpecies, boolean lanewise); // Factories
*** 323,333 **** return VectorSpecies.of(etype, VectorShape.largestShapeFor(etype)); } /** * Finds the species preferred by the current platform ! * for a given vector element type and the preferred shape. * This is the same value as * {@code VectorSpecies.of(etype, VectorShape.preferredShape())}. * * <p> This species is chosen by the platform so that it has the * largest possible shape that supports all lane element types. --- 323,333 ---- return VectorSpecies.of(etype, VectorShape.largestShapeFor(etype)); } /** * Finds the species preferred by the current platform ! * for a given vector element type. * This is the same value as * {@code VectorSpecies.of(etype, VectorShape.preferredShape())}. * * <p> This species is chosen by the platform so that it has the * largest possible shape that supports all lane element types.
*** 335,345 **** * <ul> * <li>The various preferred species for different element types * will have the same underlying shape. * <li>All vectors created from preferred species will have a * common bit-size and information capacity. ! * <li>{@linkplain Vector#reinterpret(VectorSpecies) Reinterpretation casts}. * between vectors of preferred species will neither truncate * lanes nor fill them with default values. * <li>For any particular element type, some platform might possibly * provide a {@linkplain #ofLargestShape(Class) larger vector shape} * that (as a trade-off) does not support all possible element types. --- 335,345 ---- * <ul> * <li>The various preferred species for different element types * will have the same underlying shape. * <li>All vectors created from preferred species will have a * common bit-size and information capacity. ! * <li>{@linkplain Vector#reinterpretShape(VectorSpecies, int) Reinterpretation casts} * between vectors of preferred species will neither truncate * lanes nor fill them with default values. * <li>For any particular element type, some platform might possibly * provide a {@linkplain #ofLargestShape(Class) larger vector shape} * that (as a trade-off) does not support all possible element types.
*** 356,376 **** * @param <E> the boxed element type * @return a preferred species for this element type * @throws IllegalArgumentException if no such species exists for the * element type * or if the given type is not a valid {@code ETYPE} ! * @see Vector#reinterpretShape(VectorSpecies) * @see VectorShape#preferredShape() * @see VectorSpecies#ofLargestShape(Class) */ public static <E> VectorSpecies<E> ofPreferred(Class<E> etype) { return of(etype, VectorShape.preferredShape()); } /** ! * Returns the bit-size the given vector element type ({@code ! * ETYPE}). The element type must be a valid {@code ETYPE}, not a * wrapper type or other object type. * * The element type argument must be a mirror for a valid vector * {@code ETYPE}, such as {@code byte.class}, {@code int.class}, * or {@code double.class}. The bit-size of such a type is the --- 356,376 ---- * @param <E> the boxed element type * @return a preferred species for this element type * @throws IllegalArgumentException if no such species exists for the * element type * or if the given type is not a valid {@code ETYPE} ! * @see Vector#reinterpretShape(VectorSpecies,int) * @see VectorShape#preferredShape() * @see VectorSpecies#ofLargestShape(Class) */ public static <E> VectorSpecies<E> ofPreferred(Class<E> etype) { return of(etype, VectorShape.preferredShape()); } /** ! * Returns the bit-size the given vector element type ({@code ETYPE}). ! * The element type must be a valid {@code ETYPE}, not a * wrapper type or other object type. * * The element type argument must be a mirror for a valid vector * {@code ETYPE}, such as {@code byte.class}, {@code int.class}, * or {@code double.class}. The bit-size of such a type is the
*** 564,578 **** * against the species {@code VLENGTH}, and (if invalid) * is partially wrapped to an exceptional index in the * range {@code [-VLENGTH..-1]}. * * @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 VectorShuffle#fromValues(VectorSpecies,int...) */ public abstract VectorShuffle<E> shuffleFromValues(int... sourceIndexes); /** --- 564,576 ---- * against the species {@code VLENGTH}, and (if invalid) * is partially wrapped to an exceptional index in the * range {@code [-VLENGTH..-1]}. * * @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 VectorShuffle#fromValues(VectorSpecies,int...) */ public abstract VectorShuffle<E> shuffleFromValues(int... sourceIndexes); /**
*** 612,629 **** * held in {@code static final} fields or loop-invariant local variables. * * <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(this, a, 0); * }</pre> * ! * @param f the lane index mapping function * @return a shuffle of mapped indexes * @see VectorShuffle#fromOp(VectorSpecies,IntUnaryOperator) */ public abstract VectorShuffle<E> shuffleFromOp(IntUnaryOperator fn); --- 610,627 ---- * held in {@code static final} fields or loop-invariant local variables. * * <p> This method behaves as if a shuffle is created from an array of * mapped indexes as follows: * <pre>{@code ! * int[] a = new int[VLENGTH]; * for (int i = 0; i < a.length; i++) { ! * a[i] = fn.applyAsInt(i); * } * return VectorShuffle.fromArray(this, a, 0); * }</pre> * ! * @param fn the lane index mapping function * @return a shuffle of mapped indexes * @see VectorShuffle#fromOp(VectorSpecies,IntUnaryOperator) */ public abstract VectorShuffle<E> shuffleFromOp(IntUnaryOperator fn);
< prev index next >