mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
Refactoring and cleanups
This commit is contained in:
parent
72d1556877
commit
0891bc7044
@ -513,7 +513,7 @@ bool LibraryCallKit::inline_vector_call(int arity) {
|
||||
if (entry == nullptr || !entry->is_con() ||
|
||||
vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
|
||||
laneType == nullptr || !laneType->is_con() ||
|
||||
vlen == nullptr || !vlen->is_con() ||
|
||||
vlen == nullptr || !vlen->is_con() ||
|
||||
debug_name_oop == nullptr || debug_name_oop->const_oop() == nullptr) {
|
||||
log_if_needed(" ** missing constant: opr=%s vclass=%s etype=%s vlen=%s debug_name=%s",
|
||||
NodeClassNames[argument(0)->Opcode()],
|
||||
|
||||
@ -144,6 +144,20 @@ abstract class AbstractSpecies<E> extends jdk.internal.vm.vector.VectorSupport.V
|
||||
return (Class<E>) laneType.elementType;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
@SuppressWarnings("unchecked")
|
||||
//NOT FINAL: SPECIALIZED
|
||||
int laneBasicType() {
|
||||
return laneType.basicType;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
@SuppressWarnings("unchecked")
|
||||
//NOT FINAL: SPECIALIZED
|
||||
Class<E> carrierType() {
|
||||
return (Class<E>) laneType.carrierType;
|
||||
}
|
||||
|
||||
// FIXME: appeal to general method (see https://bugs.openjdk.org/browse/JDK-6176992)
|
||||
// replace usages of this method and remove
|
||||
@ForceInline
|
||||
@ -303,13 +317,6 @@ abstract class AbstractSpecies<E> extends jdk.internal.vm.vector.VectorSupport.V
|
||||
/*package-private*/
|
||||
abstract Vector<E> fromIntValues(int[] values);
|
||||
|
||||
/*package-private*/
|
||||
abstract int laneBasicType();
|
||||
|
||||
/*package-private*/
|
||||
abstract Class<?> carrierType();
|
||||
|
||||
|
||||
/**
|
||||
* Do not use a dummy except to call methods on it when you don't
|
||||
* care about the lane values. The main benefit of it is to
|
||||
|
||||
@ -84,9 +84,6 @@ abstract class AbstractVector<E> extends Vector<E> {
|
||||
/*package-private*/
|
||||
abstract AbstractSpecies<E> vspecies();
|
||||
|
||||
/*package-private*/
|
||||
abstract int laneBasicType();
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public final VectorSpecies<E> species() {
|
||||
@ -777,7 +774,7 @@ abstract class AbstractVector<E> extends Vector<E> {
|
||||
case 'C': // lane-wise cast (but not identity)
|
||||
rtype = rsp.laneBasicType();
|
||||
rlength = rsp.laneCount();
|
||||
etype = this.laneBasicType(); // (profile)
|
||||
etype = this.vspecies().laneBasicType(); // (profile)
|
||||
vlength = this.length(); // (profile)
|
||||
rvtype = rsp.dummyVector().getClass(); // (profile)
|
||||
vtype = this.getClass();
|
||||
@ -789,7 +786,7 @@ abstract class AbstractVector<E> extends Vector<E> {
|
||||
case 'X': // reinterpret cast, not lane-wise if lane sizes differ
|
||||
rtype = rsp.laneBasicType();
|
||||
rlength = rsp.laneCount();
|
||||
etype = this.laneBasicType(); // (profile)
|
||||
etype = this.vspecies().laneBasicType(); // (profile)
|
||||
vlength = this.length(); // (profile)
|
||||
rvtype = rsp.dummyVector().getClass(); // (profile)
|
||||
vtype = this.getClass();
|
||||
|
||||
@ -132,13 +132,6 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_BYTE;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
ByteVector vOp(VectorMask<Byte> m, FVOp f) {
|
||||
@ -3527,7 +3520,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
ByteSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3681,7 +3674,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteSpecies vsp = vspecies();
|
||||
ByteVector normalized = this.and((byte) 1);
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false,
|
||||
normalized,
|
||||
a, offset,
|
||||
@ -3894,7 +3887,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector fromArray0Template(byte[] a, int offset) {
|
||||
ByteSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3911,7 +3904,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
m.check(species());
|
||||
ByteSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3984,7 +3977,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector fromBooleanArray0Template(boolean[] a, int offset) {
|
||||
ByteSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -4001,7 +3994,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
m.check(species());
|
||||
ByteSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -4015,7 +4008,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
ByteSpecies vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, ByteVector::memorySegmentGet);
|
||||
@ -4031,7 +4024,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, ByteVector::memorySegmentGet);
|
||||
@ -4049,7 +4042,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
void intoArray0Template(byte[] a, int offset) {
|
||||
ByteSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -4066,7 +4059,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
m.check(species());
|
||||
ByteSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -4085,7 +4078,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteSpecies vsp = vspecies();
|
||||
ByteVector normalized = this.and((byte) 1);
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false,
|
||||
normalized, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -4098,7 +4091,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
ByteSpecies vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -4115,7 +4108,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_BYTE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -4302,18 +4295,6 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
return byte.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_BYTE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return byte.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Byte> genericElementType() {
|
||||
|
||||
@ -769,25 +769,22 @@ final class ByteVector128 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask128.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask128.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask128.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -796,8 +793,7 @@ final class ByteVector128 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask128.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -817,16 +813,16 @@ final class ByteVector128 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask128.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask128.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -801,25 +801,22 @@ final class ByteVector256 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask256.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask256.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask256.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -828,8 +825,7 @@ final class ByteVector256 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask256.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -849,16 +845,16 @@ final class ByteVector256 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask256.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask256.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -865,25 +865,22 @@ final class ByteVector512 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask512.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask512.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask512.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -892,8 +889,7 @@ final class ByteVector512 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask512.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -913,16 +909,16 @@ final class ByteVector512 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask512.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask512.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -753,25 +753,22 @@ final class ByteVector64 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask64.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask64.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask64.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -780,8 +777,7 @@ final class ByteVector64 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask64.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -801,16 +797,16 @@ final class ByteVector64 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask64.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask64.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -739,25 +739,22 @@ final class ByteVectorMax extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMaskMax.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMaskMax.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMaskMax.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -766,8 +763,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMaskMax.class, T_BYTE,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -787,16 +783,16 @@ final class ByteVectorMax extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMaskMax.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMaskMax.class, T_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -132,13 +132,6 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_DOUBLE;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
DoubleVector vOp(VectorMask<Double> m, FVOp f) {
|
||||
@ -3166,7 +3159,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
DoubleSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3274,7 +3267,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), null, T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), null, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, null,
|
||||
@ -3401,7 +3394,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleVector fromArray0Template(double[] a, int offset) {
|
||||
DoubleSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3418,7 +3411,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
m.check(species());
|
||||
DoubleSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3486,7 +3479,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleVector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
DoubleSpecies vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, DoubleVector::memorySegmentGet);
|
||||
@ -3502,7 +3495,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, DoubleVector::memorySegmentGet);
|
||||
@ -3520,7 +3513,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
void intoArray0Template(double[] a, int offset) {
|
||||
DoubleSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -3537,7 +3530,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
m.check(species());
|
||||
DoubleSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -3585,7 +3578,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), maskClass, T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, m,
|
||||
@ -3604,7 +3597,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
DoubleSpecies vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -3621,7 +3614,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_DOUBLE, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -3799,18 +3792,6 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
return double.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_DOUBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return double.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Double> genericElementType() {
|
||||
|
||||
@ -730,25 +730,22 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -757,8 +754,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -778,16 +774,16 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask128.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask128.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -734,25 +734,22 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -761,8 +758,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -782,16 +778,16 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask256.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask256.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -742,25 +742,22 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -769,8 +766,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -790,16 +786,16 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask512.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask512.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -728,25 +728,22 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -755,8 +752,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -776,16 +772,16 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask64.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask64.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -727,25 +727,22 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -754,8 +751,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -775,16 +771,16 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMaskMax.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMaskMax.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -135,13 +135,6 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_FLOAT16;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
Float16Vector vOp(VectorMask<Float16> m, FVOp f) {
|
||||
@ -3320,7 +3313,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
Float16Species vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3469,7 +3462,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
Float16Species vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3674,7 +3667,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector fromArray0Template(short[] a, int offset) {
|
||||
Float16Species vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3691,7 +3684,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
m.check(species());
|
||||
Float16Species vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3754,7 +3747,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector fromCharArray0Template(char[] a, int offset) {
|
||||
Float16Species vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3771,7 +3764,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
m.check(species());
|
||||
Float16Species vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3786,7 +3779,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
Float16Species vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, Float16Vector::memorySegmentGet);
|
||||
@ -3802,7 +3795,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Species vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, Float16Vector::memorySegmentGet);
|
||||
@ -3820,7 +3813,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
void intoArray0Template(short[] a, int offset) {
|
||||
Float16Species vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -3837,7 +3830,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
m.check(species());
|
||||
Float16Species vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -3852,7 +3845,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
Float16Species vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -3869,7 +3862,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Species vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -3887,7 +3880,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
m.check(species());
|
||||
Float16Species vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -4080,18 +4073,6 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
return Float16.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_FLOAT16;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return short.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Float16> genericElementType() {
|
||||
|
||||
@ -742,25 +742,22 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -769,8 +766,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -790,16 +786,16 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask128.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask128.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -758,25 +758,22 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -785,8 +782,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -806,16 +802,16 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask256.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask256.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -790,25 +790,22 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -817,8 +814,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -838,16 +834,16 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask512.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask512.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -734,25 +734,22 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -761,8 +758,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -782,16 +778,16 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask64.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask64.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -727,25 +727,22 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16MaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16MaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16MaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -754,8 +751,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16MaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -775,16 +771,16 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16MaskMax.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16MaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16MaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16MaskMax.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16MaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16MaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -132,13 +132,6 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_FLOAT;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
FloatVector vOp(VectorMask<Float> m, FVOp f) {
|
||||
@ -3172,7 +3165,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
FloatSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3261,7 +3254,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), null, T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), null, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, null,
|
||||
@ -3388,7 +3381,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatVector fromArray0Template(float[] a, int offset) {
|
||||
FloatSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3405,7 +3398,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
m.check(species());
|
||||
FloatSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3455,7 +3448,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatVector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
FloatSpecies vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, FloatVector::memorySegmentGet);
|
||||
@ -3471,7 +3464,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, FloatVector::memorySegmentGet);
|
||||
@ -3489,7 +3482,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
void intoArray0Template(float[] a, int offset) {
|
||||
FloatSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -3506,7 +3499,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
m.check(species());
|
||||
FloatSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -3535,7 +3528,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), maskClass, T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, m,
|
||||
@ -3554,7 +3547,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
FloatSpecies vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -3571,7 +3564,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_FLOAT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -3749,18 +3742,6 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
return float.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_FLOAT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return float.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Float> genericElementType() {
|
||||
|
||||
@ -734,25 +734,22 @@ final class FloatVector128 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -761,8 +758,7 @@ final class FloatVector128 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -782,16 +778,16 @@ final class FloatVector128 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask128.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask128.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -742,25 +742,22 @@ final class FloatVector256 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -769,8 +766,7 @@ final class FloatVector256 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -790,16 +786,16 @@ final class FloatVector256 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask256.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask256.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -758,25 +758,22 @@ final class FloatVector512 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -785,8 +782,7 @@ final class FloatVector512 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -806,16 +802,16 @@ final class FloatVector512 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask512.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask512.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -730,25 +730,22 @@ final class FloatVector64 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -757,8 +754,7 @@ final class FloatVector64 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -778,16 +774,16 @@ final class FloatVector64 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask64.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask64.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -727,25 +727,22 @@ final class FloatVectorMax extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -754,8 +751,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -775,16 +771,16 @@ final class FloatVectorMax extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMaskMax.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMaskMax.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -132,13 +132,6 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_INT;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
IntVector vOp(VectorMask<Integer> m, FVOp f) {
|
||||
@ -3330,7 +3323,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
IntSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3419,7 +3412,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), null, T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), null, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, null,
|
||||
@ -3546,7 +3539,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntVector fromArray0Template(int[] a, int offset) {
|
||||
IntSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3563,7 +3556,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
m.check(species());
|
||||
IntSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3613,7 +3606,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntVector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
IntSpecies vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, IntVector::memorySegmentGet);
|
||||
@ -3629,7 +3622,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, IntVector::memorySegmentGet);
|
||||
@ -3647,7 +3640,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
void intoArray0Template(int[] a, int offset) {
|
||||
IntSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -3664,7 +3657,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
m.check(species());
|
||||
IntSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -3693,7 +3686,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), maskClass, T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, m,
|
||||
@ -3712,7 +3705,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
IntSpecies vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -3729,7 +3722,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_INT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -3907,18 +3900,6 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
return int.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_INT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return int.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Integer> genericElementType() {
|
||||
|
||||
@ -745,25 +745,22 @@ final class IntVector128 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -772,8 +769,7 @@ final class IntVector128 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask128.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask128.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -793,16 +789,16 @@ final class IntVector128 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask128.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask128.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -753,25 +753,22 @@ final class IntVector256 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -780,8 +777,7 @@ final class IntVector256 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask256.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask256.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -801,16 +797,16 @@ final class IntVector256 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask256.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask256.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -769,25 +769,22 @@ final class IntVector512 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -796,8 +793,7 @@ final class IntVector512 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask512.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask512.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -817,16 +813,16 @@ final class IntVector512 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask512.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask512.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -741,25 +741,22 @@ final class IntVector64 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -768,8 +765,7 @@ final class IntVector64 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask64.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask64.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -789,16 +785,16 @@ final class IntVector64 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask64.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask64.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -739,25 +739,22 @@ final class IntVectorMax extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -766,8 +763,7 @@ final class IntVectorMax extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMaskMax.class, T_INT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -787,16 +783,16 @@ final class IntVectorMax extends IntVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMaskMax.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMaskMax.class, T_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -132,13 +132,6 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_LONG;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
LongVector vOp(VectorMask<Long> m, FVOp f) {
|
||||
@ -3209,7 +3202,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
LongSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3317,7 +3310,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), null, T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), null, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, null,
|
||||
@ -3444,7 +3437,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongVector fromArray0Template(long[] a, int offset) {
|
||||
LongSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3461,7 +3454,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
m.check(species());
|
||||
LongSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3529,7 +3522,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongVector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
LongSpecies vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, LongVector::memorySegmentGet);
|
||||
@ -3545,7 +3538,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, LongVector::memorySegmentGet);
|
||||
@ -3563,7 +3556,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
void intoArray0Template(long[] a, int offset) {
|
||||
LongSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -3580,7 +3573,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
m.check(species());
|
||||
LongSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -3628,7 +3621,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), maskClass, T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, m,
|
||||
@ -3647,7 +3640,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
LongSpecies vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -3664,7 +3657,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_LONG, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -3842,18 +3835,6 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
return long.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_LONG;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return long.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Long> genericElementType() {
|
||||
|
||||
@ -731,25 +731,22 @@ final class LongVector128 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -758,8 +755,7 @@ final class LongVector128 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask128.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -779,16 +775,16 @@ final class LongVector128 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask128.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask128.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -735,25 +735,22 @@ final class LongVector256 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -762,8 +759,7 @@ final class LongVector256 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask256.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -783,16 +779,16 @@ final class LongVector256 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask256.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask256.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -743,25 +743,22 @@ final class LongVector512 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -770,8 +767,7 @@ final class LongVector512 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask512.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -791,16 +787,16 @@ final class LongVector512 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask512.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask512.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -729,25 +729,22 @@ final class LongVector64 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -756,8 +753,7 @@ final class LongVector64 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask64.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -777,16 +773,16 @@ final class LongVector64 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask64.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask64.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -729,25 +729,22 @@ final class LongVectorMax extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -756,8 +753,7 @@ final class LongVectorMax extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMaskMax.class, T_LONG,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -777,16 +773,16 @@ final class LongVectorMax extends LongVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMaskMax.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMaskMax.class, T_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -132,13 +132,6 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_SHORT;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
ShortVector vOp(VectorMask<Short> m, FVOp f) {
|
||||
@ -3517,7 +3510,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
ShortSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3666,7 +3659,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
ShortSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -3871,7 +3864,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector fromArray0Template(short[] a, int offset) {
|
||||
ShortSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3888,7 +3881,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
m.check(species());
|
||||
ShortSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3951,7 +3944,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector fromCharArray0Template(char[] a, int offset) {
|
||||
ShortSpecies vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -3968,7 +3961,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
m.check(species());
|
||||
ShortSpecies vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -3983,7 +3976,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
ShortSpecies vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, ShortVector::memorySegmentGet);
|
||||
@ -3999,7 +3992,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, ShortVector::memorySegmentGet);
|
||||
@ -4017,7 +4010,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
void intoArray0Template(short[] a, int offset) {
|
||||
ShortSpecies vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -4034,7 +4027,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
m.check(species());
|
||||
ShortSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -4049,7 +4042,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
ShortSpecies vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -4066,7 +4059,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortSpecies vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -4084,7 +4077,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
m.check(species());
|
||||
ShortSpecies vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, T_SHORT, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -4277,18 +4270,6 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
return short.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return T_SHORT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return short.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<Short> genericElementType() {
|
||||
|
||||
@ -753,25 +753,22 @@ final class ShortVector128 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -780,8 +777,7 @@ final class ShortVector128 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask128.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -801,16 +797,16 @@ final class ShortVector128 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask128.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask128.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask128)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask128)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -769,25 +769,22 @@ final class ShortVector256 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -796,8 +793,7 @@ final class ShortVector256 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask256.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -817,16 +813,16 @@ final class ShortVector256 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask256.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask256.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask256)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask256)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -801,25 +801,22 @@ final class ShortVector512 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -828,8 +825,7 @@ final class ShortVector512 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask512.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -849,16 +845,16 @@ final class ShortVector512 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask512.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask512.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask512)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask512)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -745,25 +745,22 @@ final class ShortVector64 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -772,8 +769,7 @@ final class ShortVector64 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask64.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -793,16 +789,16 @@ final class ShortVector64 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask64.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask64.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask64)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask64)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -739,25 +739,22 @@ final class ShortVectorMax extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -766,8 +763,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMaskMax.class, T_SHORT,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -787,16 +783,16 @@ final class ShortVectorMax extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMaskMax.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMaskMax.class, T_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMaskMax)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMaskMax)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -211,7 +211,7 @@ public abstract class VectorMask<E> extends jdk.internal.vm.vector.VectorSupport
|
||||
bits, (long) offset + Unsafe.ARRAY_BOOLEAN_BASE_OFFSET, false,
|
||||
bits, offset, vsp,
|
||||
(c, idx, s)
|
||||
-> s.opm(n -> c[((int)idx) + n]));
|
||||
-> s.opm(n -> c[((int )idx) + n]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -141,13 +141,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
return vectorFactory(res);
|
||||
}
|
||||
|
||||
/*package-private*/
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return $laneType$;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
final
|
||||
$abstractvectortype$ vOp(VectorMask<$Boxtype$> m, FVOp f) {
|
||||
@ -4470,7 +4463,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
$Type$Species vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -4597,7 +4590,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), null, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), null, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, null,
|
||||
@ -4690,7 +4683,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
offset = checkFromIndexSize(offset, length(), a.length);
|
||||
$Type$Species vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
this,
|
||||
a, offset,
|
||||
@ -4852,7 +4845,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$Type$Species vsp = vspecies();
|
||||
ByteVector normalized = this.and((byte) 1);
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false,
|
||||
normalized,
|
||||
a, offset,
|
||||
@ -5066,7 +5059,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$abstractvectortype$ fromArray0Template($type$[] a, int offset) {
|
||||
$Type$Species vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -5083,7 +5076,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
m.check(species());
|
||||
$Type$Species vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -5222,7 +5215,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$abstractvectortype$ fromCharArray0Template(char[] a, int offset) {
|
||||
$Type$Species vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -5239,7 +5232,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
m.check(species());
|
||||
$Type$Species vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -5256,7 +5249,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$abstractvectortype$ fromBooleanArray0Template(boolean[] a, int offset) {
|
||||
$Type$Species vsp = vspecies();
|
||||
return VectorSupport.load(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false,
|
||||
a, offset, vsp,
|
||||
(arr, off, s) -> s.ldOp(arr, (int) off,
|
||||
@ -5273,7 +5266,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
m.check(species());
|
||||
$Type$Species vsp = vspecies();
|
||||
return VectorSupport.loadMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false, m, offsetInRange,
|
||||
a, offset, vsp,
|
||||
(arr, off, s, vm) -> s.ldOp(arr, (int) off, vm,
|
||||
@ -5288,7 +5281,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$abstractvectortype$ fromMemorySegment0Template(MemorySegment ms, long offset) {
|
||||
$Type$Species vsp = vspecies();
|
||||
return ScopedMemoryAccess.loadFromMemorySegment(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, vsp,
|
||||
(msp, off, s) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, $abstractvectortype$::memorySegmentGet);
|
||||
@ -5304,7 +5297,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$Type$Species vsp = vspecies();
|
||||
m.check(vsp);
|
||||
return ScopedMemoryAccess.loadFromMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
(AbstractMemorySegmentImpl) ms, offset, m, vsp, offsetInRange,
|
||||
(msp, off, s, vm) -> {
|
||||
return s.ldLongOp((MemorySegment) msp, off, vm, $abstractvectortype$::memorySegmentGet);
|
||||
@ -5322,7 +5315,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
void intoArray0Template($type$[] a, int offset) {
|
||||
$Type$Species vsp = vspecies();
|
||||
VectorSupport.store(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, a, offset,
|
||||
(arr, off, v)
|
||||
@ -5339,7 +5332,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
m.check(species());
|
||||
$Type$Species vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, arrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -5395,7 +5388,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
VectorSupport.storeWithMap(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, arrayAddress(a, 0), vix,
|
||||
this, m,
|
||||
@ -5420,7 +5413,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$Type$Species vsp = vspecies();
|
||||
ByteVector normalized = this.and((byte) 1);
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, booleanArrayAddress(a, offset), false,
|
||||
normalized, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -5434,7 +5427,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
void intoMemorySegment0(MemorySegment ms, long offset) {
|
||||
$Type$Species vsp = vspecies();
|
||||
ScopedMemoryAccess.storeIntoMemorySegment(
|
||||
vsp.vectorType(), $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), vsp.laneBasicType(), vsp.laneCount(),
|
||||
this,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v) -> {
|
||||
@ -5451,7 +5444,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
$Type$Species vsp = vspecies();
|
||||
m.check(vsp);
|
||||
ScopedMemoryAccess.storeIntoMemorySegmentMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
this, m,
|
||||
(AbstractMemorySegmentImpl) ms, offset,
|
||||
(msp, off, v, vm) -> {
|
||||
@ -5470,7 +5463,7 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
m.check(species());
|
||||
$Type$Species vsp = vspecies();
|
||||
VectorSupport.storeMasked(
|
||||
vsp.vectorType(), maskClass, $laneType$, vsp.laneCount(),
|
||||
vsp.vectorType(), maskClass, vsp.laneBasicType(), vsp.laneCount(),
|
||||
a, charArrayAddress(a, offset), false,
|
||||
this, m, a, offset,
|
||||
(arr, off, v, vm)
|
||||
@ -5703,18 +5696,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
||||
return $elemtype$.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final int laneBasicType() {
|
||||
return $laneType$;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<?> carrierType() {
|
||||
return $carriertype$.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
final Class<$Boxtype$> genericElementType() {
|
||||
|
||||
@ -1062,25 +1062,22 @@ final class $vectortype$ extends $abstractvectortype$ {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, $masktype$.class, $lanebitsType$,
|
||||
VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, $masktype$.class, $lanebitsType$, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, $masktype$.class, $lanebitsType$,
|
||||
VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, $masktype$.class, $lanebitsType$, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, $masktype$.class, $lanebitsType$,
|
||||
VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, $masktype$.class, $lanebitsType$, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1089,8 +1086,7 @@ final class $vectortype$ extends $abstractvectortype$ {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, $masktype$.class, $lanebitsType$,
|
||||
VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, $masktype$.class, $lanebitsType$, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -1110,16 +1106,16 @@ final class $vectortype$ extends $abstractvectortype$ {
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, $masktype$.class, $lanebitsType$, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper((($masktype$)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper((($masktype$)m).getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, $masktype$.class, $lanebitsType$, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper((($masktype$)m).getBits()));
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper((($masktype$)m).getBits()));
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user