[vector] Additional tests for comparison ops to bring the coverage up
Paul Sandoz
paul.sandoz at oracle.com
Mon Jun 8 22:41:39 UTC 2020
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> 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/ <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