[vector] Miscellaneous tests to complete coverage of X-VectorBits.java plus fix

Paul Sandoz paul.sandoz at oracle.com
Mon Jun 15 21:54:14 UTC 2020


Looks good.

I stumbled on the two overloaded ADDLong methods:

   3     static long ADDLong($type$[] a, int idx) {
   4         $type$ res = 0;
   5         for (int i = idx; i < (idx + SPECIES.length()); i++) {
   6             res += a[i];
   7         }
   8 
   9         return (long)res;
  10     }
  11 
  12     static long ADDLong($type$[] a) {
  13         long res = 0;
  14         for (int i = 0; i < a.length; i += SPECIES.length()) {
  15             $type$ tmp = 0;
  16             for (int j = 0; j < SPECIES.length(); j++) {
  17                 tmp += a[i + j];
  18             }
  19             res += (long)tmp;
  20         }
  21 
  22         return res;
  23     }


What if you rename the first ADDLongVector, then reuse it in the latter?

Paul.

> On Jun 12, 2020, at 6:39 PM, Viswanathan, Sandhya <sandhya.viswanathan at intel.com> wrote:
> 
> Please find below a webrev which adds miscellaneous tests and attempts to increase the coverage of X-VectorBits.java to 100%:
>  
> http://cr.openjdk.java.net/~sviswanathan/vectorIntrinsics/TestCoverage/part5/webrev.00/ <http://cr.openjdk.java.net/~sviswanathan/vectorIntrinsics/TestCoverage/part5/webrev.00/>
>  
> The webrev also fixes an issue found in masked rearrange.
>  
> The smoke tests added are:
> Masked rearrange
> selectFrom masked/unmasked
> reduceLanesToLong masked/unmasked
> elementSize
> shape
>  
> Best Regards,
> Sandhya



More information about the panama-dev mailing list