Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/rdft/scalar/r2cb/r2cb_8.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:41:07 EST 2012 */ | |
23 | |
24 #include "codelet-rdft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_r2cb.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -sign 1 -n 8 -name r2cb_8 -include r2cb.h */ | |
29 | |
30 /* | |
31 * This function contains 20 FP additions, 12 FP multiplications, | |
32 * (or, 8 additions, 0 multiplications, 12 fused multiply/add), | |
33 * 19 stack variables, 2 constants, and 16 memory accesses | |
34 */ | |
35 #include "r2cb.h" | |
36 | |
37 static void r2cb_8(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP1_414213562, +1.414213562373095048801688724209698078569671875); | |
40 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
41 { | |
42 INT i; | |
43 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(32, rs), MAKE_VOLATILE_STRIDE(32, csr), MAKE_VOLATILE_STRIDE(32, csi)) { | |
44 E Th, Tb, Tg, Ti; | |
45 { | |
46 E T4, Ta, Td, T9, T3, Tc, T8, Te; | |
47 T4 = Cr[WS(csr, 2)]; | |
48 Ta = Ci[WS(csi, 2)]; | |
49 { | |
50 E T1, T2, T6, T7; | |
51 T1 = Cr[0]; | |
52 T2 = Cr[WS(csr, 4)]; | |
53 T6 = Cr[WS(csr, 1)]; | |
54 T7 = Cr[WS(csr, 3)]; | |
55 Td = Ci[WS(csi, 1)]; | |
56 T9 = T1 - T2; | |
57 T3 = T1 + T2; | |
58 Tc = T6 - T7; | |
59 T8 = T6 + T7; | |
60 Te = Ci[WS(csi, 3)]; | |
61 } | |
62 { | |
63 E Tj, T5, Tk, Tf; | |
64 Tj = FNMS(KP2_000000000, T4, T3); | |
65 T5 = FMA(KP2_000000000, T4, T3); | |
66 Th = FMA(KP2_000000000, Ta, T9); | |
67 Tb = FNMS(KP2_000000000, Ta, T9); | |
68 Tk = Td - Te; | |
69 Tf = Td + Te; | |
70 R0[0] = FMA(KP2_000000000, T8, T5); | |
71 R0[WS(rs, 2)] = FNMS(KP2_000000000, T8, T5); | |
72 R0[WS(rs, 3)] = FMA(KP2_000000000, Tk, Tj); | |
73 R0[WS(rs, 1)] = FNMS(KP2_000000000, Tk, Tj); | |
74 Tg = Tc - Tf; | |
75 Ti = Tc + Tf; | |
76 } | |
77 } | |
78 R1[0] = FMA(KP1_414213562, Tg, Tb); | |
79 R1[WS(rs, 2)] = FNMS(KP1_414213562, Tg, Tb); | |
80 R1[WS(rs, 3)] = FMA(KP1_414213562, Ti, Th); | |
81 R1[WS(rs, 1)] = FNMS(KP1_414213562, Ti, Th); | |
82 } | |
83 } | |
84 } | |
85 | |
86 static const kr2c_desc desc = { 8, "r2cb_8", {8, 0, 12, 0}, &GENUS }; | |
87 | |
88 void X(codelet_r2cb_8) (planner *p) { | |
89 X(kr2c_register) (p, r2cb_8, &desc); | |
90 } | |
91 | |
92 #else /* HAVE_FMA */ | |
93 | |
94 /* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 8 -name r2cb_8 -include r2cb.h */ | |
95 | |
96 /* | |
97 * This function contains 20 FP additions, 6 FP multiplications, | |
98 * (or, 20 additions, 6 multiplications, 0 fused multiply/add), | |
99 * 21 stack variables, 2 constants, and 16 memory accesses | |
100 */ | |
101 #include "r2cb.h" | |
102 | |
103 static void r2cb_8(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
104 { | |
105 DK(KP1_414213562, +1.414213562373095048801688724209698078569671875); | |
106 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
107 { | |
108 INT i; | |
109 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(32, rs), MAKE_VOLATILE_STRIDE(32, csr), MAKE_VOLATILE_STRIDE(32, csi)) { | |
110 E T5, Tg, T3, Te, T9, Ti, Td, Tj, T6, Ta; | |
111 { | |
112 E T4, Tf, T1, T2; | |
113 T4 = Cr[WS(csr, 2)]; | |
114 T5 = KP2_000000000 * T4; | |
115 Tf = Ci[WS(csi, 2)]; | |
116 Tg = KP2_000000000 * Tf; | |
117 T1 = Cr[0]; | |
118 T2 = Cr[WS(csr, 4)]; | |
119 T3 = T1 + T2; | |
120 Te = T1 - T2; | |
121 { | |
122 E T7, T8, Tb, Tc; | |
123 T7 = Cr[WS(csr, 1)]; | |
124 T8 = Cr[WS(csr, 3)]; | |
125 T9 = KP2_000000000 * (T7 + T8); | |
126 Ti = T7 - T8; | |
127 Tb = Ci[WS(csi, 1)]; | |
128 Tc = Ci[WS(csi, 3)]; | |
129 Td = KP2_000000000 * (Tb - Tc); | |
130 Tj = Tb + Tc; | |
131 } | |
132 } | |
133 T6 = T3 + T5; | |
134 R0[WS(rs, 2)] = T6 - T9; | |
135 R0[0] = T6 + T9; | |
136 Ta = T3 - T5; | |
137 R0[WS(rs, 1)] = Ta - Td; | |
138 R0[WS(rs, 3)] = Ta + Td; | |
139 { | |
140 E Th, Tk, Tl, Tm; | |
141 Th = Te - Tg; | |
142 Tk = KP1_414213562 * (Ti - Tj); | |
143 R1[WS(rs, 2)] = Th - Tk; | |
144 R1[0] = Th + Tk; | |
145 Tl = Te + Tg; | |
146 Tm = KP1_414213562 * (Ti + Tj); | |
147 R1[WS(rs, 1)] = Tl - Tm; | |
148 R1[WS(rs, 3)] = Tl + Tm; | |
149 } | |
150 } | |
151 } | |
152 } | |
153 | |
154 static const kr2c_desc desc = { 8, "r2cb_8", {20, 6, 0, 0}, &GENUS }; | |
155 | |
156 void X(codelet_r2cb_8) (planner *p) { | |
157 X(kr2c_register) (p, r2cb_8, &desc); | |
158 } | |
159 | |
160 #endif /* HAVE_FMA */ |