< prev index next > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortMaxVector.java
Print this page
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.incubator.vector;
- import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Objects;
import java.util.function.IntUnaryOperator;
+ import jdk.incubator.foreign.MemorySegment;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.vector.VectorSupport;
import static jdk.internal.vm.vector.VectorSupport.*;
super.rearrangeTemplate(ShortMaxShuffle.class,
(ShortMaxShuffle) s,
(ShortMaxVector) v); // specialize
}
+ @Override
+ @ForceInline
+ public ShortMaxVector compress(VectorMask<Short> m) {
+ return (ShortMaxVector)
+ super.compressTemplate(ShortMaxMask.class,
+ (ShortMaxMask) m); // specialize
+ }
+
+ @Override
+ @ForceInline
+ public ShortMaxVector expand(VectorMask<Short> m) {
+ return (ShortMaxVector)
+ super.expandTemplate(ShortMaxMask.class,
+ (ShortMaxMask) m); // specialize
+ }
+
@Override
@ForceInline
public ShortMaxVector selectFrom(Vector<Short> v) {
return (ShortMaxVector)
super.selectFromTemplate((ShortMaxVector) v); // specialize
@ForceInline
public ShortMaxMask not() {
return xor(maskAll(true));
}
+ @Override
+ @ForceInline
+ public ShortMaxMask compress() {
+ return (ShortMaxMask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
+ ShortMaxVector.class, ShortMaxMask.class, ETYPE, VLENGTH, null, this,
+ (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
+ }
+
+
// Binary operations
@Override
@ForceInline
public ShortMaxMask and(VectorMask<Short> mask) {
@ForceInline
@Override
final
- ShortVector fromByteArray0(byte[] a, int offset) {
- return super.fromByteArray0Template(a, offset); // specialize
+ ShortVector fromMemorySegment0(MemorySegment ms, long offset) {
+ return super.fromMemorySegment0Template(ms, offset); // specialize
}
@ForceInline
@Override
final
- ShortVector fromByteArray0(byte[] a, int offset, VectorMask<Short> m) {
- return super.fromByteArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m); // specialize
- }
-
- @ForceInline
- @Override
- final
- ShortVector fromByteBuffer0(ByteBuffer bb, int offset) {
- return super.fromByteBuffer0Template(bb, offset); // specialize
- }
-
- @ForceInline
- @Override
- final
- ShortVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
- return super.fromByteBuffer0Template(ShortMaxMask.class, bb, offset, (ShortMaxMask) m); // specialize
+ ShortVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
+ return super.fromMemorySegment0Template(ShortMaxMask.class, ms, offset, (ShortMaxMask) m); // specialize
}
@ForceInline
@Override
final
@ForceInline
@Override
final
- void intoByteArray0(byte[] a, int offset) {
- super.intoByteArray0Template(a, offset); // specialize
- }
-
- @ForceInline
- @Override
- final
- void intoByteArray0(byte[] a, int offset, VectorMask<Short> m) {
- super.intoByteArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m); // specialize
- }
-
- @ForceInline
- @Override
- final
- void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
- super.intoByteBuffer0Template(ShortMaxMask.class, bb, offset, (ShortMaxMask) m);
+ void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
+ super.intoMemorySegment0Template(ShortMaxMask.class, ms, offset, (ShortMaxMask) m);
}
@ForceInline
@Override
final
< prev index next >