[vectorIntrinsics] Miscellaneous tests to increase coverage (part 8)
Viswanathan, Sandhya
sandhya.viswanathan at intel.com
Mon Aug 31 23:04:33 UTC 2020
Thanks a lot Paul for the review. Pushed with the changes suggested.
Best Regards,
Sandhya
From: Paul Sandoz <paul.sandoz at oracle.com>
Sent: Monday, August 31, 2020 11:17 AM
To: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>
Cc: panama-dev at openjdk.java.net' <panama-dev at openjdk.java.net>; Vladimir Ivanov <vladimir.x.ivanov at oracle.com>
Subject: Re: [vectorIntrinsics] Miscellaneous tests to increase coverage (part 8)
Just minor comments, no need for another review.
AbstractVectorTest.java
—
177 return fillRangeInts((int)l, 0, (int)m, (i, _min, _max) -> (i % _max));
Do you need the cast "(int)”?
187 flatMap(fa -> INT_SHUFFLE_COMPARE_GENERATORS.stream().skip(1).map(fb -> List.of(fa, fb))). collect(Collectors.toList());
Insert new line after before “collect”?
However, it might be clearer to embed the "withToStringBi” calls declared in INT_SHUFFLE_COMPARE_GENERATORS to that of INT_SHUFFLE_COMPARE_GENERATOR_PAIRS rather than pick the first and then second. AFAICT INT_SHUFFLE_COMPARE_GENERATORS us only used by INT_SHUFFLE_COMPARE_GENERATOR_PAIRS.
Unit-Miscellaneous.template
—
348 Assert.assertTrue(str.equals("Shuffle" + Arrays.toString(subarr)), "at index " + i + ", string should be = " + Arrays.toString(subarr) + ", but is = " + str);
Break up long line.
X-LoadStoreTest.java.template
—
1005 public static int[] expectedShuffle(int length, IntUnaryOperator fn) {
Move to AbstractVectorTest?
Paul.
On Aug 27, 2020, at 5:18 PM, Viswanathan, Sandhya <sandhya.viswanathan at intel.com<mailto:sandhya.viswanathan at intel.com>> wrote:
Please find below a webrev which adds about 13 new tests and brings public API coverage close to 99%.
http://cr.openjdk.java.net/~sviswanathan/vectorIntrinsics/TestCoverage/part8/webrev.00/
The tests added are:
AbstractSpecies: withLanes, withShape, loadMask, elementType, vectorType
VectorSpecies: elementSize, ofLargestShape
VectorShape: withLanes
VectorShuffle: hashCode, toString, length, equals, fromOp
Best Regards,
Sandhya
More information about the panama-dev
mailing list