< prev index next >

test/jdk/jdk/incubator/vector/templates/Unit-Unslice-op.template

Print this page


 1     static $type$[] [[TEST]]($type$[] a, int origin, int idx) {
 2         $type$[] res = new $type$[SPECIES.length()];
 3         for (int i = 0, j = 0; i < SPECIES.length(); i++){
 4             if(i < origin)
 5                 res[i] = ($type$)0;
 6             else {
 7                 res[i] = a[idx+j];
 8                 j++;
 9             }
10         }
11         return res;
12     }
13 
14     @Test(dataProvider = "$type$UnaryOpProvider")
15     static void [[TEST]]$vectorteststype$(IntFunction<$type$[]> fa) {
16 [[KERNEL]]
17         assertArraysEquals(r, a, origin, $vectorteststype$::[[TEST]]);
18     }

 1 
 2     static $type$[] [[TEST]]($type$[] a, int origin, int idx) {
 3         $type$[] res = new $type$[SPECIES.length()];
 4         for (int i = 0, j = 0; i < SPECIES.length(); i++){
 5             if(i < origin)
 6                 res[i] = ($type$)0;
 7             else {
 8                 res[i] = a[idx+j];
 9                 j++;
10             }
11         }
12         return res;
13     }
14 
15     @Test(dataProvider = "$type$UnaryOpProvider")
16     static void [[TEST]]$vectorteststype$(IntFunction<$type$[]> fa) {
17 [[KERNEL]]
18         assertArraysEquals(r, a, origin, $vectorteststype$::[[TEST]]);
19     }
< prev index next >