annotate src/fftw-3.3.8/simd-support/simd-avx2.h @ 84:08ae793730bd

Add null config files
author Chris Cannam
date Mon, 02 Mar 2020 14:03:47 +0000
parents d0c2a83c1364
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 * Modifications by Romain Dolbeau & Erik Lindahl, derived from simd-avx.h
Chris@82 6 * Romain Dolbeau hereby places his modifications in the public domain.
Chris@82 7 * Erik Lindahl hereby places his modifications in the public domain.
Chris@82 8 *
Chris@82 9 * This program is free software; you can redistribute it and/or modify
Chris@82 10 * it under the terms of the GNU General Public License as published by
Chris@82 11 * the Free Software Foundation; either version 2 of the License, or
Chris@82 12 * (at your option) any later version.
Chris@82 13 *
Chris@82 14 * This program is distributed in the hope that it will be useful,
Chris@82 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@82 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@82 17 * GNU General Public License for more details.
Chris@82 18 *
Chris@82 19 * You should have received a copy of the GNU General Public License
Chris@82 20 * along with this program; if not, write to the Free Software
Chris@82 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Chris@82 22 *
Chris@82 23 */
Chris@82 24
Chris@82 25 #if defined(FFTW_LDOUBLE) || defined(FFTW_QUAD)
Chris@82 26 #error "AVX2 only works in single or double precision"
Chris@82 27 #endif
Chris@82 28
Chris@82 29 #ifdef FFTW_SINGLE
Chris@82 30 # define DS(d,s) s /* single-precision option */
Chris@82 31 # define SUFF(name) name ## s
Chris@82 32 #else
Chris@82 33 # define DS(d,s) d /* double-precision option */
Chris@82 34 # define SUFF(name) name ## d
Chris@82 35 #endif
Chris@82 36
Chris@82 37 #define SIMD_SUFFIX _avx2 /* for renaming */
Chris@82 38 #define VL DS(2, 4) /* SIMD complex vector length */
Chris@82 39 #define SIMD_VSTRIDE_OKA(x) ((x) == 2)
Chris@82 40 #define SIMD_STRIDE_OKPAIR SIMD_STRIDE_OK
Chris@82 41
Chris@82 42 #if defined(__GNUC__) && !defined(__AVX2__) /* sanity check */
Chris@82 43 #error "compiling simd-avx2.h without avx2 support"
Chris@82 44 #endif
Chris@82 45
Chris@82 46 #ifdef _MSC_VER
Chris@82 47 #ifndef inline
Chris@82 48 #define inline __inline
Chris@82 49 #endif
Chris@82 50 #endif
Chris@82 51
Chris@82 52 #include <immintrin.h>
Chris@82 53
Chris@82 54 typedef DS(__m256d, __m256) V;
Chris@82 55 #define VADD SUFF(_mm256_add_p)
Chris@82 56 #define VSUB SUFF(_mm256_sub_p)
Chris@82 57 #define VMUL SUFF(_mm256_mul_p)
Chris@82 58 #define VXOR SUFF(_mm256_xor_p)
Chris@82 59 #define VSHUF SUFF(_mm256_shuffle_p)
Chris@82 60 #define VPERM1 SUFF(_mm256_permute_p)
Chris@82 61
Chris@82 62 #define SHUFVALD(fp0,fp1) \
Chris@82 63 (((fp1) << 3) | ((fp0) << 2) | ((fp1) << 1) | ((fp0)))
Chris@82 64 #define SHUFVALS(fp0,fp1,fp2,fp3) \
Chris@82 65 (((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | ((fp0)))
Chris@82 66
Chris@82 67 #define VDUPL(x) DS(_mm256_movedup_pd(x), _mm256_moveldup_ps(x))
Chris@82 68 #define VDUPH(x) DS(_mm256_permute_pd(x,SHUFVALD(1,1)), _mm256_movehdup_ps(x))
Chris@82 69
Chris@82 70 #define VLIT(x0, x1) DS(_mm256_set_pd(x0, x1, x0, x1), _mm256_set_ps(x0, x1, x0, x1, x0, x1, x0, x1))
Chris@82 71 #define DVK(var, val) V var = VLIT(val, val)
Chris@82 72 #define LDK(x) x
Chris@82 73
Chris@82 74 static inline V LDA(const R *x, INT ivs, const R *aligned_like)
Chris@82 75 {
Chris@82 76 (void)aligned_like; /* UNUSED */
Chris@82 77 (void)ivs; /* UNUSED */
Chris@82 78 return SUFF(_mm256_loadu_p)(x);
Chris@82 79 }
Chris@82 80
Chris@82 81 static inline void STA(R *x, V v, INT ovs, const R *aligned_like)
Chris@82 82 {
Chris@82 83 (void)aligned_like; /* UNUSED */
Chris@82 84 (void)ovs; /* UNUSED */
Chris@82 85 SUFF(_mm256_storeu_p)(x, v);
Chris@82 86 }
Chris@82 87
Chris@82 88 #if FFTW_SINGLE
Chris@82 89
Chris@82 90 # ifdef _MSC_VER
Chris@82 91 /* Temporarily disable the warning "uninitialized local variable
Chris@82 92 'name' used" and runtime checks for using a variable before it is
Chris@82 93 defined which is erroneously triggered by the LOADL0 / LOADH macros
Chris@82 94 as they only modify VAL partly each. */
Chris@82 95 # ifndef __INTEL_COMPILER
Chris@82 96 # pragma warning(disable : 4700)
Chris@82 97 # pragma runtime_checks("u", off)
Chris@82 98 # endif
Chris@82 99 # endif
Chris@82 100 # ifdef __INTEL_COMPILER
Chris@82 101 # pragma warning(disable : 592)
Chris@82 102 # endif
Chris@82 103
Chris@82 104 #define LOADH(addr, val) _mm_loadh_pi(val, (const __m64 *)(addr))
Chris@82 105 #define LOADL(addr, val) _mm_loadl_pi(val, (const __m64 *)(addr))
Chris@82 106 #define STOREH(addr, val) _mm_storeh_pi((__m64 *)(addr), val)
Chris@82 107 #define STOREL(addr, val) _mm_storel_pi((__m64 *)(addr), val)
Chris@82 108
Chris@82 109 static inline V LD(const R *x, INT ivs, const R *aligned_like)
Chris@82 110 {
Chris@82 111 __m128 l0, l1, h0, h1;
Chris@82 112 (void)aligned_like; /* UNUSED */
Chris@82 113 #if defined(__ICC) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)
Chris@82 114 l0 = LOADL(x, SUFF(_mm_undefined_p)());
Chris@82 115 l1 = LOADL(x + ivs, SUFF(_mm_undefined_p)());
Chris@82 116 h0 = LOADL(x + 2*ivs, SUFF(_mm_undefined_p)());
Chris@82 117 h1 = LOADL(x + 3*ivs, SUFF(_mm_undefined_p)());
Chris@82 118 #else
Chris@82 119 l0 = LOADL(x, l0);
Chris@82 120 l1 = LOADL(x + ivs, l1);
Chris@82 121 h0 = LOADL(x + 2*ivs, h0);
Chris@82 122 h1 = LOADL(x + 3*ivs, h1);
Chris@82 123 #endif
Chris@82 124 l0 = SUFF(_mm_movelh_p)(l0,l1);
Chris@82 125 h0 = SUFF(_mm_movelh_p)(h0,h1);
Chris@82 126 return _mm256_insertf128_ps(_mm256_castps128_ps256(l0), h0, 1);
Chris@82 127 }
Chris@82 128
Chris@82 129 # ifdef _MSC_VER
Chris@82 130 # ifndef __INTEL_COMPILER
Chris@82 131 # pragma warning(default : 4700)
Chris@82 132 # pragma runtime_checks("u", restore)
Chris@82 133 # endif
Chris@82 134 # endif
Chris@82 135 # ifdef __INTEL_COMPILER
Chris@82 136 # pragma warning(default : 592)
Chris@82 137 # endif
Chris@82 138
Chris@82 139 static inline void ST(R *x, V v, INT ovs, const R *aligned_like)
Chris@82 140 {
Chris@82 141 __m128 h = _mm256_extractf128_ps(v, 1);
Chris@82 142 __m128 l = _mm256_castps256_ps128(v);
Chris@82 143 (void)aligned_like; /* UNUSED */
Chris@82 144 /* WARNING: the extra_iter hack depends upon STOREL occurring
Chris@82 145 after STOREH */
Chris@82 146 STOREH(x + 3*ovs, h);
Chris@82 147 STOREL(x + 2*ovs, h);
Chris@82 148 STOREH(x + ovs, l);
Chris@82 149 STOREL(x, l);
Chris@82 150 }
Chris@82 151
Chris@82 152 #define STM2(x, v, ovs, aligned_like) /* no-op */
Chris@82 153 static inline void STN2(R *x, V v0, V v1, INT ovs)
Chris@82 154 {
Chris@82 155 V x0 = VSHUF(v0, v1, SHUFVALS(0, 1, 0, 1));
Chris@82 156 V x1 = VSHUF(v0, v1, SHUFVALS(2, 3, 2, 3));
Chris@82 157 __m128 h0 = _mm256_extractf128_ps(x0, 1);
Chris@82 158 __m128 l0 = _mm256_castps256_ps128(x0);
Chris@82 159 __m128 h1 = _mm256_extractf128_ps(x1, 1);
Chris@82 160 __m128 l1 = _mm256_castps256_ps128(x1);
Chris@82 161 *(__m128 *)(x + 3*ovs) = h1;
Chris@82 162 *(__m128 *)(x + 2*ovs) = h0;
Chris@82 163 *(__m128 *)(x + 1*ovs) = l1;
Chris@82 164 *(__m128 *)(x + 0*ovs) = l0;
Chris@82 165 }
Chris@82 166
Chris@82 167 #define STM4(x, v, ovs, aligned_like) /* no-op */
Chris@82 168 #define STN4(x, v0, v1, v2, v3, ovs) \
Chris@82 169 { \
Chris@82 170 V xxx0, xxx1, xxx2, xxx3; \
Chris@82 171 V yyy0, yyy1, yyy2, yyy3; \
Chris@82 172 xxx0 = _mm256_unpacklo_ps(v0, v2); \
Chris@82 173 xxx1 = _mm256_unpackhi_ps(v0, v2); \
Chris@82 174 xxx2 = _mm256_unpacklo_ps(v1, v3); \
Chris@82 175 xxx3 = _mm256_unpackhi_ps(v1, v3); \
Chris@82 176 yyy0 = _mm256_unpacklo_ps(xxx0, xxx2); \
Chris@82 177 yyy1 = _mm256_unpackhi_ps(xxx0, xxx2); \
Chris@82 178 yyy2 = _mm256_unpacklo_ps(xxx1, xxx3); \
Chris@82 179 yyy3 = _mm256_unpackhi_ps(xxx1, xxx3); \
Chris@82 180 *(__m128 *)(x + 0 * ovs) = _mm256_castps256_ps128(yyy0); \
Chris@82 181 *(__m128 *)(x + 4 * ovs) = _mm256_extractf128_ps(yyy0, 1); \
Chris@82 182 *(__m128 *)(x + 1 * ovs) = _mm256_castps256_ps128(yyy1); \
Chris@82 183 *(__m128 *)(x + 5 * ovs) = _mm256_extractf128_ps(yyy1, 1); \
Chris@82 184 *(__m128 *)(x + 2 * ovs) = _mm256_castps256_ps128(yyy2); \
Chris@82 185 *(__m128 *)(x + 6 * ovs) = _mm256_extractf128_ps(yyy2, 1); \
Chris@82 186 *(__m128 *)(x + 3 * ovs) = _mm256_castps256_ps128(yyy3); \
Chris@82 187 *(__m128 *)(x + 7 * ovs) = _mm256_extractf128_ps(yyy3, 1); \
Chris@82 188 }
Chris@82 189
Chris@82 190 #else
Chris@82 191 static inline __m128d VMOVAPD_LD(const R *x)
Chris@82 192 {
Chris@82 193 /* gcc-4.6 miscompiles the combination _mm256_castpd128_pd256(VMOVAPD_LD(x))
Chris@82 194 into a 256-bit vmovapd, which requires 32-byte aligment instead of
Chris@82 195 16-byte alignment.
Chris@82 196
Chris@82 197 Force the use of vmovapd via asm until compilers stabilize.
Chris@82 198 */
Chris@82 199 #if defined(__GNUC__)
Chris@82 200 __m128d var;
Chris@82 201 __asm__("vmovapd %1, %0\n" : "=x"(var) : "m"(x[0]));
Chris@82 202 return var;
Chris@82 203 #else
Chris@82 204 return *(const __m128d *)x;
Chris@82 205 #endif
Chris@82 206 }
Chris@82 207
Chris@82 208 static inline V LD(const R *x, INT ivs, const R *aligned_like)
Chris@82 209 {
Chris@82 210 V var;
Chris@82 211 (void)aligned_like; /* UNUSED */
Chris@82 212 var = _mm256_castpd128_pd256(VMOVAPD_LD(x));
Chris@82 213 var = _mm256_insertf128_pd(var, *(const __m128d *)(x+ivs), 1);
Chris@82 214 return var;
Chris@82 215 }
Chris@82 216
Chris@82 217 static inline void ST(R *x, V v, INT ovs, const R *aligned_like)
Chris@82 218 {
Chris@82 219 (void)aligned_like; /* UNUSED */
Chris@82 220 /* WARNING: the extra_iter hack depends upon the store of the low
Chris@82 221 part occurring after the store of the high part */
Chris@82 222 *(__m128d *)(x + ovs) = _mm256_extractf128_pd(v, 1);
Chris@82 223 *(__m128d *)x = _mm256_castpd256_pd128(v);
Chris@82 224 }
Chris@82 225
Chris@82 226
Chris@82 227 #define STM2 ST
Chris@82 228 #define STN2(x, v0, v1, ovs) /* nop */
Chris@82 229 #define STM4(x, v, ovs, aligned_like) /* no-op */
Chris@82 230
Chris@82 231 /* STN4 is a macro, not a function, thanks to Visual C++ developers
Chris@82 232 deciding "it would be infrequent that people would want to pass more
Chris@82 233 than 3 [__m128 parameters] by value." Even though the comment
Chris@82 234 was made about __m128 parameters, it appears to apply to __m256
Chris@82 235 parameters as well. */
Chris@82 236 #define STN4(x, v0, v1, v2, v3, ovs) \
Chris@82 237 { \
Chris@82 238 V xxx0, xxx1, xxx2, xxx3; \
Chris@82 239 xxx0 = _mm256_unpacklo_pd(v0, v1); \
Chris@82 240 xxx1 = _mm256_unpackhi_pd(v0, v1); \
Chris@82 241 xxx2 = _mm256_unpacklo_pd(v2, v3); \
Chris@82 242 xxx3 = _mm256_unpackhi_pd(v2, v3); \
Chris@82 243 STA(x, _mm256_permute2f128_pd(xxx0, xxx2, 0x20), 0, 0); \
Chris@82 244 STA(x + ovs, _mm256_permute2f128_pd(xxx1, xxx3, 0x20), 0, 0); \
Chris@82 245 STA(x + 2 * ovs, _mm256_permute2f128_pd(xxx0, xxx2, 0x31), 0, 0); \
Chris@82 246 STA(x + 3 * ovs, _mm256_permute2f128_pd(xxx1, xxx3, 0x31), 0, 0); \
Chris@82 247 }
Chris@82 248 #endif
Chris@82 249
Chris@82 250 static inline V FLIP_RI(V x)
Chris@82 251 {
Chris@82 252 return VPERM1(x, DS(SHUFVALD(1, 0), SHUFVALS(1, 0, 3, 2)));
Chris@82 253 }
Chris@82 254
Chris@82 255 static inline V VCONJ(V x)
Chris@82 256 {
Chris@82 257 /* Produce a SIMD vector[VL] of (0 + -0i).
Chris@82 258
Chris@82 259 We really want to write this:
Chris@82 260
Chris@82 261 V pmpm = VLIT(-0.0, 0.0);
Chris@82 262
Chris@82 263 but historically some compilers have ignored the distiction
Chris@82 264 between +0 and -0. It looks like 'gcc-8 -fast-math' treats -0
Chris@82 265 as 0 too.
Chris@82 266 */
Chris@82 267 union uvec {
Chris@82 268 unsigned u[8];
Chris@82 269 V v;
Chris@82 270 };
Chris@82 271 static const union uvec pmpm = {
Chris@82 272 #ifdef FFTW_SINGLE
Chris@82 273 { 0x00000000, 0x80000000, 0x00000000, 0x80000000,
Chris@82 274 0x00000000, 0x80000000, 0x00000000, 0x80000000 }
Chris@82 275 #else
Chris@82 276 { 0x00000000, 0x00000000, 0x00000000, 0x80000000,
Chris@82 277 0x00000000, 0x00000000, 0x00000000, 0x80000000 }
Chris@82 278 #endif
Chris@82 279 };
Chris@82 280 return VXOR(pmpm.v, x);
Chris@82 281 }
Chris@82 282
Chris@82 283 static inline V VBYI(V x)
Chris@82 284 {
Chris@82 285 return FLIP_RI(VCONJ(x));
Chris@82 286 }
Chris@82 287
Chris@82 288 /* FMA support */
Chris@82 289 #define VFMA SUFF(_mm256_fmadd_p)
Chris@82 290 #define VFNMS SUFF(_mm256_fnmadd_p)
Chris@82 291 #define VFMS SUFF(_mm256_fmsub_p)
Chris@82 292 #define VFMAI(b, c) SUFF(_mm256_addsub_p)(c, FLIP_RI(b)) /* VADD(c, VBYI(b)) */
Chris@82 293 #define VFNMSI(b, c) VSUB(c, VBYI(b))
Chris@82 294 #define VFMACONJ(b,c) VADD(VCONJ(b),c)
Chris@82 295 #define VFMSCONJ(b,c) VSUB(VCONJ(b),c)
Chris@82 296 #define VFNMSCONJ(b,c) SUFF(_mm256_addsub_p)(c, b) /* VSUB(c, VCONJ(b)) */
Chris@82 297
Chris@82 298 static inline V VZMUL(V tx, V sr)
Chris@82 299 {
Chris@82 300 /* V tr = VDUPL(tx); */
Chris@82 301 /* V ti = VDUPH(tx); */
Chris@82 302 /* tr = VMUL(sr, tr); */
Chris@82 303 /* sr = VBYI(sr); */
Chris@82 304 /* return VFMA(ti, sr, tr); */
Chris@82 305 return SUFF(_mm256_fmaddsub_p)(sr, VDUPL(tx), VMUL(FLIP_RI(sr), VDUPH(tx)));
Chris@82 306 }
Chris@82 307
Chris@82 308 static inline V VZMULJ(V tx, V sr)
Chris@82 309 {
Chris@82 310 /* V tr = VDUPL(tx); */
Chris@82 311 /* V ti = VDUPH(tx); */
Chris@82 312 /* tr = VMUL(sr, tr); */
Chris@82 313 /* sr = VBYI(sr); */
Chris@82 314 /* return VFNMS(ti, sr, tr); */
Chris@82 315 return SUFF(_mm256_fmsubadd_p)(sr, VDUPL(tx), VMUL(FLIP_RI(sr), VDUPH(tx)));
Chris@82 316 }
Chris@82 317
Chris@82 318 static inline V VZMULI(V tx, V sr)
Chris@82 319 {
Chris@82 320 V tr = VDUPL(tx);
Chris@82 321 V ti = VDUPH(tx);
Chris@82 322 ti = VMUL(ti, sr);
Chris@82 323 sr = VBYI(sr);
Chris@82 324 return VFMS(tr, sr, ti);
Chris@82 325 /*
Chris@82 326 * Keep the old version
Chris@82 327 * (2 permute, 1 shuffle, 1 constant load (L1), 1 xor, 2 fp), since the below FMA one
Chris@82 328 * would be 2 permute, 1 shuffle, 1 xor (setzero), 3 fp), but with a longer pipeline.
Chris@82 329 *
Chris@82 330 * Alternative new fma version:
Chris@82 331 * return SUFF(_mm256_addsub_p)(SUFF(_mm256_fnmadd_p)(sr, VDUPH(tx), SUFF(_mm256_setzero_p)()),
Chris@82 332 * VMUL(FLIP_RI(sr), VDUPL(tx)));
Chris@82 333 */
Chris@82 334 }
Chris@82 335
Chris@82 336 static inline V VZMULIJ(V tx, V sr)
Chris@82 337 {
Chris@82 338 /* V tr = VDUPL(tx); */
Chris@82 339 /* V ti = VDUPH(tx); */
Chris@82 340 /* ti = VMUL(ti, sr); */
Chris@82 341 /* sr = VBYI(sr); */
Chris@82 342 /* return VFMA(tr, sr, ti); */
Chris@82 343 return SUFF(_mm256_fmaddsub_p)(sr, VDUPH(tx), VMUL(FLIP_RI(sr), VDUPL(tx)));
Chris@82 344 }
Chris@82 345
Chris@82 346 /* twiddle storage #1: compact, slower */
Chris@82 347 #ifdef FFTW_SINGLE
Chris@82 348 # define VTW1(v,x) {TW_CEXP, v, x}, {TW_CEXP, v+1, x}, {TW_CEXP, v+2, x}, {TW_CEXP, v+3, x}
Chris@82 349 #else
Chris@82 350 # define VTW1(v,x) {TW_CEXP, v, x}, {TW_CEXP, v+1, x}
Chris@82 351 #endif
Chris@82 352 #define TWVL1 (VL)
Chris@82 353
Chris@82 354 static inline V BYTW1(const R *t, V sr)
Chris@82 355 {
Chris@82 356 return VZMUL(LDA(t, 2, t), sr);
Chris@82 357 }
Chris@82 358
Chris@82 359 static inline V BYTWJ1(const R *t, V sr)
Chris@82 360 {
Chris@82 361 return VZMULJ(LDA(t, 2, t), sr);
Chris@82 362 }
Chris@82 363
Chris@82 364 /* twiddle storage #2: twice the space, faster (when in cache) */
Chris@82 365 #ifdef FFTW_SINGLE
Chris@82 366 # define VTW2(v,x) \
Chris@82 367 {TW_COS, v, x}, {TW_COS, v, x}, {TW_COS, v+1, x}, {TW_COS, v+1, x}, \
Chris@82 368 {TW_COS, v+2, x}, {TW_COS, v+2, x}, {TW_COS, v+3, x}, {TW_COS, v+3, x}, \
Chris@82 369 {TW_SIN, v, -x}, {TW_SIN, v, x}, {TW_SIN, v+1, -x}, {TW_SIN, v+1, x}, \
Chris@82 370 {TW_SIN, v+2, -x}, {TW_SIN, v+2, x}, {TW_SIN, v+3, -x}, {TW_SIN, v+3, x}
Chris@82 371 #else
Chris@82 372 # define VTW2(v,x) \
Chris@82 373 {TW_COS, v, x}, {TW_COS, v, x}, {TW_COS, v+1, x}, {TW_COS, v+1, x}, \
Chris@82 374 {TW_SIN, v, -x}, {TW_SIN, v, x}, {TW_SIN, v+1, -x}, {TW_SIN, v+1, x}
Chris@82 375 #endif
Chris@82 376 #define TWVL2 (2 * VL)
Chris@82 377
Chris@82 378 static inline V BYTW2(const R *t, V sr)
Chris@82 379 {
Chris@82 380 const V *twp = (const V *)t;
Chris@82 381 V si = FLIP_RI(sr);
Chris@82 382 V tr = twp[0], ti = twp[1];
Chris@82 383 return VFMA(tr, sr, VMUL(ti, si));
Chris@82 384 }
Chris@82 385
Chris@82 386 static inline V BYTWJ2(const R *t, V sr)
Chris@82 387 {
Chris@82 388 const V *twp = (const V *)t;
Chris@82 389 V si = FLIP_RI(sr);
Chris@82 390 V tr = twp[0], ti = twp[1];
Chris@82 391 return VFNMS(ti, si, VMUL(tr, sr));
Chris@82 392 }
Chris@82 393
Chris@82 394 /* twiddle storage #3 */
Chris@82 395 #define VTW3 VTW1
Chris@82 396 #define TWVL3 TWVL1
Chris@82 397
Chris@82 398 /* twiddle storage for split arrays */
Chris@82 399 #ifdef FFTW_SINGLE
Chris@82 400 # define VTWS(v,x) \
Chris@82 401 {TW_COS, v, x}, {TW_COS, v+1, x}, {TW_COS, v+2, x}, {TW_COS, v+3, x}, \
Chris@82 402 {TW_COS, v+4, x}, {TW_COS, v+5, x}, {TW_COS, v+6, x}, {TW_COS, v+7, x}, \
Chris@82 403 {TW_SIN, v, x}, {TW_SIN, v+1, x}, {TW_SIN, v+2, x}, {TW_SIN, v+3, x}, \
Chris@82 404 {TW_SIN, v+4, x}, {TW_SIN, v+5, x}, {TW_SIN, v+6, x}, {TW_SIN, v+7, x}
Chris@82 405 #else
Chris@82 406 # define VTWS(v,x) \
Chris@82 407 {TW_COS, v, x}, {TW_COS, v+1, x}, {TW_COS, v+2, x}, {TW_COS, v+3, x}, \
Chris@82 408 {TW_SIN, v, x}, {TW_SIN, v+1, x}, {TW_SIN, v+2, x}, {TW_SIN, v+3, x}
Chris@82 409 #endif
Chris@82 410 #define TWVLS (2 * VL)
Chris@82 411
Chris@82 412 #define VLEAVE _mm256_zeroupper
Chris@82 413
Chris@82 414 #include "simd-common.h"