comparison src/fftw-3.3.8/dft/simd/common/t1sv_2.c @ 167:bd3cc4d1df30

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
comparison
equal deleted inserted replaced
166:cbd6d7e562c7 167:bd3cc4d1df30
1 /*
2 * Copyright (c) 2003, 2007-14 Matteo Frigo
3 * Copyright (c) 2003, 2007-14 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 Thu May 24 08:06:09 EDT 2018 */
23
24 #include "dft/codelet-dft.h"
25
26 #if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA)
27
28 /* Generated by: ../../../genfft/gen_twiddle.native -fma -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name t1sv_2 -include dft/simd/ts.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 "dft/simd/ts.h"
36
37 static void t1sv_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 + (2 * VL), ri = ri + ((2 * VL) * ms), ii = ii + ((2 * VL) * ms), W = W + ((2 * VL) * 2), MAKE_VOLATILE_STRIDE(4, rs)) {
42 V T1, Ta, T3, T6, T4, T8, T2, T7, T9, T5;
43 T1 = LD(&(ri[0]), ms, &(ri[0]));
44 Ta = LD(&(ii[0]), ms, &(ii[0]));
45 T3 = LD(&(ri[WS(rs, 1)]), ms, &(ri[WS(rs, 1)]));
46 T6 = LD(&(ii[WS(rs, 1)]), ms, &(ii[WS(rs, 1)]));
47 T2 = LDW(&(W[0]));
48 T4 = VMUL(T2, T3);
49 T8 = VMUL(T2, T6);
50 T5 = LDW(&(W[TWVL * 1]));
51 T7 = VFMA(T5, T6, T4);
52 T9 = VFNMS(T5, T3, T8);
53 ST(&(ri[WS(rs, 1)]), VSUB(T1, T7), ms, &(ri[WS(rs, 1)]));
54 ST(&(ii[WS(rs, 1)]), VSUB(Ta, T9), ms, &(ii[WS(rs, 1)]));
55 ST(&(ri[0]), VADD(T1, T7), ms, &(ri[0]));
56 ST(&(ii[0]), VADD(T9, Ta), ms, &(ii[0]));
57 }
58 }
59 VLEAVE();
60 }
61
62 static const tw_instr twinstr[] = {
63 VTW(0, 1),
64 {TW_NEXT, (2 * VL), 0}
65 };
66
67 static const ct_desc desc = { 2, XSIMD_STRING("t1sv_2"), twinstr, &GENUS, {4, 2, 2, 0}, 0, 0, 0 };
68
69 void XSIMD(codelet_t1sv_2) (planner *p) {
70 X(kdft_dit_register) (p, t1sv_2, &desc);
71 }
72 #else
73
74 /* Generated by: ../../../genfft/gen_twiddle.native -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name t1sv_2 -include dft/simd/ts.h */
75
76 /*
77 * This function contains 6 FP additions, 4 FP multiplications,
78 * (or, 4 additions, 2 multiplications, 2 fused multiply/add),
79 * 9 stack variables, 0 constants, and 8 memory accesses
80 */
81 #include "dft/simd/ts.h"
82
83 static void t1sv_2(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
84 {
85 {
86 INT m;
87 for (m = mb, W = W + (mb * 2); m < me; m = m + (2 * VL), ri = ri + ((2 * VL) * ms), ii = ii + ((2 * VL) * ms), W = W + ((2 * VL) * 2), MAKE_VOLATILE_STRIDE(4, rs)) {
88 V T1, T8, T6, T7;
89 T1 = LD(&(ri[0]), ms, &(ri[0]));
90 T8 = LD(&(ii[0]), ms, &(ii[0]));
91 {
92 V T3, T5, T2, T4;
93 T3 = LD(&(ri[WS(rs, 1)]), ms, &(ri[WS(rs, 1)]));
94 T5 = LD(&(ii[WS(rs, 1)]), ms, &(ii[WS(rs, 1)]));
95 T2 = LDW(&(W[0]));
96 T4 = LDW(&(W[TWVL * 1]));
97 T6 = VFMA(T2, T3, VMUL(T4, T5));
98 T7 = VFNMS(T4, T3, VMUL(T2, T5));
99 }
100 ST(&(ri[WS(rs, 1)]), VSUB(T1, T6), ms, &(ri[WS(rs, 1)]));
101 ST(&(ii[WS(rs, 1)]), VSUB(T8, T7), ms, &(ii[WS(rs, 1)]));
102 ST(&(ri[0]), VADD(T1, T6), ms, &(ri[0]));
103 ST(&(ii[0]), VADD(T7, T8), ms, &(ii[0]));
104 }
105 }
106 VLEAVE();
107 }
108
109 static const tw_instr twinstr[] = {
110 VTW(0, 1),
111 {TW_NEXT, (2 * VL), 0}
112 };
113
114 static const ct_desc desc = { 2, XSIMD_STRING("t1sv_2"), twinstr, &GENUS, {4, 2, 2, 0}, 0, 0, 0 };
115
116 void XSIMD(codelet_t1sv_2) (planner *p) {
117 X(kdft_dit_register) (p, t1sv_2, &desc);
118 }
119 #endif