- Performance tweaks: enable SSE2 for libfftw, don't force 16-byte aligned malloc

PR:		ports/67393
Submitted by:	michael johnson <ahze@ahze.net> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-05-31 10:13:40 +00:00
parent 93b77aa5ba
commit a9a161ba3d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110506
2 changed files with 24 additions and 2 deletions

View file

@ -27,11 +27,11 @@ INSTALLS_SHLIB= yes
MAN1= fftw-wisdom-to-conf.1 fftw-wisdom.1 fftwf-wisdom.1
INFO= fftw3
CONFIGURE_ARGS= --enable-shared --with-our-malloc16
CONFIGURE_ARGS= --enable-shared
CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}"
# FFTW --enable-single Options
CONFIGURE_ARGS_FFTW3F=--enable-single ${CONFIGURE_ARGS}
CONFIGURE_ARGS_FFTW3F=--enable-single ${CONFIGURE_ARGS:N--enable-sse2}
FFTW3F_WRKSRC= ${WRKDIR}/${DISTNAME}-3F
FFTW3F_INSTALL_TARGET=install-pkgconfigDATA install-libLTLIBRARIES install-exec
@ -54,6 +54,7 @@ CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O3 -fomit-frame-pointer -fno-schedul
.endif
.if defined(WITH_SSE)
CONFIGURE_ARGS+=--enable-sse2
CONFIGURE_ARGS_FFTW3F+=--enable-sse
CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O2"
.endif

View file

@ -0,0 +1,21 @@
--- kernel/alloc.c.orig Sun May 30 16:26:22 2004
+++ kernel/alloc.c Sun May 30 16:27:34 2004
@@ -30,6 +30,8 @@
# endif
#endif
+#include <stdlib.h>
+
#if defined(HAVE_DECL_POSIX_MEMALIGN) && !HAVE_DECL_POSIX_MEMALIGN
extern int posix_memalign(void **, size_t, size_t);
#endif
@@ -122,9 +124,6 @@
# define real_free MPFree
# else
- /* Add your machine here and send a patch to fftw@fftw.org
- or (e.g. for Windows) configure --with-our-malloc16 */
-# error "Don't know how to malloc() aligned memory."
# endif
#else /* !defined(MIN_ALIGMENT) */