[vector] Additional tests for comparison ops to bring the coverage up
Viswanathan, Sandhya
sandhya.viswanathan at intel.com
Mon Jun 8 23:40:50 UTC 2020
Hi Paul,
Please find the updated webrev at:
http://cr.openjdk.java.net/~sviswanathan/vectorIntrinsics/TestCoverage/part3/webrev.01/
Best Regards,
Sandhya
-----Original Message-----
From: panama-dev <panama-dev-bounces at openjdk.java.net> On Behalf Of Viswanathan, Sandhya
Sent: Monday, June 08, 2020 3:57 PM
To: Paul Sandoz <paul.sandoz at oracle.com>
Cc: panama-dev <panama-dev at openjdk.java.net>
Subject: RE: [vector] Additional tests for comparison ops to bring the coverage up
Yes, I did intend to cast it to $type$. I will update the webrev accordingly.
From: Paul Sandoz <paul.sandoz at oracle.com>
Sent: Monday, June 08, 2020 3:42 PM
To: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>
Cc: panama-dev <panama-dev at openjdk.java.net>; Vladimir Ivanov <vladimir.x.ivanov at oracle.com>
Subject: Re: [vector] Additional tests for comparison ops to bring the coverage up
Hi,
Unit-Compare-Broadcast.template
—
41 #if[!Long]
42 @Test(dataProvider = "$type$CompareOpProvider")
43 static void [[TEST]]$vectorteststype$BroadcastLongSmokeTest(IntFunction<$type$[]> fa, IntFunction<$type$[]> fb) {
44 $type$[] a = fa.apply(SPECIES.length());
45 $type$[] b = fb.apply(SPECIES.length());
46
47 for (int i = 0; i < a.length; i += SPECIES.length()) {
48 $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
49 VectorMask<$Wideboxtype$> mv = av.compare(VectorOperators.[[TEST]], (long)b[i]);
50
51 // Check results as part of computation.
52 for (int j = 0; j < SPECIES.length(); j++) {
53 Assert.assertEquals(mv.laneIsSet(j), a[i + j] [[TEST_OP]] (double)((long)b[i]));
Why the casting to double? Did you intend to cast to $type$?
54 }
55 }
56 }
57
Paul.
On Jun 8, 2020, at 3:05 PM, Viswanathan, Sandhya <sandhya.viswanathan at intel.com<mailto:sandhya.viswanathan at intel.com>> wrote:
Please find below a webrev with additional tests for comparison ops to bring the coverage up:
http://cr.openjdk.java.net/~sviswanathan/vectorIntrinsics/TestCoverage/part3/webrev.00/
Tests added are:
Masked compare with vector
Masked/unmasked compare with scalar (Smoke tests only) Masked/unmasked compare with long (Smoke tests only)
Best Regards,
Sandhya
More information about the panama-dev
mailing list