Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/simd/common/n2fv_4.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:37:21 EST 2012 */ | |
23 | |
24 #include "codelet-dft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_notw_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 4 -name n2fv_4 -with-ostride 2 -include n2f.h -store-multiple 2 */ | |
29 | |
30 /* | |
31 * This function contains 8 FP additions, 2 FP multiplications, | |
32 * (or, 6 additions, 0 multiplications, 2 fused multiply/add), | |
33 * 15 stack variables, 0 constants, and 10 memory accesses | |
34 */ | |
35 #include "n2f.h" | |
36 | |
37 static void n2fv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
38 { | |
39 { | |
40 INT i; | |
41 const R *xi; | |
42 R *xo; | |
43 xi = ri; | |
44 xo = ro; | |
45 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(8, is), MAKE_VOLATILE_STRIDE(8, os)) { | |
46 V T1, T2, T4, T5; | |
47 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
48 T2 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
49 T4 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
50 T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
51 { | |
52 V T3, T7, T6, T8; | |
53 T3 = VSUB(T1, T2); | |
54 T7 = VADD(T1, T2); | |
55 T6 = VSUB(T4, T5); | |
56 T8 = VADD(T4, T5); | |
57 { | |
58 V T9, Ta, Tb, Tc; | |
59 T9 = VSUB(T7, T8); | |
60 STM2(&(xo[4]), T9, ovs, &(xo[0])); | |
61 Ta = VADD(T7, T8); | |
62 STM2(&(xo[0]), Ta, ovs, &(xo[0])); | |
63 Tb = VFMAI(T6, T3); | |
64 STM2(&(xo[6]), Tb, ovs, &(xo[2])); | |
65 STN2(&(xo[4]), T9, Tb, ovs); | |
66 Tc = VFNMSI(T6, T3); | |
67 STM2(&(xo[2]), Tc, ovs, &(xo[2])); | |
68 STN2(&(xo[0]), Ta, Tc, ovs); | |
69 } | |
70 } | |
71 } | |
72 } | |
73 VLEAVE(); | |
74 } | |
75 | |
76 static const kdft_desc desc = { 4, XSIMD_STRING("n2fv_4"), {6, 0, 2, 0}, &GENUS, 0, 2, 0, 0 }; | |
77 | |
78 void XSIMD(codelet_n2fv_4) (planner *p) { | |
79 X(kdft_register) (p, n2fv_4, &desc); | |
80 } | |
81 | |
82 #else /* HAVE_FMA */ | |
83 | |
84 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 4 -name n2fv_4 -with-ostride 2 -include n2f.h -store-multiple 2 */ | |
85 | |
86 /* | |
87 * This function contains 8 FP additions, 0 FP multiplications, | |
88 * (or, 8 additions, 0 multiplications, 0 fused multiply/add), | |
89 * 11 stack variables, 0 constants, and 10 memory accesses | |
90 */ | |
91 #include "n2f.h" | |
92 | |
93 static void n2fv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
94 { | |
95 { | |
96 INT i; | |
97 const R *xi; | |
98 R *xo; | |
99 xi = ri; | |
100 xo = ro; | |
101 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(8, is), MAKE_VOLATILE_STRIDE(8, os)) { | |
102 V T3, T7, T6, T8; | |
103 { | |
104 V T1, T2, T4, T5; | |
105 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
106 T2 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
107 T3 = VSUB(T1, T2); | |
108 T7 = VADD(T1, T2); | |
109 T4 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
110 T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
111 T6 = VBYI(VSUB(T4, T5)); | |
112 T8 = VADD(T4, T5); | |
113 } | |
114 { | |
115 V T9, Ta, Tb, Tc; | |
116 T9 = VSUB(T3, T6); | |
117 STM2(&(xo[2]), T9, ovs, &(xo[2])); | |
118 Ta = VADD(T7, T8); | |
119 STM2(&(xo[0]), Ta, ovs, &(xo[0])); | |
120 STN2(&(xo[0]), Ta, T9, ovs); | |
121 Tb = VADD(T3, T6); | |
122 STM2(&(xo[6]), Tb, ovs, &(xo[2])); | |
123 Tc = VSUB(T7, T8); | |
124 STM2(&(xo[4]), Tc, ovs, &(xo[0])); | |
125 STN2(&(xo[4]), Tc, Tb, ovs); | |
126 } | |
127 } | |
128 } | |
129 VLEAVE(); | |
130 } | |
131 | |
132 static const kdft_desc desc = { 4, XSIMD_STRING("n2fv_4"), {8, 0, 0, 0}, &GENUS, 0, 2, 0, 0 }; | |
133 | |
134 void XSIMD(codelet_n2fv_4) (planner *p) { | |
135 X(kdft_register) (p, n2fv_4, &desc); | |
136 } | |
137 | |
138 #endif /* HAVE_FMA */ |