diff options
-rw-r--r-- | cmake/FindFFTW.cmake | 9 | ||||
-rw-r--r-- | unsupported/test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | unsupported/test/FFTW.cpp | 47 |
3 files changed, 43 insertions, 19 deletions
diff --git a/cmake/FindFFTW.cmake b/cmake/FindFFTW.cmake index a56450b17..58b10ea11 100644 --- a/cmake/FindFFTW.cmake +++ b/cmake/FindFFTW.cmake @@ -13,8 +13,15 @@ find_path(FFTW_INCLUDES find_library(FFTWF_LIB NAMES fftw3f PATHS $ENV{FFTWDIR} ${LIB_INSTALL_DIR}) find_library(FFTW_LIB NAMES fftw3 PATHS $ENV{FFTWDIR} ${LIB_INSTALL_DIR}) +set(FFTW_LIBRARIES "${FFTWF_LIB} ${FFTW_LIB}" ) + find_library(FFTWL_LIB NAMES fftw3l PATHS $ENV{FFTWDIR} ${LIB_INSTALL_DIR}) -set(FFTW_LIBRARIES "${FFTWF_LIB} ${FFTW_LIB} ${FFTWL_LIB}" ) + +if(FFTWL_LIB) +set(FFTW_LIBRARIES "${FFTW_LIBRARIES} ${FFTWL_LIB}") +endif() + + message(STATUS "FFTW ${FFTW_LIBRARIES}" ) include(FindPackageHandleStandardArgs) diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index ccf2c5f02..dd9b3a89b 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -82,7 +82,11 @@ ei_add_test(sparse_extra "" "") find_package(FFTW) if(FFTW_FOUND) ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ") - ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT " "fftw3;fftw3f;fftw3l" ) + if(FFTWL_LIB) + ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "fftw3;fftw3f;fftw3l" ) + else() + ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT " "fftw3;fftw3f" ) + endif() else() ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ") endif() diff --git a/unsupported/test/FFTW.cpp b/unsupported/test/FFTW.cpp index c72dc5647..d3676005a 100644 --- a/unsupported/test/FFTW.cpp +++ b/unsupported/test/FFTW.cpp @@ -245,23 +245,36 @@ void test_return_by_value(int len) void test_FFTW() { - cout << "testing return-by-value\n"; - CALL_SUBTEST( test_return_by_value(32) ); - cout << "testing complex\n"; + CALL_SUBTEST( test_return_by_value(32) ); //CALL_SUBTEST( ( test_complex2d<float,4,8> () ) ); CALL_SUBTEST( ( test_complex2d<double,4,8> () ) ); //CALL_SUBTEST( ( test_complex2d<long double,4,8> () ) ); - CALL_SUBTEST( test_complex<float>(32) ); CALL_SUBTEST( test_complex<double>(32) ); CALL_SUBTEST( test_complex<long double>(32) ); - CALL_SUBTEST( test_complex<float>(256) ); CALL_SUBTEST( test_complex<double>(256) ); CALL_SUBTEST( test_complex<long double>(256) ); - CALL_SUBTEST( test_complex<float>(3*8) ); CALL_SUBTEST( test_complex<double>(3*8) ); CALL_SUBTEST( test_complex<long double>(3*8) ); - CALL_SUBTEST( test_complex<float>(5*32) ); CALL_SUBTEST( test_complex<double>(5*32) ); CALL_SUBTEST( test_complex<long double>(5*32) ); - CALL_SUBTEST( test_complex<float>(2*3*4) ); CALL_SUBTEST( test_complex<double>(2*3*4) ); CALL_SUBTEST( test_complex<long double>(2*3*4) ); - CALL_SUBTEST( test_complex<float>(2*3*4*5) ); CALL_SUBTEST( test_complex<double>(2*3*4*5) ); CALL_SUBTEST( test_complex<long double>(2*3*4*5) ); - CALL_SUBTEST( test_complex<float>(2*3*4*5*7) ); CALL_SUBTEST( test_complex<double>(2*3*4*5*7) ); CALL_SUBTEST( test_complex<long double>(2*3*4*5*7) ); - - cout << "testing scalar\n"; - CALL_SUBTEST( test_scalar<float>(32) ); CALL_SUBTEST( test_scalar<double>(32) ); CALL_SUBTEST( test_scalar<long double>(32) ); - CALL_SUBTEST( test_scalar<float>(45) ); CALL_SUBTEST( test_scalar<double>(45) ); CALL_SUBTEST( test_scalar<long double>(45) ); - CALL_SUBTEST( test_scalar<float>(50) ); CALL_SUBTEST( test_scalar<double>(50) ); CALL_SUBTEST( test_scalar<long double>(50) ); - CALL_SUBTEST( test_scalar<float>(256) ); CALL_SUBTEST( test_scalar<double>(256) ); CALL_SUBTEST( test_scalar<long double>(256) ); - CALL_SUBTEST( test_scalar<float>(2*3*4*5*7) ); CALL_SUBTEST( test_scalar<double>(2*3*4*5*7) ); CALL_SUBTEST( test_scalar<long double>(2*3*4*5*7) ); + CALL_SUBTEST( test_complex<float>(32) ); CALL_SUBTEST( test_complex<double>(32) ); + CALL_SUBTEST( test_complex<float>(256) ); CALL_SUBTEST( test_complex<double>(256) ); + CALL_SUBTEST( test_complex<float>(3*8) ); CALL_SUBTEST( test_complex<double>(3*8) ); + CALL_SUBTEST( test_complex<float>(5*32) ); CALL_SUBTEST( test_complex<double>(5*32) ); + CALL_SUBTEST( test_complex<float>(2*3*4) ); CALL_SUBTEST( test_complex<double>(2*3*4) ); + CALL_SUBTEST( test_complex<float>(2*3*4*5) ); CALL_SUBTEST( test_complex<double>(2*3*4*5) ); + CALL_SUBTEST( test_complex<float>(2*3*4*5*7) ); CALL_SUBTEST( test_complex<double>(2*3*4*5*7) ); + + CALL_SUBTEST( test_scalar<float>(32) ); CALL_SUBTEST( test_scalar<double>(32) ); + CALL_SUBTEST( test_scalar<float>(45) ); CALL_SUBTEST( test_scalar<double>(45) ); + CALL_SUBTEST( test_scalar<float>(50) ); CALL_SUBTEST( test_scalar<double>(50) ); + CALL_SUBTEST( test_scalar<float>(256) ); CALL_SUBTEST( test_scalar<double>(256) ); + CALL_SUBTEST( test_scalar<float>(2*3*4*5*7) ); CALL_SUBTEST( test_scalar<double>(2*3*4*5*7) ); + + #ifdef EIGEN_HAS_FFTWL + CALL_SUBTEST( test_complex<long double>(32) ); + CALL_SUBTEST( test_complex<long double>(256) ); + CALL_SUBTEST( test_complex<long double>(3*8) ); + CALL_SUBTEST( test_complex<long double>(5*32) ); + CALL_SUBTEST( test_complex<long double>(2*3*4) ); + CALL_SUBTEST( test_complex<long double>(2*3*4*5) ); + CALL_SUBTEST( test_complex<long double>(2*3*4*5*7) ); + + CALL_SUBTEST( test_scalar<long double>(32) ); + CALL_SUBTEST( test_scalar<long double>(45) ); + CALL_SUBTEST( test_scalar<long double>(50) ); + CALL_SUBTEST( test_scalar<long double>(256) ); + CALL_SUBTEST( test_scalar<long double>(2*3*4*5*7) ); + #endif } |