annotate src/fftw-3.3.8/dft/simd/common/t1fuv_5.c @ 82:d0c2a83c1364

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
rev   line source
Chris@82 1 /*
Chris@82 2 * Copyright (c) 2003, 2007-14 Matteo Frigo
Chris@82 3 * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
Chris@82 4 *
Chris@82 5 * This program is free software; you can redistribute it and/or modify
Chris@82 6 * it under the terms of the GNU General Public License as published by
Chris@82 7 * the Free Software Foundation; either version 2 of the License, or
Chris@82 8 * (at your option) any later version.
Chris@82 9 *
Chris@82 10 * This program is distributed in the hope that it will be useful,
Chris@82 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@82 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@82 13 * GNU General Public License for more details.
Chris@82 14 *
Chris@82 15 * You should have received a copy of the GNU General Public License
Chris@82 16 * along with this program; if not, write to the Free Software
Chris@82 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Chris@82 18 *
Chris@82 19 */
Chris@82 20
Chris@82 21 /* This file was automatically generated --- DO NOT EDIT */
Chris@82 22 /* Generated on Thu May 24 08:05:25 EDT 2018 */
Chris@82 23
Chris@82 24 #include "dft/codelet-dft.h"
Chris@82 25
Chris@82 26 #if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA)
Chris@82 27
Chris@82 28 /* Generated by: ../../../genfft/gen_twiddle_c.native -fma -simd -compact -variables 4 -pipeline-latency 8 -n 5 -name t1fuv_5 -include dft/simd/t1fu.h */
Chris@82 29
Chris@82 30 /*
Chris@82 31 * This function contains 20 FP additions, 19 FP multiplications,
Chris@82 32 * (or, 11 additions, 10 multiplications, 9 fused multiply/add),
Chris@82 33 * 20 stack variables, 4 constants, and 10 memory accesses
Chris@82 34 */
Chris@82 35 #include "dft/simd/t1fu.h"
Chris@82 36
Chris@82 37 static void t1fuv_5(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
Chris@82 38 {
Chris@82 39 DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
Chris@82 40 DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
Chris@82 41 DVK(KP618033988, +0.618033988749894848204586834365638117720309180);
Chris@82 42 DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
Chris@82 43 {
Chris@82 44 INT m;
Chris@82 45 R *x;
Chris@82 46 x = ri;
Chris@82 47 for (m = mb, W = W + (mb * ((TWVL / VL) * 8)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 8), MAKE_VOLATILE_STRIDE(5, rs)) {
Chris@82 48 V T1, Tg, Th, T6, Tb, Tc;
Chris@82 49 T1 = LD(&(x[0]), ms, &(x[0]));
Chris@82 50 {
Chris@82 51 V T3, Ta, T5, T8;
Chris@82 52 {
Chris@82 53 V T2, T9, T4, T7;
Chris@82 54 T2 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)]));
Chris@82 55 T3 = BYTWJ(&(W[0]), T2);
Chris@82 56 T9 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)]));
Chris@82 57 Ta = BYTWJ(&(W[TWVL * 4]), T9);
Chris@82 58 T4 = LD(&(x[WS(rs, 4)]), ms, &(x[0]));
Chris@82 59 T5 = BYTWJ(&(W[TWVL * 6]), T4);
Chris@82 60 T7 = LD(&(x[WS(rs, 2)]), ms, &(x[0]));
Chris@82 61 T8 = BYTWJ(&(W[TWVL * 2]), T7);
Chris@82 62 }
Chris@82 63 Tg = VSUB(T3, T5);
Chris@82 64 Th = VSUB(T8, Ta);
Chris@82 65 T6 = VADD(T3, T5);
Chris@82 66 Tb = VADD(T8, Ta);
Chris@82 67 Tc = VADD(T6, Tb);
Chris@82 68 }
Chris@82 69 ST(&(x[0]), VADD(T1, Tc), ms, &(x[0]));
Chris@82 70 {
Chris@82 71 V Ti, Tk, Tf, Tj, Td, Te;
Chris@82 72 Ti = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Th, Tg));
Chris@82 73 Tk = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tg, Th));
Chris@82 74 Td = VFNMS(LDK(KP250000000), Tc, T1);
Chris@82 75 Te = VSUB(T6, Tb);
Chris@82 76 Tf = VFMA(LDK(KP559016994), Te, Td);
Chris@82 77 Tj = VFNMS(LDK(KP559016994), Te, Td);
Chris@82 78 ST(&(x[WS(rs, 1)]), VFNMSI(Ti, Tf), ms, &(x[WS(rs, 1)]));
Chris@82 79 ST(&(x[WS(rs, 3)]), VFNMSI(Tk, Tj), ms, &(x[WS(rs, 1)]));
Chris@82 80 ST(&(x[WS(rs, 4)]), VFMAI(Ti, Tf), ms, &(x[0]));
Chris@82 81 ST(&(x[WS(rs, 2)]), VFMAI(Tk, Tj), ms, &(x[0]));
Chris@82 82 }
Chris@82 83 }
Chris@82 84 }
Chris@82 85 VLEAVE();
Chris@82 86 }
Chris@82 87
Chris@82 88 static const tw_instr twinstr[] = {
Chris@82 89 VTW(0, 1),
Chris@82 90 VTW(0, 2),
Chris@82 91 VTW(0, 3),
Chris@82 92 VTW(0, 4),
Chris@82 93 {TW_NEXT, VL, 0}
Chris@82 94 };
Chris@82 95
Chris@82 96 static const ct_desc desc = { 5, XSIMD_STRING("t1fuv_5"), twinstr, &GENUS, {11, 10, 9, 0}, 0, 0, 0 };
Chris@82 97
Chris@82 98 void XSIMD(codelet_t1fuv_5) (planner *p) {
Chris@82 99 X(kdft_dit_register) (p, t1fuv_5, &desc);
Chris@82 100 }
Chris@82 101 #else
Chris@82 102
Chris@82 103 /* Generated by: ../../../genfft/gen_twiddle_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 5 -name t1fuv_5 -include dft/simd/t1fu.h */
Chris@82 104
Chris@82 105 /*
Chris@82 106 * This function contains 20 FP additions, 14 FP multiplications,
Chris@82 107 * (or, 17 additions, 11 multiplications, 3 fused multiply/add),
Chris@82 108 * 20 stack variables, 4 constants, and 10 memory accesses
Chris@82 109 */
Chris@82 110 #include "dft/simd/t1fu.h"
Chris@82 111
Chris@82 112 static void t1fuv_5(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
Chris@82 113 {
Chris@82 114 DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
Chris@82 115 DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
Chris@82 116 DVK(KP587785252, +0.587785252292473129168705954639072768597652438);
Chris@82 117 DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
Chris@82 118 {
Chris@82 119 INT m;
Chris@82 120 R *x;
Chris@82 121 x = ri;
Chris@82 122 for (m = mb, W = W + (mb * ((TWVL / VL) * 8)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 8), MAKE_VOLATILE_STRIDE(5, rs)) {
Chris@82 123 V Tc, Tg, Th, T5, Ta, Td;
Chris@82 124 Tc = LD(&(x[0]), ms, &(x[0]));
Chris@82 125 {
Chris@82 126 V T2, T9, T4, T7;
Chris@82 127 {
Chris@82 128 V T1, T8, T3, T6;
Chris@82 129 T1 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)]));
Chris@82 130 T2 = BYTWJ(&(W[0]), T1);
Chris@82 131 T8 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)]));
Chris@82 132 T9 = BYTWJ(&(W[TWVL * 4]), T8);
Chris@82 133 T3 = LD(&(x[WS(rs, 4)]), ms, &(x[0]));
Chris@82 134 T4 = BYTWJ(&(W[TWVL * 6]), T3);
Chris@82 135 T6 = LD(&(x[WS(rs, 2)]), ms, &(x[0]));
Chris@82 136 T7 = BYTWJ(&(W[TWVL * 2]), T6);
Chris@82 137 }
Chris@82 138 Tg = VSUB(T2, T4);
Chris@82 139 Th = VSUB(T7, T9);
Chris@82 140 T5 = VADD(T2, T4);
Chris@82 141 Ta = VADD(T7, T9);
Chris@82 142 Td = VADD(T5, Ta);
Chris@82 143 }
Chris@82 144 ST(&(x[0]), VADD(Tc, Td), ms, &(x[0]));
Chris@82 145 {
Chris@82 146 V Ti, Tj, Tf, Tk, Tb, Te;
Chris@82 147 Ti = VBYI(VFMA(LDK(KP951056516), Tg, VMUL(LDK(KP587785252), Th)));
Chris@82 148 Tj = VBYI(VFNMS(LDK(KP587785252), Tg, VMUL(LDK(KP951056516), Th)));
Chris@82 149 Tb = VMUL(LDK(KP559016994), VSUB(T5, Ta));
Chris@82 150 Te = VFNMS(LDK(KP250000000), Td, Tc);
Chris@82 151 Tf = VADD(Tb, Te);
Chris@82 152 Tk = VSUB(Te, Tb);
Chris@82 153 ST(&(x[WS(rs, 1)]), VSUB(Tf, Ti), ms, &(x[WS(rs, 1)]));
Chris@82 154 ST(&(x[WS(rs, 3)]), VSUB(Tk, Tj), ms, &(x[WS(rs, 1)]));
Chris@82 155 ST(&(x[WS(rs, 4)]), VADD(Ti, Tf), ms, &(x[0]));
Chris@82 156 ST(&(x[WS(rs, 2)]), VADD(Tj, Tk), ms, &(x[0]));
Chris@82 157 }
Chris@82 158 }
Chris@82 159 }
Chris@82 160 VLEAVE();
Chris@82 161 }
Chris@82 162
Chris@82 163 static const tw_instr twinstr[] = {
Chris@82 164 VTW(0, 1),
Chris@82 165 VTW(0, 2),
Chris@82 166 VTW(0, 3),
Chris@82 167 VTW(0, 4),
Chris@82 168 {TW_NEXT, VL, 0}
Chris@82 169 };
Chris@82 170
Chris@82 171 static const ct_desc desc = { 5, XSIMD_STRING("t1fuv_5"), twinstr, &GENUS, {17, 11, 3, 0}, 0, 0, 0 };
Chris@82 172
Chris@82 173 void XSIMD(codelet_t1fuv_5) (planner *p) {
Chris@82 174 X(kdft_dit_register) (p, t1fuv_5, &desc);
Chris@82 175 }
Chris@82 176 #endif