Skip to content

Commit

Permalink
Review suggestions incorporated.
Browse files Browse the repository at this point in the history
  • Loading branch information
jatin-bhateja committed Sep 14, 2024
1 parent 4301c81 commit 71114d0
Show file tree
Hide file tree
Showing 22 changed files with 330 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,11 @@ static boolean opKind(Operator op, int bit) {
/** Produce saturating {@code a+b}. Integral only.
* @see VectorMath#addSaturating(int, int)
*/
public static final Associative SADD = assoc("SADD", "+", VectorSupport.VECTOR_OP_SADD, VO_NOFP+VO_ASSOC);
public static final Associative SADD = assoc("SADD", "+", VectorSupport.VECTOR_OP_SADD, VO_NOFP);
/** Produce saturating unsigned {@code a+b}. Integral only.
* @see VectorMath#addSaturatingUnsigned(int, int)
*/
public static final Associative SUADD = assoc("SUADD", "+", VectorSupport.VECTOR_OP_SUADD, VO_NOFP+VO_ASSOC);
public static final Associative SUADD = assoc("SUADD", "+", VectorSupport.VECTOR_OP_SUADD, VO_NOFP);
/** Produce saturating {@code a-b}. Integral only.
* @see VectorMath#subSaturating(int, int)
*/
Expand Down Expand Up @@ -662,22 +662,22 @@ static boolean opKind(Operator op, int bit) {
* @see java.lang.Integer#compareUnsigned
* @see java.lang.Long#compareUnsigned
*/
public static final Comparison UNSIGNED_LT = compare("UNSIGNED_LT", "<", VectorSupport.BT_ult, VO_NOFP);
public static final Comparison ULT = compare("ULT", "<", VectorSupport.BT_ult, VO_NOFP);
/** Unsigned compare {@code a<=b}. Integral only.
* @see java.lang.Integer#compareUnsigned
* @see java.lang.Long#compareUnsigned
*/
public static final Comparison UNSIGNED_LE = compare("UNSIGNED_LE", "<=", VectorSupport.BT_ule, VO_NOFP);
public static final Comparison ULE = compare("ULE", "<=", VectorSupport.BT_ule, VO_NOFP);
/** Unsigned compare {@code a>b}. Integral only.
* @see java.lang.Integer#compareUnsigned
* @see java.lang.Long#compareUnsigned
*/
public static final Comparison UNSIGNED_GT = compare("UNSIGNED_GT", ">", VectorSupport.BT_ugt, VO_NOFP);
public static final Comparison UGT = compare("UGT", ">", VectorSupport.BT_ugt, VO_NOFP);
/** Unsigned compare {@code a>=b}. Integral only.
* @see java.lang.Integer#compareUnsigned
* @see java.lang.Long#compareUnsigned
*/
public static final Comparison UNSIGNED_GE = compare("UNSIGNED_GE", ">=", VectorSupport.BT_uge, VO_NOFP);
public static final Comparison UGE = compare("UGE", ">=", VectorSupport.BT_uge, VO_NOFP);

// Conversion operators

Expand Down
32 changes: 16 additions & 16 deletions test/jdk/jdk/incubator/vector/Byte128VectorTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -4425,15 +4425,15 @@ static void GEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_LTByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void ULTByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LT, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.ULT, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4444,7 +4444,7 @@ static void UNSIGNED_LTByte128VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_LTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void ULTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4456,7 +4456,7 @@ static void UNSIGNED_LTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LT, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.ULT, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4467,15 +4467,15 @@ static void UNSIGNED_LTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_GTByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void UGTByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GT, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.UGT, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4486,7 +4486,7 @@ static void UNSIGNED_GTByte128VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_GTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void UGTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4498,7 +4498,7 @@ static void UNSIGNED_GTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GT, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.UGT, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4509,15 +4509,15 @@ static void UNSIGNED_GTByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_LEByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void ULEByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LE, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.ULE, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4528,7 +4528,7 @@ static void UNSIGNED_LEByte128VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_LEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void ULEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4540,7 +4540,7 @@ static void UNSIGNED_LEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LE, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.ULE, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4551,15 +4551,15 @@ static void UNSIGNED_LEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_GEByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void UGEByte128VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GE, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.UGE, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4570,7 +4570,7 @@ static void UNSIGNED_GEByte128VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_GEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void UGEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4582,7 +4582,7 @@ static void UNSIGNED_GEByte128VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GE, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.UGE, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand Down
32 changes: 16 additions & 16 deletions test/jdk/jdk/incubator/vector/Byte256VectorTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -4425,15 +4425,15 @@ static void GEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_LTByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void ULTByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LT, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.ULT, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4444,7 +4444,7 @@ static void UNSIGNED_LTByte256VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_LTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void ULTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4456,7 +4456,7 @@ static void UNSIGNED_LTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LT, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.ULT, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4467,15 +4467,15 @@ static void UNSIGNED_LTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_GTByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void UGTByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GT, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.UGT, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4486,7 +4486,7 @@ static void UNSIGNED_GTByte256VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_GTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void UGTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4498,7 +4498,7 @@ static void UNSIGNED_GTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GT, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.UGT, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4509,15 +4509,15 @@ static void UNSIGNED_GTByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_LEByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void ULEByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LE, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.ULE, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4528,7 +4528,7 @@ static void UNSIGNED_LEByte256VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_LEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void ULEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4540,7 +4540,7 @@ static void UNSIGNED_LEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_LE, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.ULE, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4551,15 +4551,15 @@ static void UNSIGNED_LEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
}

@Test(dataProvider = "byteCompareOpProvider")
static void UNSIGNED_GEByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
static void UGEByte256VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());

for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GE, bv);
VectorMask<Byte> mv = av.compare(VectorOperators.UGE, bv);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand All @@ -4570,7 +4570,7 @@ static void UNSIGNED_GEByte256VectorTests(IntFunction<byte[]> fa, IntFunction<by
}

@Test(dataProvider = "byteCompareOpMaskProvider")
static void UNSIGNED_GEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
static void UGEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
Expand All @@ -4582,7 +4582,7 @@ static void UNSIGNED_GEByte256VectorTestsMasked(IntFunction<byte[]> fa, IntFunct
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
VectorMask<Byte> mv = av.compare(VectorOperators.UNSIGNED_GE, bv, vmask);
VectorMask<Byte> mv = av.compare(VectorOperators.UGE, bv, vmask);

// Check results as part of computation.
for (int j = 0; j < SPECIES.length(); j++) {
Expand Down
Loading

0 comments on commit 71114d0

Please sign in to comment.