1     static $type$ [[TEST]]ReduceMasked($type$[] a, int idx, boolean[] mask) {
 2         $type$ res = [[TEST_INIT]];
 3         for (int i = idx; i < (idx + SPECIES.length()); i++) {
 4             if (mask[i % SPECIES.length()])
 5                 res [[TEST_OP]]= a[i];
 6         }
 7 
 8         return res;
 9     }
10 
11     static $type$ [[TEST]]ReduceAllMasked($type$[] a, boolean[] mask) {
12         $type$ res = [[TEST_INIT]];
13         for (int i = 0; i < a.length; i += SPECIES.length()) {
14             res [[TEST_OP]]= [[TEST]]ReduceMasked(a, i, mask);
15         }
16 
17         return res;
18     }