APIdia Launch Partner
Top Inners Constructors Methods
jdk.incubator.vector

pack-priv abstract sealed Class AbstractMask<E>

extends VectorMask<E>
permits ByteMask64, ByteMask128, ByteMask256, ByteMask512, ByteMaskMax, DoubleMask64, DoubleMask128, DoubleMask256, DoubleMask512, DoubleMaskMax, FloatMask64, FloatMask128, FloatMask256, FloatMask512, FloatMaskMax, IntMask64, IntMask128, IntMask256, IntMask512, IntMaskMax, LongMask64, LongMask128, LongMask256, LongMask512, LongMaskMax, ShortMask64, ShortMask128, ShortMask256, ShortMask512, ShortMaskMax
Class Inheritance
Known Direct Subclasses
jdk.incubator.vector.ByteVector128.ByteMask128, jdk.incubator.vector.ByteVector256.ByteMask256, jdk.incubator.vector.ByteVector512.ByteMask512, jdk.incubator.vector.ByteVector64.ByteMask64, jdk.incubator.vector.ByteVectorMax.ByteMaskMax, jdk.incubator.vector.DoubleVector128.DoubleMask128, jdk.incubator.vector.DoubleVector256.DoubleMask256, jdk.incubator.vector.DoubleVector512.DoubleMask512, jdk.incubator.vector.DoubleVector64.DoubleMask64, jdk.incubator.vector.FloatVector128.FloatMask128, jdk.incubator.vector.FloatVector256.FloatMask256, jdk.incubator.vector.FloatVector512.FloatMask512, jdk.incubator.vector.FloatVector64.FloatMask64, jdk.incubator.vector.FloatVectorMax.FloatMaskMax, jdk.incubator.vector.IntVector128.IntMask128, jdk.incubator.vector.IntVector256.IntMask256, jdk.incubator.vector.IntVector512.IntMask512, jdk.incubator.vector.IntVector64.IntMask64, jdk.incubator.vector.IntVectorMax.IntMaskMax, jdk.incubator.vector.LongVector256.LongMask256, jdk.incubator.vector.LongVector512.LongMask512, jdk.incubator.vector.LongVector64.LongMask64, jdk.incubator.vector.LongVectorMax.LongMaskMax, jdk.incubator.vector.ShortVector128.ShortMask128, jdk.incubator.vector.ShortVector256.ShortMask256, jdk.incubator.vector.ShortVector512.ShortMask512, jdk.incubator.vector.ShortVector64.ShortMask64, jdk.incubator.vector.ShortVectorMax.ShortMaskMax, jdk.incubator.vector.DoubleVectorMax.DoubleMaskMax, jdk.incubator.vector.LongVector128.LongMask128
Imports
jdk.internal.misc.Unsafe, jdk.internal.vm.annotation.ForceInline, jdk.internal.vm.vector.VectorSupport

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
pack-priv static interface

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractMask(boolean[] bits)

Method Summary

Modifier and TypeMethod and Description
pack-priv static boolean
allTrueHelper(boolean[] bits)

public final VectorMask<E>
andNot(VectorMask<E> m)

Implements abstract jdk.incubator.vector.VectorMask.andNot.

Logically subtracts a second input mask from this mask (as a&~b).

pack-priv static boolean
anyTrueHelper(boolean[] bits)

pack-priv abstract AbstractMask<E>
public <F> VectorMask<F>
check(Class<F> elementType)

Implements abstract jdk.incubator.vector.VectorMask.check.

Checks that this mask applies to vectors with the given element type, and returns this mask unchanged.

public <F> VectorMask<F>
check(VectorSpecies<F> species)

Implements abstract jdk.incubator.vector.VectorMask.check.

Checks that this mask has the given species, and returns this mask unchanged.

pack-priv <F> VectorMask<F>
check(Class<? extends VectorMask<F>> maskClass, Vector<F> vector)

Implements abstract jdk.incubator.vector.VectorMask.check.

Checks that this mask has the same class with the given mask class, and it has the same species with given vector's species, and returns this mask unchanged.

private VectorMask<E>
checkIndex0(int offset, int length, Vector<E> iota, int vlength)

private VectorMask<E>
checkIndex0(long offset, long length, Vector<E> iota, int vlength)

pack-priv void
checkIndexByLane(int offset, int length, Vector<E> iota, int esize)

Test if a masked memory access at a given offset into an array of the given length will stay within the array.

pack-priv void
checkIndexByLane(long offset, long length, Vector<E> iota, int esize)

Test if a masked memory access at a given offset into an array of the given length will stay within the array.

private IndexOutOfBoundsException
checkIndexFailed(long offset, int lane, long length, int esize)

public final VectorMask<E>
eq(VectorMask<E> m)

Implements abstract jdk.incubator.vector.VectorMask.eq.

Determines logical equivalence of this mask to a second input mask (as boolean a==b or a^~b).

pack-priv static int
firstTrueHelper(boolean[] bits)

