annotate src/fftw-3.3.3/dft/scalar/codelets/t1_6.c @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents 37bf6b4a2645
children
rev   line source
Chris@10 1 /*
Chris@10 2 * Copyright (c) 2003, 2007-11 Matteo Frigo
Chris@10 3 * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
Chris@10 4 *
Chris@10 5 * This program is free software; you can redistribute it and/or modify
Chris@10 6 * it under the terms of the GNU General Public License as published by
Chris@10 7 * the Free Software Foundation; either version 2 of the License, or
Chris@10 8 * (at your option) any later version.
Chris@10 9 *
Chris@10 10 * This program is distributed in the hope that it will be useful,
Chris@10 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@10 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@10 13 * GNU General Public License for more details.
Chris@10 14 *
Chris@10 15 * You should have received a copy of the GNU General Public License
Chris@10 16 * along with this program; if not, write to the Free Software
Chris@10 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Chris@10 18 *
Chris@10 19 */
Chris@10 20
Chris@10 21 /* This file was automatically generated --- DO NOT EDIT */
Chris@10 22 /* Generated on Sun Nov 25 07:35:48 EST 2012 */
Chris@10 23
Chris@10 24 #include "codelet-dft.h"
Chris@10 25
Chris@10 26 #ifdef HAVE_FMA
Chris@10 27
Chris@10 28 /* Generated by: ../../../genfft/gen_twiddle.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -n 6 -name t1_6 -include t.h */
Chris@10 29
Chris@10 30 /*
Chris@10 31 * This function contains 46 FP additions, 32 FP multiplications,
Chris@10 32 * (or, 24 additions, 10 multiplications, 22 fused multiply/add),
Chris@10 33 * 47 stack variables, 2 constants, and 24 memory accesses
Chris@10 34 */
Chris@10 35 #include "t.h"
Chris@10 36
Chris@10 37 static void t1_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
Chris@10 38 {
Chris@10 39 DK(KP866025403, +0.866025403784438646763723170752936183471402627);
Chris@10 40 DK(KP500000000, +0.500000000000000000000000000000000000000000000);
Chris@10 41 {
Chris@10 42 INT m;
Chris@10 43 for (m = mb, W = W + (mb * 10); m < me; m = m + 1, ri = ri + ms, ii = ii + ms, W = W + 10, MAKE_VOLATILE_STRIDE(12, rs)) {
Chris@10 44 E TY, TU, T10, TZ;
Chris@10 45 {
Chris@10 46 E T1, TX, TW, T7, Tn, Tq, TJ, TR, TB, Tl, To, TK, Tt, Tw, Ts;
Chris@10 47 E Tp, Tv;
Chris@10 48 T1 = ri[0];
Chris@10 49 TX = ii[0];
Chris@10 50 {
Chris@10 51 E T3, T6, T2, T5;
Chris@10 52 T3 = ri[WS(rs, 3)];
Chris@10 53 T6 = ii[WS(rs, 3)];
Chris@10 54 T2 = W[4];
Chris@10 55 T5 = W[5];
Chris@10 56 {
Chris@10 57 E Ta, Td, Tg, TF, Tb, Tj, Tf, Tc, Ti, TV, T4, T9;
Chris@10 58 Ta = ri[WS(rs, 2)];
Chris@10 59 Td = ii[WS(rs, 2)];
Chris@10 60 TV = T2 * T6;
Chris@10 61 T4 = T2 * T3;
Chris@10 62 T9 = W[2];
Chris@10 63 Tg = ri[WS(rs, 5)];
Chris@10 64 TW = FNMS(T5, T3, TV);
Chris@10 65 T7 = FMA(T5, T6, T4);
Chris@10 66 TF = T9 * Td;
Chris@10 67 Tb = T9 * Ta;
Chris@10 68 Tj = ii[WS(rs, 5)];
Chris@10 69 Tf = W[8];
Chris@10 70 Tc = W[3];
Chris@10 71 Ti = W[9];
Chris@10 72 {
Chris@10 73 E TG, Te, TI, Tk, TH, Th, Tm;
Chris@10 74 Tn = ri[WS(rs, 4)];
Chris@10 75 TH = Tf * Tj;
Chris@10 76 Th = Tf * Tg;
Chris@10 77 TG = FNMS(Tc, Ta, TF);
Chris@10 78 Te = FMA(Tc, Td, Tb);
Chris@10 79 TI = FNMS(Ti, Tg, TH);
Chris@10 80 Tk = FMA(Ti, Tj, Th);
Chris@10 81 Tq = ii[WS(rs, 4)];
Chris@10 82 Tm = W[6];
Chris@10 83 TJ = TG - TI;
Chris@10 84 TR = TG + TI;
Chris@10 85 TB = Te + Tk;
Chris@10 86 Tl = Te - Tk;
Chris@10 87 To = Tm * Tn;
Chris@10 88 TK = Tm * Tq;
Chris@10 89 }
Chris@10 90 Tt = ri[WS(rs, 1)];
Chris@10 91 Tw = ii[WS(rs, 1)];
Chris@10 92 Ts = W[0];
Chris@10 93 Tp = W[7];
Chris@10 94 Tv = W[1];
Chris@10 95 }
Chris@10 96 }
Chris@10 97 {
Chris@10 98 E TA, T8, TL, Tr, TN, Tx, T11, TM, Tu;
Chris@10 99 TA = T1 + T7;
Chris@10 100 T8 = T1 - T7;
Chris@10 101 TM = Ts * Tw;
Chris@10 102 Tu = Ts * Tt;
Chris@10 103 TL = FNMS(Tp, Tn, TK);
Chris@10 104 Tr = FMA(Tp, Tq, To);
Chris@10 105 TN = FNMS(Tv, Tt, TM);
Chris@10 106 Tx = FMA(Tv, Tw, Tu);
Chris@10 107 T11 = TX - TW;
Chris@10 108 TY = TW + TX;
Chris@10 109 {
Chris@10 110 E TP, TT, TD, TE, TQ, Tz, T14, T13;
Chris@10 111 {
Chris@10 112 E TO, TS, TC, Ty, T12;
Chris@10 113 TO = TL - TN;
Chris@10 114 TS = TL + TN;
Chris@10 115 TC = Tr + Tx;
Chris@10 116 Ty = Tr - Tx;
Chris@10 117 T12 = TJ + TO;
Chris@10 118 TP = TJ - TO;
Chris@10 119 TT = TR - TS;
Chris@10 120 TU = TR + TS;
Chris@10 121 Tz = Tl + Ty;
Chris@10 122 T14 = Ty - Tl;
Chris@10 123 ii[WS(rs, 3)] = T12 + T11;
Chris@10 124 T13 = FNMS(KP500000000, T12, T11);
Chris@10 125 T10 = TC - TB;
Chris@10 126 TD = TB + TC;
Chris@10 127 }
Chris@10 128 ri[WS(rs, 3)] = T8 + Tz;
Chris@10 129 TE = FNMS(KP500000000, Tz, T8);
Chris@10 130 ii[WS(rs, 5)] = FNMS(KP866025403, T14, T13);
Chris@10 131 ii[WS(rs, 1)] = FMA(KP866025403, T14, T13);
Chris@10 132 TQ = FNMS(KP500000000, TD, TA);
Chris@10 133 ri[WS(rs, 5)] = FNMS(KP866025403, TP, TE);
Chris@10 134 ri[WS(rs, 1)] = FMA(KP866025403, TP, TE);
Chris@10 135 ri[0] = TA + TD;
Chris@10 136 ri[WS(rs, 4)] = FMA(KP866025403, TT, TQ);
Chris@10 137 ri[WS(rs, 2)] = FNMS(KP866025403, TT, TQ);
Chris@10 138 }
Chris@10 139 }
Chris@10 140 }
Chris@10 141 ii[0] = TU + TY;
Chris@10 142 TZ = FNMS(KP500000000, TU, TY);
Chris@10 143 ii[WS(rs, 2)] = FNMS(KP866025403, T10, TZ);
Chris@10 144 ii[WS(rs, 4)] = FMA(KP866025403, T10, TZ);
Chris@10 145 }
Chris@10 146 }
Chris@10 147 }
Chris@10 148
Chris@10 149 static const tw_instr twinstr[] = {
Chris@10 150 {TW_FULL, 0, 6},
Chris@10 151 {TW_NEXT, 1, 0}
Chris@10 152 };
Chris@10 153
Chris@10 154 static const ct_desc desc = { 6, "t1_6", twinstr, &GENUS, {24, 10, 22, 0}, 0, 0, 0 };
Chris@10 155
Chris@10 156 void X(codelet_t1_6) (planner *p) {
Chris@10 157 X(kdft_dit_register) (p, t1_6, &desc);
Chris@10 158 }
Chris@10 159 #else /* HAVE_FMA */
Chris@10 160
Chris@10 161 /* Generated by: ../../../genfft/gen_twiddle.native -compact -variables 4 -pipeline-latency 4 -n 6 -name t1_6 -include t.h */
Chris@10 162
Chris@10 163 /*
Chris@10 164 * This function contains 46 FP additions, 28 FP multiplications,
Chris@10 165 * (or, 32 additions, 14 multiplications, 14 fused multiply/add),
Chris@10 166 * 23 stack variables, 2 constants, and 24 memory accesses
Chris@10 167 */
Chris@10 168 #include "t.h"
Chris@10 169
Chris@10 170 static void t1_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
Chris@10 171 {
Chris@10 172 DK(KP500000000, +0.500000000000000000000000000000000000000000000);
Chris@10 173 DK(KP866025403, +0.866025403784438646763723170752936183471402627);
Chris@10 174 {
Chris@10 175 INT m;
Chris@10 176 for (m = mb, W = W + (mb * 10); m < me; m = m + 1, ri = ri + ms, ii = ii + ms, W = W + 10, MAKE_VOLATILE_STRIDE(12, rs)) {
Chris@10 177 E T7, TS, Tv, TO, Tt, TJ, Tx, TF, Ti, TI, Tw, TC;
Chris@10 178 {
Chris@10 179 E T1, TN, T6, TM;
Chris@10 180 T1 = ri[0];
Chris@10 181 TN = ii[0];
Chris@10 182 {
Chris@10 183 E T3, T5, T2, T4;
Chris@10 184 T3 = ri[WS(rs, 3)];
Chris@10 185 T5 = ii[WS(rs, 3)];
Chris@10 186 T2 = W[4];
Chris@10 187 T4 = W[5];
Chris@10 188 T6 = FMA(T2, T3, T4 * T5);
Chris@10 189 TM = FNMS(T4, T3, T2 * T5);
Chris@10 190 }
Chris@10 191 T7 = T1 - T6;
Chris@10 192 TS = TN - TM;
Chris@10 193 Tv = T1 + T6;
Chris@10 194 TO = TM + TN;
Chris@10 195 }
Chris@10 196 {
Chris@10 197 E Tn, TD, Ts, TE;
Chris@10 198 {
Chris@10 199 E Tk, Tm, Tj, Tl;
Chris@10 200 Tk = ri[WS(rs, 4)];
Chris@10 201 Tm = ii[WS(rs, 4)];
Chris@10 202 Tj = W[6];
Chris@10 203 Tl = W[7];
Chris@10 204 Tn = FMA(Tj, Tk, Tl * Tm);
Chris@10 205 TD = FNMS(Tl, Tk, Tj * Tm);
Chris@10 206 }
Chris@10 207 {
Chris@10 208 E Tp, Tr, To, Tq;
Chris@10 209 Tp = ri[WS(rs, 1)];
Chris@10 210 Tr = ii[WS(rs, 1)];
Chris@10 211 To = W[0];
Chris@10 212 Tq = W[1];
Chris@10 213 Ts = FMA(To, Tp, Tq * Tr);
Chris@10 214 TE = FNMS(Tq, Tp, To * Tr);
Chris@10 215 }
Chris@10 216 Tt = Tn - Ts;
Chris@10 217 TJ = TD + TE;
Chris@10 218 Tx = Tn + Ts;
Chris@10 219 TF = TD - TE;
Chris@10 220 }
Chris@10 221 {
Chris@10 222 E Tc, TA, Th, TB;
Chris@10 223 {
Chris@10 224 E T9, Tb, T8, Ta;
Chris@10 225 T9 = ri[WS(rs, 2)];
Chris@10 226 Tb = ii[WS(rs, 2)];
Chris@10 227 T8 = W[2];
Chris@10 228 Ta = W[3];
Chris@10 229 Tc = FMA(T8, T9, Ta * Tb);
Chris@10 230 TA = FNMS(Ta, T9, T8 * Tb);
Chris@10 231 }
Chris@10 232 {
Chris@10 233 E Te, Tg, Td, Tf;
Chris@10 234 Te = ri[WS(rs, 5)];
Chris@10 235 Tg = ii[WS(rs, 5)];
Chris@10 236 Td = W[8];
Chris@10 237 Tf = W[9];
Chris@10 238 Th = FMA(Td, Te, Tf * Tg);
Chris@10 239 TB = FNMS(Tf, Te, Td * Tg);
Chris@10 240 }
Chris@10 241 Ti = Tc - Th;
Chris@10 242 TI = TA + TB;
Chris@10 243 Tw = Tc + Th;
Chris@10 244 TC = TA - TB;
Chris@10 245 }
Chris@10 246 {
Chris@10 247 E TG, Tu, Tz, TR, TT, TU;
Chris@10 248 TG = KP866025403 * (TC - TF);
Chris@10 249 Tu = Ti + Tt;
Chris@10 250 Tz = FNMS(KP500000000, Tu, T7);
Chris@10 251 ri[WS(rs, 3)] = T7 + Tu;
Chris@10 252 ri[WS(rs, 1)] = Tz + TG;
Chris@10 253 ri[WS(rs, 5)] = Tz - TG;
Chris@10 254 TR = KP866025403 * (Tt - Ti);
Chris@10 255 TT = TC + TF;
Chris@10 256 TU = FNMS(KP500000000, TT, TS);
Chris@10 257 ii[WS(rs, 1)] = TR + TU;
Chris@10 258 ii[WS(rs, 3)] = TT + TS;
Chris@10 259 ii[WS(rs, 5)] = TU - TR;
Chris@10 260 }
Chris@10 261 {
Chris@10 262 E TK, Ty, TH, TQ, TL, TP;
Chris@10 263 TK = KP866025403 * (TI - TJ);
Chris@10 264 Ty = Tw + Tx;
Chris@10 265 TH = FNMS(KP500000000, Ty, Tv);
Chris@10 266 ri[0] = Tv + Ty;
Chris@10 267 ri[WS(rs, 4)] = TH + TK;
Chris@10 268 ri[WS(rs, 2)] = TH - TK;
Chris@10 269 TQ = KP866025403 * (Tx - Tw);
Chris@10 270 TL = TI + TJ;
Chris@10 271 TP = FNMS(KP500000000, TL, TO);
Chris@10 272 ii[0] = TL + TO;
Chris@10 273 ii[WS(rs, 4)] = TQ + TP;
Chris@10 274 ii[WS(rs, 2)] = TP - TQ;
Chris@10 275 }
Chris@10 276 }
Chris@10 277 }
Chris@10 278 }
Chris@10 279
Chris@10 280 static const tw_instr twinstr[] = {
Chris@10 281 {TW_FULL, 0, 6},
Chris@10 282 {TW_NEXT, 1, 0}
Chris@10 283 };
Chris@10 284
Chris@10 285 static const ct_desc desc = { 6, "t1_6", twinstr, &GENUS, {32, 14, 14, 0}, 0, 0, 0 };
Chris@10 286
Chris@10 287 void X(codelet_t1_6) (planner *p) {
Chris@10 288 X(kdft_dit_register) (p, t1_6, &desc);
Chris@10 289 }
Chris@10 290 #endif /* HAVE_FMA */