package/fftw: add x86 optimisations
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 16 Mar 2015 16:31:22 +0000 (17:31 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 16 Mar 2015 18:44:02 +0000 (19:44 +0100)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Cc: guillaume william brs <guillaume.bressaix@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/fftw/Config.in
package/fftw/fftw.mk

index 4a0706a6beb0935e15dd08704793877ab4eb9623..7feadd8b0fabe54ae55a5481d08d136c5bbcbed5 100644 (file)
@@ -12,6 +12,12 @@ config BR2_PACKAGE_FFTW
 
 if BR2_PACKAGE_FFTW
 
+config BR2_PACKAGE_FFTW_USE_SSE
+       bool
+
+config BR2_PACKAGE_FFTW_USE_SSE2
+       bool
+
 choice
        prompt "fftw precision"
        default BR2_PACKAGE_FFTW_PRECISION_DOUBLE
@@ -20,12 +26,15 @@ choice
 
 config BR2_PACKAGE_FFTW_PRECISION_SINGLE
        bool "single"
+       select BR2_PACKAGE_FFTW_USE_SSE if BR2_X86_CPU_HAS_SSE
+       select BR2_PACKAGE_FFTW_USE_SSE2 if BR2_X86_CPU_HAS_SSE2
        help
          Compile fftw in single precision, i.e. use 'float' for floating
          point type.
 
 config BR2_PACKAGE_FFTW_PRECISION_DOUBLE
        bool "double"
+       select BR2_PACKAGE_FFTW_USE_SSE2 if BR2_X86_CPU_HAS_SSE2
        help
          Compile fftw in double precision (the default), i.e. use 'double'
          for floating point type.
index c05012a8e46b8813fc2ed48f585d2803a1dcf881..daa3cc22fdf5c735203b77af56926108150f26b0 100644 (file)
@@ -19,6 +19,10 @@ ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
 FFTW_CFLAGS += -Ofast
 endif
 
+# x86 optimisations
+FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse
+FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
+
 FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)"
 
 $(eval $(autotools-package))