comparison src/fftw-3.3.5/simd-support/simd-kcvi.h @ 42:2cd0e3b3e1fd

Current fftw source
author Chris Cannam
date Tue, 18 Oct 2016 13:40:26 +0100
parents
children
comparison
equal deleted inserted replaced
41:481f5f8c5634 42:2cd0e3b3e1fd
1 /*
2 * Copyright (c) 2003, 2007-11 Matteo Frigo
3 * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
4 *
5 * Knights Corner Vector Instruction support added by Romain Dolbeau.
6 * Romain Dolbeau hereby places his modifications in the public domain.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27
28 #if defined(FFTW_LDOUBLE) || defined(FFTW_QUAD)
29 #error "Knights Corner vector instructions only works in single or double precision"
30 #endif
31
32 #ifdef FFTW_SINGLE
33 # define DS(d,s) s /* single-precision option */
34 # define SUFF(name) name ## _ps
35 # define SCAL(x) x ## f
36 #else /* !FFTW_SINGLE */
37 # define DS(d,s) d /* double-precision option */
38 # define SUFF(name) name ## _pd
39 # define SCAL(x) x
40 #endif /* FFTW_SINGLE */
41
42 #define SIMD_SUFFIX _kcvi /* for renaming */
43 #define VL DS(4, 8) /* SIMD complex vector length */
44 #define SIMD_VSTRIDE_OKA(x) ((x) == 2)
45 #define SIMD_STRIDE_OKPAIR SIMD_STRIDE_OK
46
47 /* configuration ; KNF 0 0 0 1 0 1 */
48 #define KCVI_VBYI_SINGLE_USE_MUL 0
49 #define KCVI_VBYI_DOUBLE_USE_MUL 0
50 #define KCVI_LD_DOUBLE_USE_UNPACK 1
51 #define KCVI_ST_DOUBLE_USE_PACK 1
52 #define KCVI_ST2_DOUBLE_USE_STN2 0
53 #define KCVI_MULZ_USE_SWIZZLE 1
54
55 #include <immintrin.h>
56
57 typedef DS(__m512d, __m512) V;
58
59 #define VADD(a,b) SUFF(_mm512_add)(a,b)
60 #define VSUB(a,b) SUFF(_mm512_sub)(a,b)
61 #define VMUL(a,b) SUFF(_mm512_mul)(a,b)
62
63 #define VFMA(a, b, c) SUFF(_mm512_fmadd)(a, b, c) //VADD(c, VMUL(a, b))
64 #define VFMS(a, b, c) SUFF(_mm512_fmsub)(a, b, c) //VSUB(VMUL(a, b), c)
65 #define VFNMS(a, b, c) SUFF(_mm512_fnmadd)(a, b, c) //VSUB(c, VMUL(a, b))
66
67 #define LDK(x) x
68 #define VLIT(re, im) SUFF(_mm512_setr4)(im, re, im, re)
69 #define DVK(var, val) V var = SUFF(_mm512_set1)(val)
70
71 static inline V LDA(const R *x, INT ivs, const R *aligned_like) {
72 return SUFF(_mm512_load)(x);
73 }
74 static inline void STA(R *x, V v, INT ovs, const R *aligned_like) {
75 SUFF(_mm512_store)(x, v);
76 }
77
78 #if FFTW_SINGLE
79 #define VXOR(a,b) _mm512_xor_epi32(a,b)
80
81 static inline V LDu(const R *x, INT ivs, const R *aligned_like)
82 {
83 (void)aligned_like; /* UNUSED */
84 __m512i index = _mm512_set_epi32(7 * ivs + 1, 7 * ivs,
85 6 * ivs + 1, 6 * ivs,
86 5 * ivs + 1, 5 * ivs,
87 4 * ivs + 1, 4 * ivs,
88 3 * ivs + 1, 3 * ivs,
89 2 * ivs + 1, 2 * ivs,
90 1 * ivs + 1, 1 * ivs,
91 0 * ivs + 1, 0 * ivs);
92
93 return _mm512_i32gather_ps(index, x, _MM_SCALE_4);
94 }
95
96 static inline void STu(R *x, V v, INT ovs, const R *aligned_like)
97 {
98 (void)aligned_like; /* UNUSED */
99 __m512i index = _mm512_set_epi32(7 * ovs + 1, 7 * ovs,
100 6 * ovs + 1, 6 * ovs,
101 5 * ovs + 1, 5 * ovs,
102 4 * ovs + 1, 4 * ovs,
103 3 * ovs + 1, 3 * ovs,
104 2 * ovs + 1, 2 * ovs,
105 1 * ovs + 1, 1 * ovs,
106 0 * ovs + 1, 0 * ovs);
107
108 _mm512_i32scatter_ps(x, index, v, _MM_SCALE_4);
109 }
110
111 static inline V FLIP_RI(V x)
112 {
113 return (V)_mm512_shuffle_epi32((__m512i)x, _MM_PERM_CDAB);
114 }
115
116 #define VDUPH(a) (V)_mm512_shuffle_epi32((__m512i)a, _MM_PERM_DDBB);
117 #define VDUPL(a) (V)_mm512_shuffle_epi32((__m512i)a, _MM_PERM_CCAA);
118
119 #else /* !FFTW_SINGLE */
120 #define VXOR(a,b) _mm512_xor_epi64(a,b)
121
122 #if defined (KCVI_LD_DOUBLE_USE_UNPACK) && KCVI_LD_DOUBLE_USE_UNPACK
123 static inline V LDu(const R *x, INT ivs, const R *aligned_like)
124 {
125 (void)aligned_like; /* UNUSED */
126 V temp;
127 /* no need for hq here */
128 temp = _mm512_mask_loadunpacklo_pd(temp, 0x0003, x + (0 * ivs));
129 temp = _mm512_mask_loadunpacklo_pd(temp, 0x000c, x + (1 * ivs));
130 temp = _mm512_mask_loadunpacklo_pd(temp, 0x0030, x + (2 * ivs));
131 temp = _mm512_mask_loadunpacklo_pd(temp, 0x00c0, x + (3 * ivs));
132 return temp;
133 }
134 #else
135 static inline V LDu(const R *x, INT ivs, const R *aligned_like)
136 {
137 (void)aligned_like; /* UNUSED */
138 __declspec(align(64)) R temp[8];
139 int i;
140 for (i = 0 ; i < 4 ; i++) {
141 temp[i*2] = x[i * ivs];
142 temp[i*2+1] = x[i * ivs + 1];
143 }
144 return _mm512_load_pd(temp);
145 }
146 #endif
147
148 #if defined(KCVI_ST_DOUBLE_USE_PACK) && KCVI_ST_DOUBLE_USE_PACK
149 static inline void STu(R *x, V v, INT ovs, const R *aligned_like)
150 {
151 (void)aligned_like; /* UNUSED */
152 /* no need for hq here */
153 _mm512_mask_packstorelo_pd(x + (0 * ovs), 0x0003, v);
154 _mm512_mask_packstorelo_pd(x + (1 * ovs), 0x000c, v);
155 _mm512_mask_packstorelo_pd(x + (2 * ovs), 0x0030, v);
156 _mm512_mask_packstorelo_pd(x + (3 * ovs), 0x00c0, v);
157 }
158 #else
159 static inline void STu(R *x, V v, INT ovs, const R *aligned_like)
160 {
161 (void)aligned_like; /* UNUSED */
162 __declspec(align(64)) R temp[8];
163 int i;
164 _mm512_store_pd(temp, v);
165 for (i = 0 ; i < 4 ; i++) {
166 x[i * ovs] = temp[i*2];
167 x[i * ovs + 1] = temp[i*2+1];
168 }
169 }
170 #endif
171
172 static inline V FLIP_RI(V x)
173 {
174 return (V)_mm512_shuffle_epi32((__m512i)x, _MM_PERM_BADC);
175 }
176
177 #define VDUPH(a) (V)_mm512_shuffle_epi32((__m512i)a, _MM_PERM_DCDC);
178 #define VDUPL(a) (V)_mm512_shuffle_epi32((__m512i)a, _MM_PERM_BABA);
179
180 #endif /* FFTW_SINGLE */
181
182 #define LD LDu
183 #define ST STu
184
185 #ifdef FFTW_SINGLE
186 #define STM2(x, v, ovs, a) ST(x, v, ovs, a)
187 #define STN2(x, v0, v1, ovs) /* nop */
188
189 static inline void STM4(R *x, V v, INT ovs, const R *aligned_like)
190 {
191 (void)aligned_like; /* UNUSED */
192 __m512i index = _mm512_set_epi32(15 * ovs, 14 * ovs,
193 13 * ovs, 12 * ovs,
194 11 * ovs, 10 * ovs,
195 9 * ovs, 8 * ovs,
196 7 * ovs, 6 * ovs,
197 5 * ovs, 4 * ovs,
198 3 * ovs, 2 * ovs,
199 1 * ovs, 0 * ovs);
200
201 _mm512_i32scatter_ps(x, index, v, _MM_SCALE_4);
202 }
203 #define STN4(x, v0, v1, v2, v3, ovs) /* no-op */
204 #else /* !FFTW_SINGLE */
205 #if defined(KCVI_ST2_DOUBLE_USE_STN2) && KCVI_ST2_DOUBLE_USE_STN2
206 #define STM2(x, v, ovs, a) /* no-op */
207 static inline void STN2(R *x, V v0, V v1, INT ovs) {
208 /* we start
209 AB CD EF GH -> *x (2 DBL), ovs between complex
210 IJ KL MN OP -> *(x+2) (2DBL), ovs between complex
211 and we want
212 ABIJ EFMN -> *x (4 DBL), 2 * ovs between complex pairs
213 CDKL GHOP -> *(x+ovs) (4DBL), 2 * ovs between complex pairs
214 */
215 V x00 = (V)_mm512_mask_permute4f128_epi32((__m512i)v0, 0xF0F0, (__m512i)v1, _MM_PERM_CDAB);
216 V x01 = (V)_mm512_mask_permute4f128_epi32((__m512i)v1, 0x0F0F, (__m512i)v0, _MM_PERM_CDAB);
217 _mm512_mask_packstorelo_pd(x + (0 * ovs) + 0, 0x000F, x00);
218 /* _mm512_mask_packstorehi_pd(x + (0 * ovs) + 8, 0x000F, x00); */
219 _mm512_mask_packstorelo_pd(x + (2 * ovs) + 0, 0x00F0, x00);
220 /* _mm512_mask_packstorehi_pd(x + (2 * ovs) + 8, 0x00F0, x00); */
221 _mm512_mask_packstorelo_pd(x + (1 * ovs) + 0, 0x000F, x01);
222 /* _mm512_mask_packstorehi_pd(x + (1 * ovs) + 8, 0x000F, x01); */
223 _mm512_mask_packstorelo_pd(x + (3 * ovs) + 0, 0x00F0, x01);
224 /* _mm512_mask_packstorehi_pd(x + (3 * ovs) + 8, 0x00F0, x01); */
225 }
226 #else
227 #define STM2(x, v, ovs, a) ST(x, v, ovs, a)
228 #define STN2(x, v0, v1, ovs) /* nop */
229 #endif
230
231 static inline void STM4(R *x, V v, INT ovs, const R *aligned_like)
232 {
233 (void)aligned_like; /* UNUSED */
234 __m512i index = _mm512_set_epi32(0, 0, 0, 0, 0, 0, 0, 0,
235 7 * ovs, 6 * ovs,
236 5 * ovs, 4 * ovs,
237 3 * ovs, 2 * ovs,
238 1 * ovs, 0 * ovs);
239
240 _mm512_i32loscatter_pd(x, index, v, _MM_SCALE_8);
241 }
242 #define STN4(x, v0, v1, v2, v3, ovs) /* no-op */
243 #endif /* FFTW_SINGLE */
244
245 static inline V VFMAI(V b, V c) {
246 V mpmp = VLIT(SCAL(1.0), SCAL(-1.0));
247 return SUFF(_mm512_fmadd)(mpmp, SUFF(_mm512_swizzle)(b, _MM_SWIZ_REG_CDAB), c);
248 }
249
250 static inline V VFNMSI(V b, V c) {
251 V mpmp = VLIT(SCAL(1.0), SCAL(-1.0));
252 return SUFF(_mm512_fnmadd)(mpmp, SUFF(_mm512_swizzle)(b, _MM_SWIZ_REG_CDAB), c);
253 }
254
255 static inline V VFMACONJ(V b, V c) {
256 V pmpm = VLIT(SCAL(-1.0), SCAL(1.0));
257 return SUFF(_mm512_fmadd)(pmpm, b, c);
258 }
259
260 static inline V VFMSCONJ(V b, V c) {
261 V pmpm = VLIT(SCAL(-1.0), SCAL(1.0));
262 return SUFF(_mm512_fmsub)(pmpm, b, c);
263 }
264
265 static inline V VFNMSCONJ(V b, V c) {
266 V pmpm = VLIT(SCAL(-1.0), SCAL(1.0));
267 return SUFF(_mm512_fnmadd)(pmpm, b, c);
268 }
269
270 static inline V VCONJ(V x)
271 {
272 V pmpm = VLIT(SCAL(-0.0), SCAL(0.0));
273 return (V)VXOR((__m512i)pmpm, (__m512i)x);
274 }
275
276 #ifdef FFTW_SINGLE
277 #if defined(KCVI_VBYI_SINGLE_USE_MUL) && KCVI_VBYI_SINGLE_USE_MUL
278 /* untested */
279 static inline V VBYI(V x)
280 {
281 V mpmp = VLIT(SCAL(1.0), SCAL(-1.0));
282 return _mm512_mul_ps(mpmp, _mm512_swizzle_ps(x, _MM_SWIZ_REG_CDAB));
283 }
284 #else
285 static inline V VBYI(V x)
286 {
287 return FLIP_RI(VCONJ(x));
288 }
289 #endif
290 #else /* !FFTW_SINGLE */
291 #if defined(KCVI_VBYI_DOUBLE_USE_MUL) && KCVI_VBYI_DOUBLE_USE_MUL
292 /* on KNF, using mul_pd is slower than shuf128x32 + xor */
293 static inline V VBYI(V x)
294 {
295 V mpmp = VLIT(SCAL(1.0), SCAL(-1.0));
296 return _mm512_mul_pd(mpmp, _mm512_swizzle_pd(x, _MM_SWIZ_REG_CDAB));
297 }
298 #else
299 static inline V VBYI(V x)
300 {
301 return FLIP_RI(VCONJ(x));
302 }
303 #endif
304 #endif /* FFTW_SINGLE */
305
306 #if defined(KCVI_MULZ_USE_SWIZZLE) && KCVI_MULZ_USE_SWIZZLE
307 static inline V VZMUL(V tx, V sr) /* (a,b) (c,d) */
308 {
309 V ac = SUFF(_mm512_mul)(tx, sr); /* (a*c,b*d) */
310 V ad = SUFF(_mm512_mul)(tx, SUFF(_mm512_swizzle)(sr, _MM_SWIZ_REG_CDAB)); /* (a*d,b*c) */
311 V acmbd = SUFF(_mm512_sub)(ac, SUFF(_mm512_swizzle)(ac, _MM_SWIZ_REG_CDAB)); /* (a*c-b*d, b*d-a*c) */
312 V res = SUFF(_mm512_mask_add)(acmbd, DS(0x00aa,0xaaaa), ad, SUFF(_mm512_swizzle)(ad, _MM_SWIZ_REG_CDAB)); /* ([a*c+b*c] a*c-b*d, b*c+a*d) */
313 return res;
314 }
315 static inline V VZMULJ(V tx, V sr) /* (a,b) (c,d) */
316 {
317 V ac = SUFF(_mm512_mul)(tx, sr); /* (a*c,b*d) */
318 V ad = SUFF(_mm512_mul)(tx, SUFF(_mm512_swizzle)(sr, _MM_SWIZ_REG_CDAB)); /* (a*d,b*c) */
319 V acmbd = SUFF(_mm512_add)(ac, SUFF(_mm512_swizzle)(ac, _MM_SWIZ_REG_CDAB)); /* (a*c+b*d, b*d+a*c) */
320 V res = SUFF(_mm512_mask_subr)(acmbd, DS(0x00aa,0xaaaa), ad, SUFF(_mm512_swizzle)(ad, _MM_SWIZ_REG_CDAB)); /* ([a*c+b*c] a*c+b*d, a*d-b*c) */
321 return res;
322 }
323 static inline V VZMULI(V tx, V sr) /* (a,b) (c,d) */
324 {
325 DVK(zero, SCAL(0.0));
326 V ac = SUFF(_mm512_mul)(tx, sr); /* (a*c,b*d) */
327 V ad = SUFF(_mm512_fnmadd)(tx, SUFF(_mm512_swizzle)(sr, _MM_SWIZ_REG_CDAB), zero); /* (-a*d,-b*c) */
328 V acmbd = SUFF(_mm512_subr)(ac, SUFF(_mm512_swizzle)(ac, _MM_SWIZ_REG_CDAB)); /* (b*d-a*c, a*c-b*d) */
329 V res = SUFF(_mm512_mask_add)(acmbd, DS(0x0055,0x5555), ad, SUFF(_mm512_swizzle)(ad, _MM_SWIZ_REG_CDAB)); /* (-a*d-b*c, a*c-b*d) */
330 return res;
331 }
332 static inline V VZMULIJ(V tx, V sr) /* (a,b) (c,d) */
333 {
334 DVK(zero, SCAL(0.0));
335 V ac = SUFF(_mm512_mul)(tx, sr); /* (a*c,b*d) */
336 V ad = SUFF(_mm512_fnmadd)(tx, SUFF(_mm512_swizzle)(sr, _MM_SWIZ_REG_CDAB), zero); /* (-a*d,-b*c) */
337 V acmbd = SUFF(_mm512_add)(ac, SUFF(_mm512_swizzle)(ac, _MM_SWIZ_REG_CDAB)); /* (b*d+a*c, a*c+b*d) */
338 V res = SUFF(_mm512_mask_sub)(acmbd, DS(0x0055,0x5555), ad, SUFF(_mm512_swizzle)(ad, _MM_SWIZ_REG_CDAB)); /* (-a*d+b*c, a*c-b*d) */
339 return res;
340 }
341 #else
342 static inline V VZMUL(V tx, V sr)
343 {
344 V tr = VDUPL(tx);
345 V ti = VDUPH(tx);
346 tr = VMUL(sr, tr);
347 sr = VBYI(sr);
348 return VFMA(ti, sr, tr);
349 }
350
351 static inline V VZMULJ(V tx, V sr)
352 {
353 V tr = VDUPL(tx);
354 V ti = VDUPH(tx);
355 tr = VMUL(sr, tr);
356 sr = VBYI(sr);
357 return VFNMS(ti, sr, tr);
358 }
359
360 static inline V VZMULI(V tx, V sr)
361 {
362 V tr = VDUPL(tx);
363 V ti = VDUPH(tx);
364 ti = VMUL(ti, sr);
365 sr = VBYI(sr);
366 return VFMS(tr, sr, ti);
367 }
368
369 static inline V VZMULIJ(V tx, V sr)
370 {
371 V tr = VDUPL(tx);
372 V ti = VDUPH(tx);
373 ti = VMUL(ti, sr);
374 sr = VBYI(sr);
375 return VFMA(tr, sr, ti);
376 }
377 #endif
378
379 /* twiddle storage #1: compact, slower */
380 #ifdef FFTW_SINGLE
381 # define VTW1(v,x) {TW_CEXP, v, x}, {TW_CEXP, v+1, x}, {TW_CEXP, v+2, x}, {TW_CEXP, v+3, x}, {TW_CEXP, v+4, x}, {TW_CEXP, v+5, x}, {TW_CEXP, v+6, x}, {TW_CEXP, v+7, x}
382 #else /* !FFTW_SINGLE */
383 # define VTW1(v,x) {TW_CEXP, v, x}, {TW_CEXP, v+1, x}, {TW_CEXP, v+2, x}, {TW_CEXP, v+3, x}
384 #endif /* FFTW_SINGLE */
385 #define TWVL1 (VL)
386
387 static inline V BYTW1(const R *t, V sr)
388 {
389 return VZMUL(LDA(t, 2, t), sr);
390 }
391
392 static inline V BYTWJ1(const R *t, V sr)
393 {
394 return VZMULJ(LDA(t, 2, t), sr);
395 }
396
397 /* twiddle storage #2: twice the space, faster (when in cache) */
398 #ifdef FFTW_SINGLE
399 # define VTW2(v,x) \
400 {TW_COS, v , x}, {TW_COS, v , x}, {TW_COS, v+1, x}, {TW_COS, v+1, x}, \
401 {TW_COS, v+2, x}, {TW_COS, v+2, x}, {TW_COS, v+3, x}, {TW_COS, v+3, x}, \
402 {TW_COS, v+4, x}, {TW_COS, v+4, x}, {TW_COS, v+5, x}, {TW_COS, v+5, x}, \
403 {TW_COS, v+6, x}, {TW_COS, v+6, x}, {TW_COS, v+7, x}, {TW_COS, v+7, x}, \
404 {TW_SIN, v , -x}, {TW_SIN, v , x}, {TW_SIN, v+1, -x}, {TW_SIN, v+1, x}, \
405 {TW_SIN, v+2, -x}, {TW_SIN, v+2, x}, {TW_SIN, v+3, -x}, {TW_SIN, v+3, x}, \
406 {TW_SIN, v+4, -x}, {TW_SIN, v+4, x}, {TW_SIN, v+5, -x}, {TW_SIN, v+5, x}, \
407 {TW_SIN, v+6, -x}, {TW_SIN, v+6, x}, {TW_SIN, v+7, -x}, {TW_SIN, v+7, x}
408 #else /* !FFTW_SINGLE */
409 # define VTW2(v,x) \
410 {TW_COS, v , x}, {TW_COS, v , x}, {TW_COS, v+1, x}, {TW_COS, v+1, x}, \
411 {TW_COS, v+2, x}, {TW_COS, v+2, x}, {TW_COS, v+3, x}, {TW_COS, v+3, x}, \
412 {TW_SIN, v , -x}, {TW_SIN, v , x}, {TW_SIN, v+1, -x}, {TW_SIN, v+1, x}, \
413 {TW_SIN, v+2, -x}, {TW_SIN, v+2, x}, {TW_SIN, v+3, -x}, {TW_SIN, v+3, x}
414 #endif /* FFTW_SINGLE */
415 #define TWVL2 (2 * VL)
416
417 static inline V BYTW2(const R *t, V sr)
418 {
419 const V *twp = (const V *)t;
420 V si = FLIP_RI(sr);
421 V tr = twp[0], ti = twp[1];
422 /* V tr = LD(t, 2, t), ti = LD(t + VL, 2, t + VL); */
423 return VFMA(tr, sr, VMUL(ti, si));
424 }
425
426 static inline V BYTWJ2(const R *t, V sr)
427 {
428 const V *twp = (const V *)t;
429 V si = FLIP_RI(sr);
430 V tr = twp[0], ti = twp[1];
431 /* V tr = LD(t, 2, t), ti = LD(t + VL, 2, t + VL); */
432 return VFNMS(ti, si, VMUL(tr, sr));
433 }
434
435 /* twiddle storage #3 */
436 #define VTW3(v,x) VTW1(v,x)
437 #define TWVL3 TWVL1
438
439 /* twiddle storage for split arrays */
440 #ifdef FFTW_SINGLE
441 # define VTWS(v,x) \
442 {TW_COS, v , x}, {TW_COS, v+1 , x}, {TW_COS, v+2 , x}, {TW_COS, v+3 , x}, \
443 {TW_COS, v+4 , x}, {TW_COS, v+5 , x}, {TW_COS, v+6 , x}, {TW_COS, v+7 , x}, \
444 {TW_COS, v+8 , x}, {TW_COS, v+9 , x}, {TW_COS, v+10, x}, {TW_COS, v+11, x}, \
445 {TW_COS, v+12, x}, {TW_COS, v+13, x}, {TW_COS, v+14, x}, {TW_COS, v+15, x}, \
446 {TW_SIN, v , x}, {TW_SIN, v+1 , x}, {TW_SIN, v+2 , x}, {TW_SIN, v+3 , x}, \
447 {TW_SIN, v+4 , x}, {TW_SIN, v+5 , x}, {TW_SIN, v+6 , x}, {TW_SIN, v+7 , x}, \
448 {TW_SIN, v+8 , x}, {TW_SIN, v+9 , x}, {TW_SIN, v+10, x}, {TW_SIN, v+11, x}, \
449 {TW_SIN, v+12, x}, {TW_SIN, v+13, x}, {TW_SIN, v+14, x}, {TW_SIN, v+15, x}
450 #else /* !FFTW_SINGLE */
451 # define VTWS(v,x) \
452 {TW_COS, v , x}, {TW_COS, v+1, x}, {TW_COS, v+2, x}, {TW_COS, v+3, x}, \
453 {TW_COS, v+4, x}, {TW_COS, v+5, x}, {TW_COS, v+6, x}, {TW_COS, v+7, x}, \
454 {TW_SIN, v , x}, {TW_SIN, v+1, x}, {TW_SIN, v+2, x}, {TW_SIN, v+3, x}, \
455 {TW_SIN, v+4, x}, {TW_SIN, v+5, x}, {TW_SIN, v+6, x}, {TW_SIN, v+7, x}
456 #endif /* FFTW_SINGLE */
457 #define TWVLS (2 * VL)
458
459 #define VLEAVE() /* nothing */
460
461 #include "simd-common.h"