diff options
author | Jukka Ojanen <jukka.ojanen@linkotec.net> | 2014-10-31 17:55:21 +0200 |
---|---|---|
committer | Jukka Ojanen <jukka.ojanen@linkotec.net> | 2014-10-31 17:55:21 +0200 |
commit | 196fb0c0c1541cf1ec1b5e9ff8ac0e8109fde29c (patch) | |
tree | a35307258c8cd76cf4c41af630938943c2c47e09 /src/macros-sse.h | |
parent | 7b999686ec4c732d28efd344065606fccba84ae4 (diff) | |
download | ffts-196fb0c0c1541cf1ec1b5e9ff8ac0e8109fde29c.zip ffts-196fb0c0c1541cf1ec1b5e9ff8ac0e8109fde29c.tar.gz |
Add CMake as an alternative build system
Add support for Windows x64 (requires YASM)
Diffstat (limited to 'src/macros-sse.h')
-rw-r--r-- | src/macros-sse.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/macros-sse.h b/src/macros-sse.h index d845734..85cd02d 100644 --- a/src/macros-sse.h +++ b/src/macros-sse.h @@ -1,10 +1,10 @@ /* - + This file is part of FFTS -- The Fastest Fourier Transform in the South - + Copyright (c) 2012, Anthony M. Blake <amb@anthonix.com> - Copyright (c) 2012, The University of Waikato - + Copyright (c) 2012, The University of Waikato + All rights reserved. Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ */ -#ifndef __SSE_FLOAT_H__ -#define __SSE_FLOAT_H__ +#ifndef FFTS_MACROS_SSE_H +#define FFTS_MACROS_SSE_H #include <xmmintrin.h> @@ -63,23 +63,27 @@ typedef __m128 V; #define FFTS_MALLOC(d,a) (_mm_malloc(d,a)) #define FFTS_FREE(d) (_mm_free(d)) -__INLINE V IMULI(int inv, V a) { - if(inv) return VSWAPPAIRS(VXOR(a, VLIT4(0.0f, -0.0f, 0.0f, -0.0f))); - else return VSWAPPAIRS(VXOR(a, VLIT4(-0.0f, 0.0f, -0.0f, 0.0f))); +static FFTS_ALWAYS_INLINE V IMULI(int inv, V a) +{ + if (inv) { + return VSWAPPAIRS(VXOR(a, VLIT4(0.0f, -0.0f, 0.0f, -0.0f))); + } else { + return VSWAPPAIRS(VXOR(a, VLIT4(-0.0f, 0.0f, -0.0f, 0.0f))); + } } - -__INLINE V IMUL(V d, V re, V im) { - re = VMUL(re, d); - im = VMUL(im, VSWAPPAIRS(d)); - return VSUB(re, im); +static FFTS_ALWAYS_INLINE V IMUL(V d, V re, V im) +{ + re = VMUL(re, d); + im = VMUL(im, VSWAPPAIRS(d)); + return VSUB(re, im); } -__INLINE V IMULJ(V d, V re, V im) { - re = VMUL(re, d); - im = VMUL(im, VSWAPPAIRS(d)); - return VADD(re, im); +static FFTS_ALWAYS_INLINE V IMULJ(V d, V re, V im) +{ + re = VMUL(re, d); + im = VMUL(im, VSWAPPAIRS(d)); + return VADD(re, im); } -#endif -// vim: set autoindent noexpandtab tabstop=3 shiftwidth=3: +#endif /* FFTS_MACROS_SSE_H */ |