Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | invokespecial | Object.<init> ()V():void |
4 | return | |
protected static void bitreverse(double)
Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | arraylength | |
2 | iconst_2 | |
3 | idiv | |
4 | istore_1 | |
5 | iload_1 | |
6 | iconst_1 | |
7 | isub | |
8 | istore_2 | |
9 | iconst_0 | |
10 | istore_3 | |
11 | iconst_0 | |
12 | istore | %4 |
14 | goto | 116 |
17 | iload_3 | |
18 | iconst_1 | |
19 | ishl | |
20 | istore | %5 |
22 | iload | %4 |
24 | iconst_1 | |
25 | ishl | |
26 | istore | %6 |
28 | iload_1 | |
29 | iconst_1 | |
30 | ishr | |
31 | istore | %7 |
33 | iload_3 | |
34 | iload | %4 |
36 | if_icmpge | 99 |
39 | aload_0 | |
40 | iload | %6 |
42 | aload_0 | |
43 | iload | %5 |
45 | daload | |
46 | aload_0 | |
47 | iload | %5 |
49 | iconst_1 | |
50 | iadd | |
51 | daload | |
52 | dstore | %8 |
54 | aload_0 | |
55 | iload | %5 |
57 | aload_0 | |
58 | iload | %6 |
60 | daload | |
61 | dastore | |
62 | aload_0 | |
63 | iload | %5 |
65 | iconst_1 | |
66 | iadd | |
67 | aload_0 | |
68 | iload | %6 |
70 | iconst_1 | |
71 | iadd | |
72 | daload | |
73 | dastore | |
74 | dastore | |
75 | aload_0 | |
76 | iload | %6 |
78 | iconst_1 | |
79 | iadd | |
80 | dload | %8 |
82 | dastore | |
83 | goto | 99 |
86 | iload | %4 |
88 | iload | %7 |
90 | isub | |
91 | istore | %4 |
93 | iload | %7 |
95 | iconst_1 | |
96 | ishr | |
97 | istore | %7 |
99 | iload | %7 |
101 | iload | %4 |
103 | if_icmple | 86 |
106 | iload | %4 |
108 | iload | %7 |
110 | iadd | |
111 | istore | %4 |
113 | iinc | %3 1 |
116 | iload_3 | |
117 | iload_2 | |
118 | if_icmplt | 17 |
121 | return | |
public static void inverse(double)
Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | iconst_1 | |
2 | invokestatic | FFT.transform_internal ([DI)V(double, int):void |
5 | aload_0 | |
6 | arraylength | |
7 | istore_1 | |
8 | dconst_1 | |
9 | iload_1 | |
10 | iconst_2 | |
11 | idiv | |
12 | i2d | |
13 | ddiv | |
14 | dstore_2 | |
15 | iconst_0 | |
16 | istore | %4 |
18 | goto | 34 |
21 | aload_0 | |
22 | iload | %4 |
24 | aload_0 | |
25 | iload | %4 |
27 | daload | |
28 | dload_2 | |
29 | dmul | |
30 | dastore | |
31 | iinc | %4 1 |
34 | iload | %4 |
36 | iload_1 | |
37 | if_icmplt | 21 |
40 | return | |
protected static int log2(int)
Byte offset | Instruction | Argument |
---|---|---|
0 | iconst_0 | |
1 | istore_1 | |
2 | iconst_1 | |
3 | istore_2 | |
4 | goto | 14 |
7 | iload_2 | |
8 | iconst_2 | |
9 | imul | |
10 | istore_2 | |
11 | iinc | %1 1 |
14 | iload_2 | |
15 | iload_0 | |
16 | if_icmplt | 7 |
19 | iload_0 | |
20 | iconst_1 | |
21 | iload_1 | |
22 | ishl | |
23 | if_icmpeq | 51 |
26 | new | Error |
29 | dup | |
30 | new | StringBuffer |
33 | dup | |
34 | ldc_w | "FFT: Data length is not a power of 2!: " |
37 | invokespecial | StringBuffer.<init> (Ljava/lang/String;)V(String):void |
40 | iload_0 | |
41 | invokevirtual | StringBuffer.append (I)Ljava/lang/StringBuffer;(int):StringBuffer |
44 | invokevirtual | StringBuffer.toString ()Ljava/lang/String;():String |
47 | invokespecial | Error.<init> (Ljava/lang/String;)V(String):void |
50 | athrow | |
51 | iload_1 | |
52 | ireturn | |
public static void main(String[])
public static double makeRandom(int, java.util.Random)
Byte offset | Instruction | Argument |
---|---|---|
0 | iconst_2 | |
1 | iload_0 | |
2 | imul | |
3 | istore_3 | |
4 | iload_3 | |
5 | newarray | double |
7 | astore_0 | |
8 | iconst_0 | |
9 | istore_2 | |
10 | goto | 23 |
13 | aload_0 | |
14 | iload_2 | |
15 | aload_1 | |
16 | invokevirtual | java.util.Random.nextDouble ()D():double |
19 | dastore | |
20 | iinc | %2 1 |
23 | iload_2 | |
24 | iload_3 | |
25 | if_icmplt | 13 |
28 | aload_0 | |
29 | areturn | |
public static final double num_flops(int)
Byte offset | Instruction | Argument |
---|---|---|
0 | ldc2_w | 5.0 |
3 | iload_0 | |
4 | i2d | |
5 | dstore_1 | |
6 | dload_1 | |
7 | dmul | |
8 | ldc2_w | 2.0 |
11 | dsub | |
12 | iload_0 | |
13 | invokestatic | FFT.log2 (I)I(int):int |
16 | i2d | |
17 | dmul | |
18 | ldc2_w | 2.0 |
21 | dload_1 | |
22 | dconst_1 | |
23 | dadd | |
24 | dmul | |
25 | dadd | |
26 | dreturn | |
public static double test(double)
Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | arraylength | |
2 | istore_1 | |
3 | iload_1 | |
4 | newarray | double |
6 | astore_2 | |
7 | aload_0 | |
8 | iconst_0 | |
9 | aload_2 | |
10 | iconst_0 | |
11 | iload_1 | |
12 | invokestatic | System.arraycopy (Ljava/lang/Object;ILjava/lang/Object;II)V(Object, int, Object, int, int):void |
15 | aload_0 | |
16 | invokestatic | FFT.transform ([D)V(double):void |
19 | aload_0 | |
20 | invokestatic | FFT.inverse ([D)V(double):void |
23 | dconst_0 | |
24 | dstore_3 | |
25 | iconst_0 | |
26 | istore | %5 |
28 | goto | 48 |
31 | dload_3 | |
32 | aload_0 | |
33 | iload | %5 |
35 | daload | |
36 | aload_2 | |
37 | iload | %5 |
39 | daload | |
40 | dsub | |
41 | dup2 | |
42 | dmul | |
43 | dadd | |
44 | dstore_3 | |
45 | iinc | %5 1 |
48 | iload | %5 |
50 | iload_1 | |
51 | if_icmplt | 31 |
54 | dload_3 | |
55 | iload_1 | |
56 | i2d | |
57 | ddiv | |
58 | invokestatic | Math.sqrt (D)D(double):double |
61 | dreturn | |
public static void transform(double)
Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | iconst_m1 | |
2 | invokestatic | FFT.transform_internal ([DI)V(double, int):void |
5 | return | |
protected static void transform_internal(double, int)
Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | arraylength | |
2 | ifne | 6 |
5 | return | |
6 | aload_0 | |
7 | arraylength | |
8 | iconst_2 | |
9 | idiv | |
10 | istore_2 | |
11 | iload_2 | |
12 | iconst_1 | |
13 | if_icmpne | 17 |
16 | return | |
17 | iload_2 | |
18 | invokestatic | FFT.log2 (I)I(int):int |
21 | istore_3 | |
22 | aload_0 | |
23 | invokestatic | FFT.bitreverse ([D)V(double):void |
26 | iconst_0 | |
27 | istore | %4 |
29 | iconst_1 | |
30 | istore | %5 |
32 | goto | 394 |
35 | dconst_1 | |
36 | dstore | %6 |
38 | dconst_0 | |
39 | dstore | %8 |
41 | ldc2_w | 2.0 |
44 | ldc2_w | 2.0 |
47 | iload_1 | |
48 | i2d | |
49 | dmul | |
50 | ldc2_w | 3.141592653589793 |
53 | dmul | |
54 | ldc2_w | 2.0 |
57 | iload | %5 |
59 | i2d | |
60 | dmul | |
61 | ddiv | |
62 | dup2 | |
63 | invokestatic | Math.sin (D)D(double):double |
66 | dstore | %10 |
68 | ldc2_w | 2.0 |
71 | ddiv | |
72 | invokestatic | Math.sin (D)D(double):double |
75 | dstore | %12 |
77 | dload | %12 |
79 | dmul | |
80 | dload | %12 |
82 | dmul | |
83 | dstore | %19 |
85 | iconst_0 | |
86 | istore | %14 |
88 | goto | 187 |
91 | iconst_2 | |
92 | iload | %14 |
94 | imul | |
95 | istore | %15 |
97 | iconst_2 | |
98 | iload | %14 |
100 | iload | %5 |
102 | iadd | |
103 | imul | |
104 | istore | %16 |
106 | aload_0 | |
107 | aload_0 | |
108 | iload | %16 |
110 | iconst_1 | |
111 | iadd | |
112 | daload | |
113 | dstore | %12 |
115 | aload_0 | |
116 | iload | %16 |
118 | aload_0 | |
119 | iload | %15 |
121 | daload | |
122 | aload_0 | |
123 | iload | %16 |
125 | daload | |
126 | dstore | %17 |
128 | dload | %17 |
130 | dsub | |
131 | dastore | |
132 | iload | %16 |
134 | iconst_1 | |
135 | iadd | |
136 | aload_0 | |
137 | iload | %15 |
139 | iconst_1 | |
140 | iadd | |
141 | daload | |
142 | dload | %12 |
144 | dsub | |
145 | dastore | |
146 | aload_0 | |
147 | iload | %15 |
149 | dload | %17 |
151 | aload_0 | |
152 | iload | %15 |
154 | daload | |
155 | dadd | |
156 | dastore | |
157 | aload_0 | |
158 | aload_0 | |
159 | iload | %15 |
161 | iconst_1 | |
162 | iadd | |
163 | istore | %16 |
165 | iload | %16 |
167 | daload | |
168 | dload | %12 |
170 | dadd | |
171 | dstore | %17 |
173 | iload | %16 |
175 | dload | %17 |
177 | dastore | |
178 | iload | %14 |
180 | iconst_2 | |
181 | iload | %5 |
183 | imul | |
184 | iadd | |
185 | istore | %14 |
187 | iload | %14 |
189 | iload_2 | |
190 | if_icmplt | 91 |
193 | iconst_1 | |
194 | istore | %16 |
196 | goto | 378 |
199 | dload | %6 |
201 | dload | %10 |
203 | dload | %8 |
205 | dmul | |
206 | dsub | |
207 | dload | %19 |
209 | dload | %6 |
211 | dmul | |
212 | dload | %8 |
214 | dload | %10 |
216 | dload | %6 |
218 | dmul | |
219 | dadd | |
220 | dload | %19 |
222 | dload | %8 |
224 | dmul | |
225 | dsub | |
226 | dstore | %17 |
228 | dsub | |
229 | dstore | %6 |
231 | dload | %17 |
233 | dstore | %8 |
235 | iconst_0 | |
236 | istore | %15 |
238 | goto | 369 |
241 | iconst_2 | |
242 | iload | %15 |
244 | iload | %16 |
246 | iadd | |
247 | imul | |
248 | istore | %14 |
250 | iconst_2 | |
251 | iload | %15 |
253 | iload | %16 |
255 | iadd | |
256 | iload | %5 |
258 | iadd | |
259 | imul | |
260 | istore | %21 |
262 | aload_0 | |
263 | dload | %8 |
265 | dload | %6 |
267 | aload_0 | |
268 | iload | %21 |
270 | daload | |
271 | dstore | %17 |
273 | dload | %17 |
275 | dmul | |
276 | dload | %8 |
278 | aload_0 | |
279 | iload | %21 |
281 | iconst_1 | |
282 | iadd | |
283 | daload | |
284 | dstore | %12 |
286 | dload | %12 |
288 | dmul | |
289 | dsub | |
290 | dstore | %22 |
292 | dload | %17 |
294 | dmul | |
295 | dload | %6 |
297 | dload | %12 |
299 | dmul | |
300 | dadd | |
301 | dstore | %17 |
303 | aload_0 | |
304 | iload | %21 |
306 | aload_0 | |
307 | iload | %14 |
309 | daload | |
310 | dload | %22 |
312 | dsub | |
313 | dastore | |
314 | iload | %21 |
316 | iconst_1 | |
317 | iadd | |
318 | aload_0 | |
319 | iload | %14 |
321 | iconst_1 | |
322 | iadd | |
323 | daload | |
324 | dload | %17 |
326 | dsub | |
327 | dastore | |
328 | aload_0 | |
329 | iload | %14 |
331 | aload_0 | |
332 | iload | %14 |
334 | daload | |
335 | dload | %22 |
337 | dadd | |
338 | dastore | |
339 | aload_0 | |
340 | aload_0 | |
341 | iload | %14 |
343 | iconst_1 | |
344 | iadd | |
345 | istore | %21 |
347 | iload | %21 |
349 | daload | |
350 | dload | %17 |
352 | dadd | |
353 | dstore | %22 |
355 | iload | %21 |
357 | dload | %22 |
359 | dastore | |
360 | iload | %15 |
362 | iconst_2 | |
363 | iload | %5 |
365 | imul | |
366 | iadd | |
367 | istore | %15 |
369 | iload | %15 |
371 | iload_2 | |
372 | if_icmplt | 241 |
375 | iinc | %16 1 |
378 | iload | %16 |
380 | iload | %5 |
382 | if_icmplt | 199 |
385 | iinc | %4 1 |
388 | iload | %5 |
390 | iconst_2 | |
391 | imul | |
392 | istore | %5 |
394 | iload | %4 |
396 | iload_3 | |
397 | if_icmplt | 35 |
400 | return | |