annotate src/fftw-3.3.5/dft/simd/common/t1bv_5.c @ 83:ae30d91d2ffe

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