From 26f8faa6e8c5f1ef2585d1e1ad1b2753d7732b76 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Mon, 28 Sep 2009 15:55:19 +0000 Subject: [PATCH] changed code from memalign to _mm_malloc --- kiss_fft.h | 4 +++- test/Makefile | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/kiss_fft.h b/kiss_fft.h index e799137..5ed835d 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -27,7 +27,9 @@ extern "C" { #ifdef USE_SIMD # include # define kiss_fft_scalar __m128 -#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes) + +//#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes) +#define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) #else #define KISS_FFT_MALLOC malloc #endif diff --git a/test/Makefile b/test/Makefile index 54765af..31e3f60 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,9 +4,9 @@ WARNINGS=-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return \ -Wwrite-strings # for x86 pentium+ machines , these flags work well -#CFLAGS=-O3 -march=pentiumpro -ffast-math -fomit-frame-pointer -I.. -I../tools $(WARNINGS) +CFLAGS=-O3 -march=pentiumpro -ffast-math -fomit-frame-pointer -I.. -I../tools $(WARNINGS) # If the above flags do not work, try the following -CFLAGS=-O3 -mtune=native -ffast-math -fomit-frame-pointer -I.. -I../tools $(WARNINGS) +#CFLAGS=-O3 -mtune=native -ffast-math -fomit-frame-pointer -I.. -I../tools $(WARNINGS) # TIP: try adding -openmp or -fopenmp to enable OPENMP directives and use of multiple cores