annotate src/fftw-3.3.3/dft/simd/common/n1bv_5.c @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
cannam@95 1 /*
cannam@95 2 * Copyright (c) 2003, 2007-11 Matteo Frigo
cannam@95 3 * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
cannam@95 4 *
cannam@95 5 * This program is free software; you can redistribute it and/or modify
cannam@95 6 * it under the terms of the GNU General Public License as published by
cannam@95 7 * the Free Software Foundation; either version 2 of the License, or
cannam@95 8 * (at your option) any later version.
cannam@95 9 *
cannam@95 10 * This program is distributed in the hope that it will be useful,
cannam@95 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@95 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@95 13 * GNU General Public License for more details.
cannam@95 14 *
cannam@95 15 * You should have received a copy of the GNU General Public License
cannam@95 16 * along with this program; if not, write to the Free Software
cannam@95 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
cannam@95 18 *
cannam@95 19 */
cannam@95 20
cannam@95 21 /* This file was automatically generated --- DO NOT EDIT */
cannam@95 22 /* Generated on Sun Nov 25 07:36:58 EST 2012 */
cannam@95 23
cannam@95 24 #include "codelet-dft.h"
cannam@95 25
cannam@95 26 #ifdef HAVE_FMA
cannam@95 27
cannam@95 28 /* Generated by: ../../../genfft/gen_notw_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 5 -name n1bv_5 -include n1b.h */
cannam@95 29
cannam@95 30 /*
cannam@95 31 * This function contains 16 FP additions, 11 FP multiplications,
cannam@95 32 * (or, 7 additions, 2 multiplications, 9 fused multiply/add),
cannam@95 33 * 23 stack variables, 4 constants, and 10 memory accesses
cannam@95 34 */
cannam@95 35 #include "n1b.h"
cannam@95 36
cannam@95 37 static void n1bv_5(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
cannam@95 38 {
cannam@95 39 DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
cannam@95 40 DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
cannam@95 41 DVK(KP618033988, +0.618033988749894848204586834365638117720309180);
cannam@95 42 DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
cannam@95 43 {
cannam@95 44 INT i;
cannam@95 45 const R *xi;
cannam@95 46 R *xo;
cannam@95 47 xi = ii;
cannam@95 48 xo = io;
cannam@95 49 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(10, is), MAKE_VOLATILE_STRIDE(10, os)) {
cannam@95 50 V T1, T2, T3, T5, T6;
cannam@95 51 T1 = LD(&(xi[0]), ivs, &(xi[0]));
cannam@95 52 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
cannam@95 53 T3 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
cannam@95 54 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
cannam@95 55 T6 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
cannam@95 56 {
cannam@95 57 V Tc, T4, Td, T7;
cannam@95 58 Tc = VSUB(T2, T3);
cannam@95 59 T4 = VADD(T2, T3);
cannam@95 60 Td = VSUB(T5, T6);
cannam@95 61 T7 = VADD(T5, T6);
cannam@95 62 {
cannam@95 63 V Tg, Te, Ta, T8, T9, Tf, Tb;
cannam@95 64 Tg = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tc, Td));
cannam@95 65 Te = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Td, Tc));
cannam@95 66 Ta = VSUB(T4, T7);
cannam@95 67 T8 = VADD(T4, T7);
cannam@95 68 T9 = VFNMS(LDK(KP250000000), T8, T1);
cannam@95 69 ST(&(xo[0]), VADD(T1, T8), ovs, &(xo[0]));
cannam@95 70 Tf = VFNMS(LDK(KP559016994), Ta, T9);
cannam@95 71 Tb = VFMA(LDK(KP559016994), Ta, T9);
cannam@95 72 ST(&(xo[WS(os, 2)]), VFNMSI(Tg, Tf), ovs, &(xo[0]));
cannam@95 73 ST(&(xo[WS(os, 3)]), VFMAI(Tg, Tf), ovs, &(xo[WS(os, 1)]));
cannam@95 74 ST(&(xo[WS(os, 4)]), VFNMSI(Te, Tb), ovs, &(xo[0]));
cannam@95 75 ST(&(xo[WS(os, 1)]), VFMAI(Te, Tb), ovs, &(xo[WS(os, 1)]));
cannam@95 76 }
cannam@95 77 }
cannam@95 78 }
cannam@95 79 }
cannam@95 80 VLEAVE();
cannam@95 81 }
cannam@95 82
cannam@95 83 static const kdft_desc desc = { 5, XSIMD_STRING("n1bv_5"), {7, 2, 9, 0}, &GENUS, 0, 0, 0, 0 };
cannam@95 84
cannam@95 85 void XSIMD(codelet_n1bv_5) (planner *p) {
cannam@95 86 X(kdft_register) (p, n1bv_5, &desc);
cannam@95 87 }
cannam@95 88
cannam@95 89 #else /* HAVE_FMA */
cannam@95 90
cannam@95 91 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 5 -name n1bv_5 -include n1b.h */
cannam@95 92
cannam@95 93 /*
cannam@95 94 * This function contains 16 FP additions, 6 FP multiplications,
cannam@95 95 * (or, 13 additions, 3 multiplications, 3 fused multiply/add),
cannam@95 96 * 18 stack variables, 4 constants, and 10 memory accesses
cannam@95 97 */
cannam@95 98 #include "n1b.h"
cannam@95 99
cannam@95 100 static void n1bv_5(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
cannam@95 101 {
cannam@95 102 DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
cannam@95 103 DVK(KP587785252, +0.587785252292473129168705954639072768597652438);
cannam@95 104 DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
cannam@95 105 DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
cannam@95 106 {
cannam@95 107 INT i;
cannam@95 108 const R *xi;
cannam@95 109 R *xo;
cannam@95 110 xi = ii;
cannam@95 111 xo = io;
cannam@95 112 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(10, is), MAKE_VOLATILE_STRIDE(10, os)) {
cannam@95 113 V Tb, T3, Tc, T6, Ta;
cannam@95 114 Tb = LD(&(xi[0]), ivs, &(xi[0]));
cannam@95 115 {
cannam@95 116 V T1, T2, T8, T4, T5, T9;
cannam@95 117 T1 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
cannam@95 118 T2 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
cannam@95 119 T8 = VADD(T1, T2);
cannam@95 120 T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
cannam@95 121 T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
cannam@95 122 T9 = VADD(T4, T5);
cannam@95 123 T3 = VSUB(T1, T2);
cannam@95 124 Tc = VADD(T8, T9);
cannam@95 125 T6 = VSUB(T4, T5);
cannam@95 126 Ta = VMUL(LDK(KP559016994), VSUB(T8, T9));
cannam@95 127 }
cannam@95 128 ST(&(xo[0]), VADD(Tb, Tc), ovs, &(xo[0]));
cannam@95 129 {
cannam@95 130 V T7, Tf, Te, Tg, Td;
cannam@95 131 T7 = VBYI(VFMA(LDK(KP951056516), T3, VMUL(LDK(KP587785252), T6)));
cannam@95 132 Tf = VBYI(VFNMS(LDK(KP951056516), T6, VMUL(LDK(KP587785252), T3)));
cannam@95 133 Td = VFNMS(LDK(KP250000000), Tc, Tb);
cannam@95 134 Te = VADD(Ta, Td);
cannam@95 135 Tg = VSUB(Td, Ta);
cannam@95 136 ST(&(xo[WS(os, 1)]), VADD(T7, Te), ovs, &(xo[WS(os, 1)]));
cannam@95 137 ST(&(xo[WS(os, 3)]), VSUB(Tg, Tf), ovs, &(xo[WS(os, 1)]));
cannam@95 138 ST(&(xo[WS(os, 4)]), VSUB(Te, T7), ovs, &(xo[0]));
cannam@95 139 ST(&(xo[WS(os, 2)]), VADD(Tf, Tg), ovs, &(xo[0]));
cannam@95 140 }
cannam@95 141 }
cannam@95 142 }
cannam@95 143 VLEAVE();
cannam@95 144 }
cannam@95 145
cannam@95 146 static const kdft_desc desc = { 5, XSIMD_STRING("n1bv_5"), {13, 3, 3, 0}, &GENUS, 0, 0, 0, 0 };
cannam@95 147
cannam@95 148 void XSIMD(codelet_n1bv_5) (planner *p) {
cannam@95 149 X(kdft_register) (p, n1bv_5, &desc);
cannam@95 150 }
cannam@95 151
cannam@95 152 #endif /* HAVE_FMA */