diff options
author | scuri <scuri> | 2008-10-17 06:10:15 +0000 |
---|---|---|
committer | scuri <scuri> | 2008-10-17 06:10:15 +0000 |
commit | 5a422aba704c375a307a902bafe658342e209906 (patch) | |
tree | 5005011e086bb863d8fb587ad3319bbec59b2447 /src/fftw3/rdft/codelets/r2hc/hf_8.c |
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'src/fftw3/rdft/codelets/r2hc/hf_8.c')
-rw-r--r-- | src/fftw3/rdft/codelets/r2hc/hf_8.c | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/src/fftw3/rdft/codelets/r2hc/hf_8.c b/src/fftw3/rdft/codelets/r2hc/hf_8.c new file mode 100644 index 0000000..21dedce --- /dev/null +++ b/src/fftw3/rdft/codelets/r2hc/hf_8.c @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2003 Matteo Frigo + * Copyright (c) 2003 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sat Jul 5 21:56:58 EDT 2003 */ + +#include "codelet-rdft.h" + +/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_hc2hc -compact -variables 4 -n 8 -dit -name hf_8 -include hf.h */ + +/* + * This function contains 66 FP additions, 32 FP multiplications, + * (or, 52 additions, 18 multiplications, 14 fused multiply/add), + * 28 stack variables, and 32 memory accesses + */ +/* + * Generator Id's : + * $Id: hf_8.c,v 1.1 2008/10/17 06:12:34 scuri Exp $ + * $Id: hf_8.c,v 1.1 2008/10/17 06:12:34 scuri Exp $ + * $Id: hf_8.c,v 1.1 2008/10/17 06:12:34 scuri Exp $ + */ + +#include "hf.h" + +static const R *hf_8(R *rio, R *iio, const R *W, stride ios, int m, int dist) +{ + DK(KP707106781, +0.707106781186547524400844362104849039284835938); + int i; + for (i = m - 2; i > 0; i = i - 2, rio = rio + dist, iio = iio - dist, W = W + 14) { + E T7, T1e, TH, T19, TF, T13, TR, TU, Ti, T1f, TK, T16, Tu, T12, TM; + E TP; + { + E T1, T18, T6, T17; + T1 = rio[0]; + T18 = iio[-WS(ios, 7)]; + { + E T3, T5, T2, T4; + T3 = rio[WS(ios, 4)]; + T5 = iio[-WS(ios, 3)]; + T2 = W[6]; + T4 = W[7]; + T6 = FMA(T2, T3, T4 * T5); + T17 = FNMS(T4, T3, T2 * T5); + } + T7 = T1 + T6; + T1e = T18 - T17; + TH = T1 - T6; + T19 = T17 + T18; + } + { + E Tz, TS, TE, TT; + { + E Tw, Ty, Tv, Tx; + Tw = rio[WS(ios, 7)]; + Ty = iio[0]; + Tv = W[12]; + Tx = W[13]; + Tz = FMA(Tv, Tw, Tx * Ty); + TS = FNMS(Tx, Tw, Tv * Ty); + } + { + E TB, TD, TA, TC; + TB = rio[WS(ios, 3)]; + TD = iio[-WS(ios, 4)]; + TA = W[4]; + TC = W[5]; + TE = FMA(TA, TB, TC * TD); + TT = FNMS(TC, TB, TA * TD); + } + TF = Tz + TE; + T13 = TS + TT; + TR = Tz - TE; + TU = TS - TT; + } + { + E Tc, TI, Th, TJ; + { + E T9, Tb, T8, Ta; + T9 = rio[WS(ios, 2)]; + Tb = iio[-WS(ios, 5)]; + T8 = W[2]; + Ta = W[3]; + Tc = FMA(T8, T9, Ta * Tb); + TI = FNMS(Ta, T9, T8 * Tb); + } + { + E Te, Tg, Td, Tf; + Te = rio[WS(ios, 6)]; + Tg = iio[-WS(ios, 1)]; + Td = W[10]; + Tf = W[11]; + Th = FMA(Td, Te, Tf * Tg); + TJ = FNMS(Tf, Te, Td * Tg); + } + Ti = Tc + Th; + T1f = Tc - Th; + TK = TI - TJ; + T16 = TI + TJ; + } + { + E To, TN, Tt, TO; + { + E Tl, Tn, Tk, Tm; + Tl = rio[WS(ios, 1)]; + Tn = iio[-WS(ios, 6)]; + Tk = W[0]; + Tm = W[1]; + To = FMA(Tk, Tl, Tm * Tn); + TN = FNMS(Tm, Tl, Tk * Tn); + } + { + E Tq, Ts, Tp, Tr; + Tq = rio[WS(ios, 5)]; + Ts = iio[-WS(ios, 2)]; + Tp = W[8]; + Tr = W[9]; + Tt = FMA(Tp, Tq, Tr * Ts); + TO = FNMS(Tr, Tq, Tp * Ts); + } + Tu = To + Tt; + T12 = TN + TO; + TM = To - Tt; + TP = TN - TO; + } + { + E Tj, TG, T1b, T1c; + Tj = T7 + Ti; + TG = Tu + TF; + iio[-WS(ios, 4)] = Tj - TG; + rio[0] = Tj + TG; + { + E T15, T1a, T11, T14; + T15 = T12 + T13; + T1a = T16 + T19; + rio[WS(ios, 4)] = T15 - T1a; + iio[0] = T15 + T1a; + T11 = T7 - Ti; + T14 = T12 - T13; + iio[-WS(ios, 6)] = T11 - T14; + rio[WS(ios, 2)] = T11 + T14; + } + T1b = TF - Tu; + T1c = T19 - T16; + rio[WS(ios, 6)] = T1b - T1c; + iio[-WS(ios, 2)] = T1b + T1c; + { + E TX, T1g, T10, T1d, TY, TZ; + TX = TH - TK; + T1g = T1e - T1f; + TY = TP - TM; + TZ = TR + TU; + T10 = KP707106781 * (TY - TZ); + T1d = KP707106781 * (TY + TZ); + iio[-WS(ios, 7)] = TX - T10; + iio[-WS(ios, 1)] = T1d + T1g; + rio[WS(ios, 3)] = TX + T10; + rio[WS(ios, 5)] = T1d - T1g; + } + { + E TL, T1i, TW, T1h, TQ, TV; + TL = TH + TK; + T1i = T1f + T1e; + TQ = TM + TP; + TV = TR - TU; + TW = KP707106781 * (TQ + TV); + T1h = KP707106781 * (TV - TQ); + iio[-WS(ios, 5)] = TL - TW; + iio[-WS(ios, 3)] = T1h + T1i; + rio[WS(ios, 1)] = TL + TW; + rio[WS(ios, 7)] = T1h - T1i; + } + } + } + return W; +} + +static const tw_instr twinstr[] = { + {TW_FULL, 0, 8}, + {TW_NEXT, 1, 0} +}; + +static const hc2hc_desc desc = { 8, "hf_8", twinstr, {52, 18, 14, 0}, &GENUS, 0, 0, 0 }; + +void X(codelet_hf_8) (planner *p) { + X(khc2hc_dit_register) (p, hf_8, &desc); +} |