pack-priv abstract boolean[]
public VectorMask<E>
indexInRange(int offset, int limit)

Implements abstract jdk.incubator.vector.VectorMask.indexInRange.

Removes lanes numbered N from this mask where the adjusted index N+offset, is not in the range [0..limit-1].

public VectorMask<E>
indexInRange(long offset, long limit)

Implements abstract jdk.incubator.vector.VectorMask.indexInRange.

Removes lanes numbered N from this mask where the adjusted index N+offset, is not in the range [0..limit-1].

pack-priv VectorMask<E>
indexPartiallyInRange(int offset, int limit)

pack-priv VectorMask<E>
indexPartiallyInRange(long offset, long limit)

pack-priv abstract VectorMask<E>
indexPartiallyInUpperRange(long offset, long limit)

public void
intoArray(boolean[] bits, int i)

Implements abstract jdk.incubator.vector.VectorMask.intoArray.

Stores this mask into a boolean array starting at offset.

pack-priv static int
lastTrueHelper(boolean[] bits)

private <F> boolean
sameSpecies(Class<? extends VectorMask<F>> maskClass, Vector<F> vector)

public boolean[]
toArray()

Implements abstract jdk.incubator.vector.VectorMask.toArray.

Returns an boolean array containing the lane elements of this mask.

pack-priv static long
toLongHelper(boolean[] bits)

pack-priv AbstractVector<E>
pack-priv static int
trueCountHelper(boolean[] bits)

pack-priv abstract AbstractMask<E>
public final VectorSpecies<E>
vectorSpecies()

Implements abstract jdk.incubator.vector.VectorMask.vectorSpecies.

Returns the vector species to which this mask applies.

pack-priv abstract AbstractSpecies<E>
Inherited from jdk.incubator.vector.VectorMask:
allTrueandanyTruecastcompressequalsfirstTruefromArrayfromLongfromValueshashCodelaneIsSetlastTruelengthnotortoLongtoStringtoVectortrueCountxor

Constructor Detail

AbstractMaskback to summary
pack-priv AbstractMask(boolean[] bits)

Method Detail

allTrueHelperback to summary
pack-priv static boolean allTrueHelper(boolean[] bits)
andNotback to summary
public final VectorMask<E> andNot(VectorMask<E> m)

Implements abstract jdk.incubator.vector.VectorMask.andNot.

Doc from jdk.incubator.vector.VectorMask.andNot.

Logically subtracts a second input mask from this mask (as a&~b).

This is a lane-wise binary operation which applies the logical ANDC operation (&~) to each corresponding pair of mask bits.

Annotations
@Override
@ForceInline
anyTrueHelperback to summary
pack-priv static boolean anyTrueHelper(boolean[] bits)
bOpback to summary
pack-priv abstract AbstractMask<E> bOp(VectorMask<E> o, AbstractMask.MBinOp f)
checkback to summary
public <F> VectorMask<F> check(Class<F> elementType)

Implements abstract jdk.incubator.vector.VectorMask.check.

Doc from jdk.incubator.vector.VectorMask.check.

Checks that this mask applies to vectors with the given element type, and returns this mask unchanged. The effect is similar to this pseudocode: elementType == vectorSpecies().elementType() ? this : throw new ClassCastException().

Annotations
@Override
@ForceInline
@SuppressWarnings:unchecked
checkback to summary
public <F> VectorMask<F> check(VectorSpecies<F> species)

Implements abstract jdk.incubator.vector.VectorMask.check.

Doc from jdk.incubator.vector.VectorMask.check.

Checks that this mask has the given species, and returns this mask unchanged. The effect is similar to this pseudocode: species == vectorSpecies() ? this : throw new ClassCastException().

Annotations
@Override
@ForceInline
@SuppressWarnings:unchecked
checkback to summary
pack-priv <F> VectorMask<F> check(Class<? extends VectorMask<F>> maskClass, Vector<F> vector)

Implements abstract jdk.incubator.vector.VectorMask.check.

Doc from jdk.incubator.vector.VectorMask.check.

Checks that this mask has the same class with the given mask class, and it has the same species with given vector's species, and returns this mask unchanged. The effect is similar to this pseudocode: getClass() == maskClass && vectorSpecies() == vector.species() ? this : throw new ClassCastException().

Annotations
@Override
@ForceInline
@SuppressWarnings:unchecked
checkIndex0back to summary
private VectorMask<E> checkIndex0(int offset, int length, Vector<E> iota, int vlength)
Annotations
@ForceInline
checkIndex0back to summary
private VectorMask<E> checkIndex0(long offset, long length, Vector<E> iota, int vlength)
Annotations
@ForceInline
checkIndexByLaneback to summary
pack-priv void checkIndexByLane(int offset, int length, Vector<E> iota, int esize)

Test if a masked memory access at a given offset into an array of the given length will stay within the array. The per-lane offsets are iota*esize.

Annotations
@ForceInline
checkIndexByLaneback to summary
pack-priv void checkIndexByLane(long offset, long length, Vector<E> iota, int esize)

