Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2873,9 +2873,9 @@ private static ReductionOperation<ByteVector, VectorMask<Byte>> reductionOperati
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (byte) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (byte) VectorMath.minUnsigned(a, b)));
toBits(v.rOp(UMAX_VALUE, m, (i, a, b) -> (byte) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (byte) VectorMath.maxUnsigned(a, b)));
toBits(v.rOp(UMIN_VALUE, m, (i, a, b) -> (byte) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_SUADD: return (v, m) ->
toBits(v.rOp((byte)0, m, (i, a, b) -> (byte) VectorMath.addSaturatingUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
Expand All @@ -2890,6 +2890,8 @@ private static ReductionOperation<ByteVector, VectorMask<Byte>> reductionOperati

private static final byte MIN_OR_INF = Byte.MIN_VALUE;
private static final byte MAX_OR_INF = Byte.MAX_VALUE;
private static final byte UMIN_VALUE = (byte)0; // Minimum unsigned value
private static final byte UMAX_VALUE = (byte)-1; // Maximum unsigned value

public @Override abstract long reduceLanesToLong(VectorOperators.Associative op);
public @Override abstract long reduceLanesToLong(VectorOperators.Associative op,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2858,9 +2858,9 @@ private static ReductionOperation<IntVector, VectorMask<Integer>> reductionOpera
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (int) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (int) VectorMath.minUnsigned(a, b)));
toBits(v.rOp(UMAX_VALUE, m, (i, a, b) -> (int) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (int) VectorMath.maxUnsigned(a, b)));
toBits(v.rOp(UMIN_VALUE, m, (i, a, b) -> (int) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_SUADD: return (v, m) ->
toBits(v.rOp((int)0, m, (i, a, b) -> (int) VectorMath.addSaturatingUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
Expand All @@ -2875,6 +2875,8 @@ private static ReductionOperation<IntVector, VectorMask<Integer>> reductionOpera

private static final int MIN_OR_INF = Integer.MIN_VALUE;
private static final int MAX_OR_INF = Integer.MAX_VALUE;
private static final int UMIN_VALUE = (int)0; // Minimum unsigned value
private static final int UMAX_VALUE = (int)-1; // Maximum unsigned value

public @Override abstract long reduceLanesToLong(VectorOperators.Associative op);
public @Override abstract long reduceLanesToLong(VectorOperators.Associative op,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2724,9 +2724,9 @@ private static ReductionOperation<LongVector, VectorMask<Long>> reductionOperati
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (long) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (long) VectorMath.minUnsigned(a, b)));
toBits(v.rOp(UMAX_VALUE, m, (i, a, b) -> (long) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (long) VectorMath.maxUnsigned(a, b)));
toBits(v.rOp(UMIN_VALUE, m, (i, a, b) -> (long) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_SUADD: return (v, m) ->
toBits(v.rOp((long)0, m, (i, a, b) -> (long) VectorMath.addSaturatingUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
Expand All @@ -2741,6 +2741,8 @@ private static ReductionOperation<LongVector, VectorMask<Long>> reductionOperati

private static final long MIN_OR_INF = Long.MIN_VALUE;
private static final long MAX_OR_INF = Long.MAX_VALUE;
private static final long UMIN_VALUE = (long)0; // Minimum unsigned value
private static final long UMAX_VALUE = (long)-1; // Maximum unsigned value

public @Override abstract long reduceLanesToLong(VectorOperators.Associative op);
public @Override abstract long reduceLanesToLong(VectorOperators.Associative op,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2874,9 +2874,9 @@ private static ReductionOperation<ShortVector, VectorMask<Short>> reductionOpera
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (short) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (short) VectorMath.minUnsigned(a, b)));
toBits(v.rOp(UMAX_VALUE, m, (i, a, b) -> (short) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (short) VectorMath.maxUnsigned(a, b)));
toBits(v.rOp(UMIN_VALUE, m, (i, a, b) -> (short) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_SUADD: return (v, m) ->
toBits(v.rOp((short)0, m, (i, a, b) -> (short) VectorMath.addSaturatingUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
Expand All @@ -2891,6 +2891,8 @@ private static ReductionOperation<ShortVector, VectorMask<Short>> reductionOpera

private static final short MIN_OR_INF = Short.MIN_VALUE;
private static final short MAX_OR_INF = Short.MAX_VALUE;
private static final short UMIN_VALUE = (short)0; // Minimum unsigned value
private static final short UMAX_VALUE = (short)-1; // Maximum unsigned value

public @Override abstract long reduceLanesToLong(VectorOperators.Associative op);
public @Override abstract long reduceLanesToLong(VectorOperators.Associative op,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3448,9 +3448,9 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> ($type$) Math.max(a, b)));
#if[!FP]
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> ($type$) VectorMath.minUnsigned(a, b)));
toBits(v.rOp(UMAX_VALUE, m, (i, a, b) -> ($type$) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> ($type$) VectorMath.maxUnsigned(a, b)));
toBits(v.rOp(UMIN_VALUE, m, (i, a, b) -> ($type$) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_SUADD: return (v, m) ->
toBits(v.rOp(($type$)0, m, (i, a, b) -> ($type$) VectorMath.addSaturatingUnsigned(a, b)));
#end[!FP]
Expand All @@ -3472,6 +3472,8 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
#else[FP]
private static final $type$ MIN_OR_INF = $Boxtype$.MIN_VALUE;
private static final $type$ MAX_OR_INF = $Boxtype$.MAX_VALUE;
private static final $type$ UMIN_VALUE = ($type$)0; // Minimum unsigned value
private static final $type$ UMAX_VALUE = ($type$)-1; // Maximum unsigned value
#end[FP]

public @Override abstract long reduceLanesToLong(VectorOperators.Associative op);
Expand Down
Loading