< prev index next >

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

Print this page


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

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