Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/scalar/codelets/t1_2.c @ 10:37bf6b4a2645
Add FFTW3
author | Chris Cannam |
---|---|
date | Wed, 20 Mar 2013 15:35:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:c0fb53affa76 | 10:37bf6b4a2645 |
---|---|
1 /* | |
2 * Copyright (c) 2003, 2007-11 Matteo Frigo | |
3 * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program; if not, write to the Free Software | |
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 * | |
19 */ | |
20 | |
21 /* This file was automatically generated --- DO NOT EDIT */ | |
22 /* Generated on Sun Nov 25 07:35:47 EST 2012 */ | |
23 | |
24 #include "codelet-dft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_twiddle.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -n 2 -name t1_2 -include t.h */ | |
29 | |
30 /* | |
31 * This function contains 6 FP additions, 4 FP multiplications, | |
32 * (or, 4 additions, 2 multiplications, 2 fused multiply/add), | |
33 * 11 stack variables, 0 constants, and 8 memory accesses | |
34 */ | |
35 #include "t.h" | |
36 | |
37 static void t1_2(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
38 { | |
39 { | |
40 INT m; | |
41 for (m = mb, W = W + (mb * 2); m < me; m = m + 1, ri = ri + ms, ii = ii + ms, W = W + 2, MAKE_VOLATILE_STRIDE(4, rs)) { | |
42 E T1, Ta, T3, T6, T2, T5; | |
43 T1 = ri[0]; | |
44 Ta = ii[0]; | |
45 T3 = ri[WS(rs, 1)]; | |
46 T6 = ii[WS(rs, 1)]; | |
47 T2 = W[0]; | |
48 T5 = W[1]; | |
49 { | |
50 E T8, T4, T9, T7; | |
51 T8 = T2 * T6; | |
52 T4 = T2 * T3; | |
53 T9 = FNMS(T5, T3, T8); | |
54 T7 = FMA(T5, T6, T4); | |
55 ii[0] = T9 + Ta; | |
56 ii[WS(rs, 1)] = Ta - T9; | |
57 ri[0] = T1 + T7; | |
58 ri[WS(rs, 1)] = T1 - T7; | |
59 } | |
60 } | |
61 } | |
62 } | |
63 | |
64 static const tw_instr twinstr[] = { | |
65 {TW_FULL, 0, 2}, | |
66 {TW_NEXT, 1, 0} | |
67 }; | |
68 | |
69 static const ct_desc desc = { 2, "t1_2", twinstr, &GENUS, {4, 2, 2, 0}, 0, 0, 0 }; | |
70 | |
71 void X(codelet_t1_2) (planner *p) { | |
72 X(kdft_dit_register) (p, t1_2, &desc); | |
73 } | |
74 #else /* HAVE_FMA */ | |
75 | |
76 /* Generated by: ../../../genfft/gen_twiddle.native -compact -variables 4 -pipeline-latency 4 -n 2 -name t1_2 -include t.h */ | |
77 | |
78 /* | |
79 * This function contains 6 FP additions, 4 FP multiplications, | |
80 * (or, 4 additions, 2 multiplications, 2 fused multiply/add), | |
81 * 9 stack variables, 0 constants, and 8 memory accesses | |
82 */ | |
83 #include "t.h" | |
84 | |
85 static void t1_2(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
86 { | |
87 { | |
88 INT m; | |
89 for (m = mb, W = W + (mb * 2); m < me; m = m + 1, ri = ri + ms, ii = ii + ms, W = W + 2, MAKE_VOLATILE_STRIDE(4, rs)) { | |
90 E T1, T8, T6, T7; | |
91 T1 = ri[0]; | |
92 T8 = ii[0]; | |
93 { | |
94 E T3, T5, T2, T4; | |
95 T3 = ri[WS(rs, 1)]; | |
96 T5 = ii[WS(rs, 1)]; | |
97 T2 = W[0]; | |
98 T4 = W[1]; | |
99 T6 = FMA(T2, T3, T4 * T5); | |
100 T7 = FNMS(T4, T3, T2 * T5); | |
101 } | |
102 ri[WS(rs, 1)] = T1 - T6; | |
103 ii[WS(rs, 1)] = T8 - T7; | |
104 ri[0] = T1 + T6; | |
105 ii[0] = T7 + T8; | |
106 } | |
107 } | |
108 } | |
109 | |
110 static const tw_instr twinstr[] = { | |
111 {TW_FULL, 0, 2}, | |
112 {TW_NEXT, 1, 0} | |
113 }; | |
114 | |
115 static const ct_desc desc = { 2, "t1_2", twinstr, &GENUS, {4, 2, 2, 0}, 0, 0, 0 }; | |
116 | |
117 void X(codelet_t1_2) (planner *p) { | |
118 X(kdft_dit_register) (p, t1_2, &desc); | |
119 } | |
120 #endif /* HAVE_FMA */ |