< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMask.java
Print this page
rev 55891 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
rev 55894 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
@@ -119,20 +119,21 @@
*/
public int length() { return species().length(); }
/**
* Returns a mask where each lane is set or unset according to given
- * {@code boolean} values
+ * {@code boolean} values.
* <p>
* For each mask lane, where {@code N} is the mask lane index,
* if the given {@code boolean} value at index {@code N} is {@code true}
* then the mask lane at index {@code N} is set, otherwise it is unset.
*
* @param species mask species
* @param bits the given {@code boolean} values
* @return a mask where each lane is set or unset according to the given {@code boolean} value
* @throws IndexOutOfBoundsException if {@code bits.length < species.length()}
+ * @see Vector#maskFromValues(boolean...)
*/
@ForceInline
public static <E> VectorMask<E> fromValues(VectorSpecies<E> species, boolean... bits) {
return fromArray(species, bits, 0);
}
@@ -148,10 +149,11 @@
* @param bits the {@code boolean} array
* @param offset the offset into the array
* @return the mask loaded from a {@code boolean} array
* @throws IndexOutOfBoundsException if {@code offset < 0}, or
* {@code offset > bits.length - species.length()}
+ * @see Vector#maskFromArray(boolean[], int)
*/
@ForceInline
@SuppressWarnings("unchecked")
public static <E> VectorMask<E> fromArray(VectorSpecies<E> species, boolean[] bits, int offset) {
Objects.requireNonNull(bits);
@@ -165,10 +167,11 @@
/**
* Returns a mask where all lanes are set.
*
* @param species mask species
* @return a mask where all lanes are set
+ * @see Vector#maskAllTrue()
*/
@ForceInline
@SuppressWarnings("unchecked")
public static <E> VectorMask<E> maskAllTrue(VectorSpecies<E> species) {
return VectorIntrinsics.broadcastCoerced((Class<VectorMask<E>>) species.maskType(), species.elementType(), species.length(),
@@ -179,10 +182,11 @@
/**
* Returns a mask where all lanes are unset.
*
* @param species mask species
* @return a mask where all lanes are unset
+ * @see Vector#maskAllFalse()
*/
@ForceInline
@SuppressWarnings("unchecked")
public static <E> VectorMask<E> maskAllFalse(VectorSpecies<E> species) {
return VectorIntrinsics.broadcastCoerced((Class<VectorMask<E>>) species.maskType(), species.elementType(), species.length(),
< prev index next >