[vector-api] Test patterns for conversion APIs.

Paul Sandoz paul.sandoz at oracle.com
Fri Nov 8 18:22:07 UTC 2019


Hi Jatin,

This is a good start, nice work.

In VectorOperations you have added a list of identity conversion operators.  Do you think these are really required to be part of the public API? Equivalent ops can be obtained from say VectorOperators.Conversion.ofCast(byte.class, byte.class) etc for testing purposes.

Would it be possible split out the conversion unit tests into separate files, since a significant number of tests have been added?
(Likewise, I think any future bound check failure tests for load/store should probably be in separate files). 

For the unit test name I recommend sticking to the Java method name e.g. convertB2S which fits more closely with the existing naming convention.
(I suspect we can clean up the suffix <Bits>VectorTests, of method names for other tests, since its part of the class name). 

The generated JMH tests look like work in progress? I don’t think they will compile e.g. there are a lot of generated methods with the same name and signature.  Also consider separating out into a separate file.

For the JMH test name swap the method name and conversion op s/B2Bconvert/convertB2B, then it's in sync with the unit test method name, but it becomes a little easier to select tests with a regex.


I took a brief look at more of the test code itself, generally well structured, I’ll take a closer look on another round of this webrev.

Thanks,
Paul.

 

> On Nov 8, 2019, at 5:01 AM, Bhateja, Jatin <jatin.bhateja at intel.com> wrote:
> 
> Hi All
> 
> Please find below a link to patch adding test patterns for 4 conversion APIs.
> 
> - convert
> - convertShape
> - castShape
> - reinterpretShape
> 
> http://cr.openjdk.java.net/~jbhateja/vectorIntrinsics/TESTS/conversion-reinterpret-api/webrev.01/
> 
> Kindly review and share your feedback.
> 
> Regards
> Jatin



More information about the panama-dev mailing list