Test if a masked memory access at a given offset into an array of the given length will stay within the array. The per-lane offsets are iota*esize.

Annotations
@ForceInline
checkIndexFailedback to summary
private IndexOutOfBoundsException checkIndexFailed(long offset, int lane, long length, int esize)
eqback to summary
public final VectorMask<E> eq(VectorMask<E> m)

Implements abstract jdk.incubator.vector.VectorMask.eq.

Doc from jdk.incubator.vector.VectorMask.eq.

Determines logical equivalence of this mask to a second input mask (as boolean a==b or a^~b).

This is a lane-wise binary operation tests each corresponding pair of mask bits for equality. It is also equivalent to the logical XNOR operation (^~) to each corresponding pair of mask bits.

Annotations
@Override
@ForceInline
firstTrueHelperback to summary
pack-priv static int firstTrueHelper(boolean[] bits)
getBitsback to summary
pack-priv abstract boolean[] getBits()
indexInRangeback to summary
public VectorMask<E> indexInRange(int offset, int limit)

Implements abstract jdk.incubator.vector.VectorMask.indexInRange.

Doc from jdk.incubator.vector.VectorMask.indexInRange.

Removes lanes numbered N from this mask where the adjusted index N+offset, is not in the range [0..limit-1].

In all cases the series of set and unset lanes is assigned as if by using infinite precision or VLENGTH-saturating additions or subtractions, without overflow or wrap-around.

Annotations
@Override
@ForceInline
indexInRangeback to summary
public VectorMask<E> indexInRange(long offset, long limit)

Implements abstract jdk.incubator.vector.VectorMask.indexInRange.

Doc from jdk.incubator.vector.VectorMask.indexInRange.

Removes lanes numbered N from this mask where the adjusted index N+offset, is not in the range [0..limit-1].

In all cases the series of set and unset lanes is assigned as if by using infinite precision or VLENGTH-saturating additions or subtractions, without overflow or wrap-around.

Annotations
@ForceInline
indexPartiallyInRangeback to summary
pack-priv VectorMask<E> indexPartiallyInRange(int offset, int limit)
Annotations
@ForceInline
indexPartiallyInRangeback to summary
pack-priv VectorMask<E> indexPartiallyInRange(long offset, long limit)
Annotations
@ForceInline
indexPartiallyInUpperRangeback to summary
pack-priv abstract VectorMask<E> indexPartiallyInUpperRange(long offset, long limit)
intoArrayback to summary
public void intoArray(boolean[] bits, int i)

Implements abstract jdk.incubator.vector.VectorMask.intoArray.

Doc from jdk.incubator.vector.VectorMask.intoArray.

Stores this mask into a boolean array starting at offset.

For each mask lane, where N is the mask lane index, the lane element at index N is stored into the array element a[offset+N].

Annotations
@Override
lastTrueHelperback to summary
pack-priv static int lastTrueHelper(boolean[] bits)
sameSpeciesback to summary
private <F> boolean sameSpecies(Class<? extends VectorMask<F>> maskClass, Vector<F> vector)
Annotations
@ForceInline
toArrayback to summary
public boolean[] toArray()

Implements abstract jdk.incubator.vector.VectorMask.toArray.

Doc from jdk.incubator.vector.VectorMask.toArray.

Returns an boolean array containing the lane elements of this mask.

This method behaves as if it stores this mask into an allocated array (using intoArray(boolean[], int)) and returns that array as follows:

boolean[] a = new boolean[this.length()];
this.intoArray(a, 0);
return a;
Annotations
@Override
toLongHelperback to summary
pack-priv static long toLongHelper(boolean[] bits)
toVectorTemplateback to summary
pack-priv AbstractVector<E> toVectorTemplate()
Annotations
@ForceInline
trueCountHelperback to summary
pack-priv static int trueCountHelper(boolean[] bits)
uOpback to summary
pack-priv abstract AbstractMask<E> uOp(AbstractMask.MUnOp f)
vectorSpeciesback to summary
public final VectorSpecies<E> vectorSpecies()

Implements abstract jdk.incubator.vector.VectorMask.vectorSpecies.

Doc from jdk.incubator.vector.VectorMask.vectorSpecies.

Returns the vector species to which this mask applies. This mask applies to vectors of the same species, and the same number of lanes.

Annotations
@Override
@ForceInline
vspeciesback to summary
pack-priv abstract AbstractSpecies<E> vspecies()
jdk.incubator.vector back to summary

pack-priv Interface AbstractMask.MBinOp


Method Summary

Modifier and TypeMethod and Description
public boolean
apply(int i, boolean a, boolean b)

Method Detail

applyback to summary
public boolean apply(int i, boolean a, boolean b)
jdk.incubator.vector back to summary

pack-priv Interface AbstractMask.MUnOp


Method Summary

Modifier and TypeMethod and Description
public boolean
apply(int i, boolean a)

Method Detail

applyback to summary
public boolean apply(int i, boolean a)