< prev index next >

test/jdk/jdk/incubator/vector/templates/Unit-Ternary-Broadcast-Masked-op.template

Print this page


 1     @Test(dataProvider = "$type$TernaryOpMaskProvider")
 2     static void [[TEST]]$vectorteststype$BroadcastMaskedSmokeTest(IntFunction<$type$[]> fa, IntFunction<$type$[]> fb,
 3                                           IntFunction<$type$[]> fc, IntFunction<boolean[]> fm) {
 4         $type$[] a = fa.apply(SPECIES.length());
 5         $type$[] b = fb.apply(SPECIES.length());
 6         $type$[] c = fc.apply(SPECIES.length());
 7         $type$[] r = fr.apply(SPECIES.length());
 8         boolean[] mask = fm.apply(SPECIES.length());
 9         VectorMask<$Wideboxtype$> vmask = VectorMask.fromArray(SPECIES, mask, 0);
10 
11         for (int i = 0; i < a.length; i += SPECIES.length()) {
12             $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
13             $abstractvectortype$ bv = $abstractvectortype$.fromArray(SPECIES, b, i);
14             av.lanewise(VectorOperators.[[TEST]], bv, c[i], vmask).intoArray(r, i);
15         }
16 
17         assertBroadcastArraysEquals(r, a, b, c, mask, $vectorteststype$::[[TEST]]);
18     }
19 
20     @Test(dataProvider = "$type$TernaryOpMaskProvider")

 1 
 2     @Test(dataProvider = "$type$TernaryOpMaskProvider")
 3     static void [[TEST]]$vectorteststype$BroadcastMaskedSmokeTest(IntFunction<$type$[]> fa, IntFunction<$type$[]> fb,
 4                                           IntFunction<$type$[]> fc, IntFunction<boolean[]> fm) {
 5         $type$[] a = fa.apply(SPECIES.length());
 6         $type$[] b = fb.apply(SPECIES.length());
 7         $type$[] c = fc.apply(SPECIES.length());
 8         $type$[] r = fr.apply(SPECIES.length());
 9         boolean[] mask = fm.apply(SPECIES.length());
10         VectorMask<$Wideboxtype$> vmask = VectorMask.fromArray(SPECIES, mask, 0);
11 
12         for (int i = 0; i < a.length; i += SPECIES.length()) {
13             $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
14             $abstractvectortype$ bv = $abstractvectortype$.fromArray(SPECIES, b, i);
15             av.lanewise(VectorOperators.[[TEST]], bv, c[i], vmask).intoArray(r, i);
16         }
17 
18         assertBroadcastArraysEquals(r, a, b, c, mask, $vectorteststype$::[[TEST]]);
19     }
20 
21     @Test(dataProvider = "$type$TernaryOpMaskProvider")
< prev index next >