< prev index next >

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

Print this page


 1     static $type$[] [[TEST]]($type$[] a, $type$[] b, int origin, int part, int idx) {
 2         $type$[] res = new $type$[SPECIES.length()];
 3         for (int i = 0, j = 0; i < SPECIES.length(); i++){
 4             if (part == 0) {
 5                 if (i < origin)
 6                     res[i] = b[idx+i];
 7                 else {
 8                     res[i] = a[idx+j];
 9                     j++;
10                 }
11             } else if (part == 1) {
12                 if (i < origin)
13                     res[i] = a[idx+SPECIES.length()-origin+i];
14                 else {
15                     res[i] = b[idx+origin+j];
16                     j++;
17                 }
18             }
19         }
20         return res;

 1 
 2     static $type$[] [[TEST]]($type$[] a, $type$[] b, int origin, int part, int idx) {
 3         $type$[] res = new $type$[SPECIES.length()];
 4         for (int i = 0, j = 0; i < SPECIES.length(); i++){
 5             if (part == 0) {
 6                 if (i < origin)
 7                     res[i] = b[idx+i];
 8                 else {
 9                     res[i] = a[idx+j];
10                     j++;
11                 }
12             } else if (part == 1) {
13                 if (i < origin)
14                     res[i] = a[idx+SPECIES.length()-origin+i];
15                 else {
16                     res[i] = b[idx+origin+j];
17                     j++;
18                 }
19             }
20         }
21         return res;
< prev index next >