Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/simd/common/t2fv_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:38:35 EST 2012 */ | |
23 | |
24 #include "codelet-dft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_twiddle_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name t2fv_2 -include t2f.h */ | |
29 | |
30 /* | |
31 * This function contains 3 FP additions, 2 FP multiplications, | |
32 * (or, 3 additions, 2 multiplications, 0 fused multiply/add), | |
33 * 5 stack variables, 0 constants, and 4 memory accesses | |
34 */ | |
35 #include "t2f.h" | |
36 | |
37 static void t2fv_2(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
38 { | |
39 { | |
40 INT m; | |
41 R *x; | |
42 x = ri; | |
43 for (m = mb, W = W + (mb * ((TWVL / VL) * 2)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 2), MAKE_VOLATILE_STRIDE(2, rs)) { | |
44 V T1, T2, T3; | |
45 T1 = LD(&(x[0]), ms, &(x[0])); | |
46 T2 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
47 T3 = BYTWJ(&(W[0]), T2); | |
48 ST(&(x[0]), VADD(T1, T3), ms, &(x[0])); | |
49 ST(&(x[WS(rs, 1)]), VSUB(T1, T3), ms, &(x[WS(rs, 1)])); | |
50 } | |
51 } | |
52 VLEAVE(); | |
53 } | |
54 | |
55 static const tw_instr twinstr[] = { | |
56 VTW(0, 1), | |
57 {TW_NEXT, VL, 0} | |
58 }; | |
59 | |
60 static const ct_desc desc = { 2, XSIMD_STRING("t2fv_2"), twinstr, &GENUS, {3, 2, 0, 0}, 0, 0, 0 }; | |
61 | |
62 void XSIMD(codelet_t2fv_2) (planner *p) { | |
63 X(kdft_dit_register) (p, t2fv_2, &desc); | |
64 } | |
65 #else /* HAVE_FMA */ | |
66 | |
67 /* Generated by: ../../../genfft/gen_twiddle_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name t2fv_2 -include t2f.h */ | |
68 | |
69 /* | |
70 * This function contains 3 FP additions, 2 FP multiplications, | |
71 * (or, 3 additions, 2 multiplications, 0 fused multiply/add), | |
72 * 5 stack variables, 0 constants, and 4 memory accesses | |
73 */ | |
74 #include "t2f.h" | |
75 | |
76 static void t2fv_2(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
77 { | |
78 { | |
79 INT m; | |
80 R *x; | |
81 x = ri; | |
82 for (m = mb, W = W + (mb * ((TWVL / VL) * 2)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 2), MAKE_VOLATILE_STRIDE(2, rs)) { | |
83 V T1, T3, T2; | |
84 T1 = LD(&(x[0]), ms, &(x[0])); | |
85 T2 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
86 T3 = BYTWJ(&(W[0]), T2); | |
87 ST(&(x[WS(rs, 1)]), VSUB(T1, T3), ms, &(x[WS(rs, 1)])); | |
88 ST(&(x[0]), VADD(T1, T3), ms, &(x[0])); | |
89 } | |
90 } | |
91 VLEAVE(); | |
92 } | |
93 | |
94 static const tw_instr twinstr[] = { | |
95 VTW(0, 1), | |
96 {TW_NEXT, VL, 0} | |
97 }; | |
98 | |
99 static const ct_desc desc = { 2, XSIMD_STRING("t2fv_2"), twinstr, &GENUS, {3, 2, 0, 0}, 0, 0, 0 }; | |
100 | |
101 void XSIMD(codelet_t2fv_2) (planner *p) { | |
102 X(kdft_dit_register) (p, t2fv_2, &desc); | |
103 } | |
104 #endif /* HAVE_FMA */ |