comparison src/fftw-3.3.8/rdft/scalar/r2cb/hb_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:07:31 EDT 2018 */
23
24 #include "rdft/codelet-rdft.h"
25
26 #if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA)
27
28 /* Generated by: ../../../genfft/gen_hc2hc.native -fma -compact -variables 4 -pipeline-latency 4 -sign 1 -n 2 -dif -name hb_2 -include rdft/scalar/hb.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 "rdft/scalar/hb.h"
36
37 static void hb_2(R *cr, R *ci, const R *W, stride rs, INT mb, INT me, INT ms)
38 {
39 {
40 INT m;
41 for (m = mb, W = W + ((mb - 1) * 2); m < me; m = m + 1, cr = cr + ms, ci = ci - ms, W = W + 2, MAKE_VOLATILE_STRIDE(4, rs)) {
42 E T1, T2, T6, T3, T4, T9;
43 T1 = cr[0];
44 T2 = ci[0];
45 T6 = T1 - T2;
46 T3 = ci[WS(rs, 1)];
47 T4 = cr[WS(rs, 1)];
48 T9 = T3 + T4;
49 cr[0] = T1 + T2;
50 ci[0] = T3 - T4;
51 {
52 E T5, T7, T8, Ta;
53 T5 = W[0];
54 T7 = T5 * T6;
55 T8 = W[1];
56 Ta = T8 * T6;
57 cr[WS(rs, 1)] = FNMS(T8, T9, T7);
58 ci[WS(rs, 1)] = FMA(T5, T9, Ta);
59 }
60 }
61 }
62 }
63
64 static const tw_instr twinstr[] = {
65 {TW_FULL, 1, 2},
66 {TW_NEXT, 1, 0}
67 };
68
69 static const hc2hc_desc desc = { 2, "hb_2", twinstr, &GENUS, {4, 2, 2, 0} };
70
71 void X(codelet_hb_2) (planner *p) {
72 X(khc2hc_register) (p, hb_2, &desc);
73 }
74 #else
75
76 /* Generated by: ../../../genfft/gen_hc2hc.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 2 -dif -name hb_2 -include rdft/scalar/hb.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 "rdft/scalar/hb.h"
84
85 static void hb_2(R *cr, R *ci, const R *W, stride rs, INT mb, INT me, INT ms)
86 {
87 {
88 INT m;
89 for (m = mb, W = W + ((mb - 1) * 2); m < me; m = m + 1, cr = cr + ms, ci = ci - ms, W = W + 2, MAKE_VOLATILE_STRIDE(4, rs)) {
90 E T1, T2, T6, T3, T4, T8, T5, T7;
91 T1 = cr[0];
92 T2 = ci[0];
93 T6 = T1 - T2;
94 T3 = ci[WS(rs, 1)];
95 T4 = cr[WS(rs, 1)];
96 T8 = T3 + T4;
97 cr[0] = T1 + T2;
98 ci[0] = T3 - T4;
99 T5 = W[0];
100 T7 = W[1];
101 cr[WS(rs, 1)] = FNMS(T7, T8, T5 * T6);
102 ci[WS(rs, 1)] = FMA(T7, T6, T5 * T8);
103 }
104 }
105 }
106
107 static const tw_instr twinstr[] = {
108 {TW_FULL, 1, 2},
109 {TW_NEXT, 1, 0}
110 };
111
112 static const hc2hc_desc desc = { 2, "hb_2", twinstr, &GENUS, {4, 2, 2, 0} };
113
114 void X(codelet_hb_2) (planner *p) {
115 X(khc2hc_register) (p, hb_2, &desc);
116 }
117 #endif