ETYPE
,
the element type of a vector
API Note
User code should not implement this interface. A future release of this type may restrict implementations to be members of the same package.
Implementation Note
The string representation of an instance of this interface will
be of the form "Species[ETYPE, VLENGTH, SHAPE]", where ETYPE
is the primitive lane type,
VLENGTH
is the vector lane count
associated with the species, and SHAPE
is the vector shape associated with the species.
Vector species objects can be stored in locals and parameters and as
static final
constants, but storing them in other Java
fields or in array elements, while semantically valid, may incur
performance penalties.
Modifier and Type | Method and Description |
---|---|
public Vector | Returns: a vector where all lane elements are set to the primitive valuee the value to broadcast e)Returns a vector of the given species
where all lane elements are set to
the primitive value |
public < the boxed element type of the required lane type F> VectorSpecies | |
public long | Returns: e the value to be checked e)Checks that this species can represent the given element value, and returns the value unchanged. |
public int | Returns: the element size, in bitsReturns the lane size, in bits, of vectors of this species. |
public static int | Returns: the bit-size ofelementType , such as 32 for int.class a vector element type (an elementType)ETYPE )Returns the bit-size of the given vector element type ( |
public Class | Returns: the primitive element type (ETYPE )Returns the primitive element type of vectors of this species. |
public boolean | |
public Vector | |
public Vector | Returns: a vector of the given species filled from the memory segmentthe memory segment ms, long the offset into the memory segment offset, ByteOrder the intended byte order bo)Loads a vector of this species from a memory segment starting at an offset into the memory segment. |
public int | Returns: a hash code value for this speciesReturns a hash code value for the species, based on the vector shape and element type. |
public VectorMask | Returns: a mask with out-of-range lanes unsetthe starting index offset, int the upper-bound (exclusive) of index range limit)Returns a mask of this species where only
the lanes at index N such that the adjusted index
|
public VectorMask | Returns: a mask with out-of-range lanes unsetthe starting index offset, long the upper-bound (exclusive) of index range limit)Returns a mask of this species where only
the lanes at index N such that the adjusted index
|
public VectorShuffle | Returns: a shuffle of sequential lane indexesthe starting value of the source index sequence, typically start, int 0 the difference between adjacent source indexes, typically step, boolean 1 whether to wrap resulting indexes modulo wrap)VLENGTH Creates a shuffle using source indexes set to sequential
values starting from |
public int | |
public VectorMask | Returns: the mask loaded from theboolean arraythe bits, int boolean arraythe offset into the array offset)Returns a mask of this species where lane elements are initialized from the given array at the given offset. |
public int | Returns: the largest multiple of the vector length not greater than the given lengththe input length length)Loop control function which returns the largest multiple of
|
public long | Returns: the largest multiple of the vector length not greater than the given lengththe input length length)Loop control function which returns the largest multiple of
|
public VectorMask | Returns: a mask where each lane is set or unset according to the given bitthe given mask bit to be replicated bit)Returns a mask of this species, where each lane is set or unset according to given single boolean, which is broadcast to all lanes. |
public Class | |
public static < the boxed element type E> VectorSpecies | Returns: a species for the given element type and shapethe element type elementType, VectorShape the shape shape)Finds a species for an element type and shape. |
public static < the boxed element type E> VectorSpecies | Returns: a preferred species for an element typethe element type etype)Finds the largest vector species of the given element type. |
public static < the boxed element type E> VectorSpecies | Returns: a preferred species for this element typethe element type etype)Finds the species preferred by the current platform for a given vector element type. |
public int | Returns: an indication of the size change, as a signed ratio or zerothe proposed output species outputSpecies, boolean whether to take lane sizes into account lanewise)Given this species and a second one, reports the net
expansion or contraction of a (potentially) resizing
reinterpretation cast
or
|
public VectorShuffle | Returns: a shuffle where each lane's source index is set to the givenint value, partially wrapped if exceptionalthe source indexes which the shuffle will draw from sourceIndexes, int the offset into the array offset)Creates a shuffle for this species from
an |
public VectorShuffle | Returns: a shuffle of mapped indexesthe lane index mapping function fn)Creates a shuffle for this species from
the successive values of an operator applied to
the range |
public VectorShuffle | Returns: a shuffle where each lane's source index is set to the givenint value, partially wrapped if exceptionalthe source indexes which the shuffle will draw from sourceIndexes)Creates a shuffle for this species from a series of source indexes. |
public String | Returns: a string of the form "Species[ETYPE, VLENGTH, SHAPE]"Returns a string of the form "Species[ETYPE, VLENGTH, SHAPE]",
where |
public int | Returns: the total vector size, in bitsReturns the total vector size, in bits, of any vector of this species. |
public int | Returns: the total vector size, in bytesReturns the total vector size, in bytes, of any vector of this species. |
public VectorShape | Returns: the shape of any vectors of this speciesReturns the shape of vectors produced by this species. |
public Class | |
public < the boxed element type F> VectorSpecies | |
public VectorSpecies | Returns: a species for the same element type and the new shapethe new shape newShape)Finds a species with the given shape and the same elementType as this species. |
public Vector | Returns: a zero vector of the given speciesReturns a vector of this species
where all lane elements are set to
the default primitive value, |
broadcast | back to summary |
---|---|
public Vector Returns a vector of the given species
where all lane elements are set to
the primitive value This method returns the value of this expression:
|
check | back to summary |
---|---|
public <F> VectorSpecies Checks that this species has the given element type,
and returns this species unchanged.
The effect is similar to this pseudocode:
|
checkValue | back to summary |
---|---|
public long checkValue(long e) Checks that this species can represent the given element value,
and returns the value unchanged.
The
|
elementSize | back to summary |
---|---|
public int elementSize() Returns the lane size, in bits, of vectors of this species.
|
elementSize | back to summary |
---|---|
public static int elementSize(Class<?> elementType) Returns the bit-size of the given vector element type (
|
elementType | back to summary |
---|---|
public Class Returns the primitive element type of vectors of this species.
|
equals | back to summary |
---|---|
public boolean equals(Object obj) Indicates whether this species is identical to some other object. Two species are identical only if they have the same shape and same element type.
|
fromArray | back to summary |
---|---|
public Vector Returns a vector of this species
where lane elements are initialized
from the given array at the given offset.
The array must be of the correct
|
fromMemorySegment | back to summary |
---|---|
public Vector Loads a vector of this species from a memory segment starting at an offset into the memory segment. Bytes are composed into primitive lane elements according to the specified byte order. The vector is arranged into lanes according to memory ordering.
Equivalent to
|
hashCode | back to summary |
---|---|
public int hashCode() Returns a hash code value for the species, based on the vector shape and element type.
|
indexInRange | back to summary |
---|---|
public VectorMask Returns a mask of this species where only
the lanes at index N such that the adjusted index
This method returns the value of the expression
|
indexInRange | back to summary |
---|---|
public VectorMask Returns a mask of this species where only
the lanes at index N such that the adjusted index
This method returns the value of the expression
|
iotaShuffle | back to summary |
---|---|
public VectorShuffle Creates a shuffle using source indexes set to sequential
values starting from
This method returns the value of the expression
If API Note The
|
length | back to summary |
---|---|
public int length() Returns the number of lanes in a vector of this species. API Note This is also the number of lanes in a mask or shuffle associated with a vector of this species.
|
loadMask | back to summary |
---|---|
public VectorMask Returns a mask of this species
where lane elements are initialized
from the given array at the given offset.
Equivalent to
|
loopBound | back to summary |
---|---|
public int loopBound(int length) Loop control function which returns the largest multiple of
Specifically, this method computes
|
loopBound | back to summary |
---|---|
public long loopBound(long length) Loop control function which returns the largest multiple of
Specifically, this method computes
|
maskAll | back to summary |
---|---|
public VectorMask Returns a mask of this species, where each lane is set or unset according to given single boolean, which is broadcast to all lanes.
|
maskType | back to summary |
---|---|
public Class Returns the vector mask type for this species.
|
of | back to summary |
---|---|
public static <E> VectorSpecies Finds a species for an element type and shape.
|
ofLargestShape | back to summary |
---|---|
public static <E> VectorSpecies Finds the largest vector species of the given element type. The returned species is a species chosen by the platform that has a shape with the largest possible bit-size for the given element type. The underlying vector shape might not support other lane types on some platforms, which may limit the applicability of reinterpretation casts. Vector algorithms which require reinterpretation casts will be more portable if they use the platform's preferred species.
|
ofPreferred | back to summary |
---|---|
public static <E> VectorSpecies Finds the species preferred by the current platform
for a given vector element type.
This is the same value as
This species is chosen by the platform so that it has the largest possible shape that supports all lane element types. This has the following implications:
Implementation Note On many platforms there is no behavioral difference
between
|
partLimit | back to summary |
---|---|
public int partLimit(VectorSpecies<?> outputSpecies, boolean lanewise) Given this species and a second one, reports the net
expansion or contraction of a (potentially) resizing
reinterpretation cast
or
|
shuffleFromArray | back to summary |
---|---|
public VectorShuffle Creates a shuffle for this species from
an For each shuffle lane, where
|
shuffleFromOp | back to summary |
---|---|
public VectorShuffle Creates a shuffle for this species from
the successive values of an operator applied to
the range For each shuffle lane, where Care should be taken to ensure This method behaves as if a shuffle is created from an array of mapped indexes as follows:
|
shuffleFromValues | back to summary |
---|---|
public VectorShuffle Creates a shuffle for this species from a series of source indexes. For each shuffle lane, where
|
toString | back to summary |
---|---|
public String toString() Returns a string of the form "Species[ETYPE, VLENGTH, SHAPE]",
where |
vectorBitSize | back to summary |
---|---|
public int vectorBitSize() Returns the total vector size, in bits, of any vector
of this species.
This is the same value as API Note This size may be distinct from the size in bits of a mask or shuffle of this species.
|
vectorByteSize | back to summary |
---|---|
public int vectorByteSize() Returns the total vector size, in bytes, of any vector
of this species.
This is the same value as API Note This size may be distinct from the size in bits of a mask or shuffle of this species.
|
vectorShape | back to summary |
---|---|
public VectorShape vectorShape() Returns the shape of vectors produced by this species.
|
vectorType | back to summary |
---|---|
public Class Returns the vector type of this species. A vector is of this species if and only if it is of the corresponding vector type. |
withLanes | back to summary |
---|---|
public <F> VectorSpecies Finds a species with the given element type and the
same shape as this species.
Returns the same value as
|
withShape | back to summary |
---|---|
public VectorSpecies Finds a species with the given shape and the same
elementType as this species.
Returns the same value as
|
zero | back to summary |
---|---|
public Vector Returns a vector of this species
where all lane elements are set to
the default primitive value,
|