1 
 2     @Benchmark
 3     public void scatterBase0(Blackhole bh) {
 4         $type$[] as = fa.apply(size);
 5         int[] is    = fs.apply(size);
 6         $type$[] rs = fr.apply(size);
 7 
 8         for (int ic = 0; ic < INVOC_COUNT; ic++) {
 9             for (int i = 0; i < as.length; i++) {
10                 int ix = 0 + is[i];
11                 rs[ix] = as[i];
12             }
13         }
14 
15         bh.consume(rs);
16     }
17 
18     void scatter(int window, Blackhole bh) {
19         $type$[] as = fa.apply(size);
20         int[] is    = fs.apply(size);
21         $type$[] rs = fr.apply(size);
22 
23         for (int ic = 0; ic < INVOC_COUNT; ic++) {
24             for (int i = 0; i < as.length; i += window) {
25                 for (int j = 0; j < window; j++) {
26                     int ix = is[i + j];
27                     rs[ix] = as[i + j];
28                 }
29             }
30         }
31 
32         bh.consume(rs);
33     }
34 
35     @Benchmark
36     public void scatter064(Blackhole bh) {
37         int window = 64 / $Wideboxtype$.SIZE;
38         scatter(window, bh);
39     }
40 
41     @Benchmark
42     public void scatter128(Blackhole bh) {
43         int window = 128 / $Wideboxtype$.SIZE;
44         scatter(window, bh);
45     }
46 
47     @Benchmark
48     public void scatter256(Blackhole bh) {
49         int window = 256 / $Wideboxtype$.SIZE;
50         scatter(window, bh);
51     }
52 
53     @Benchmark
54     public void scatter512(Blackhole bh) {
55         int window = 512 / $Wideboxtype$.SIZE;
56         scatter(window, bh);
57     }