Commit 9a685def authored by Davis King's avatar Davis King

Disabled all bindings to FFTW because FFTW isn't threadsafe.

parent ccb1c95f
......@@ -72,8 +72,7 @@ if (NOT TARGET dlib)
"Disable this if you don't want to link against libjpeg" )
set (DLIB_LINK_WITH_SQLITE3_STR
"Disable this if you don't want to link against sqlite3" )
set (DLIB_LINK_WITH_FFTW_STR
"Disable this if you don't want to link against fftw" )
#set (DLIB_LINK_WITH_FFTW_STR "Disable this if you don't want to link against fftw" )
option(DLIB_ISO_CPP_ONLY ${DLIB_ISO_CPP_ONLY_STR} OFF)
option(DLIB_NO_GUI_SUPPORT ${DLIB_NO_GUI_SUPPORT_STR} OFF)
......@@ -84,7 +83,7 @@ if (NOT TARGET dlib)
option(DLIB_LINK_WITH_LIBPNG ${DLIB_LINK_WITH_LIBPNG_STR} ON)
option(DLIB_LINK_WITH_LIBJPEG ${DLIB_LINK_WITH_LIBJPEG_STR} ON)
option(DLIB_LINK_WITH_SQLITE3 ${DLIB_LINK_WITH_SQLITE3_STR} ON)
option(DLIB_LINK_WITH_FFTW ${DLIB_LINK_WITH_FFTW_STR} ON)
#option(DLIB_LINK_WITH_FFTW ${DLIB_LINK_WITH_FFTW_STR} ON)
set(source_files
base64/base64_kernel_1.cpp
......
......@@ -8,9 +8,13 @@
#include "../hash.h"
#include "../algs.h"
// No using FFTW until it becomes thread safe!
#if 0
#ifdef DLIB_USE_FFTW
#include <fftw3.h>
#endif // DLIB_USE_FFTW
#endif
namespace dlib
{
......@@ -513,6 +517,15 @@ namespace dlib
// ----------------------------------------------------------------------------------------
/*
I'm disabling any use of the FFTW bindings because FFTW is, as of this writing, not
threadsafe as a library. This means that if multiple threads were to make
concurrent calls to these fft routines then the program could crash. If at some
point FFTW is fixed I'll turn these bindings back on.
See https://github.com/FFTW/fftw3/issues/16
*/
#if 0
#ifdef DLIB_USE_FFTW
template <long NR, long NC, typename MM, typename L>
......@@ -597,6 +610,7 @@ namespace dlib
inline void ifft_inplace(matrix<std::complex<double> >& data) {data = call_fftw_ifft(data);}
#endif // DLIB_USE_FFTW
#endif // end of #if 0
// ----------------------------------------------------------------------------------------
......
......@@ -40,10 +40,6 @@ namespace dlib
- starting with D(0,0), D contains progressively higher frequency components
of the input data.
- ifft(D) == D
- if DLIB_USE_FFTW is #defined then this function will use the very fast fftw
library when given matrix<double> objects instead of dlib's default fft
implementation. Note that you must also link to the fftw3 library to use
this feature.
!*/
// ----------------------------------------------------------------------------------------
......@@ -64,10 +60,6 @@ namespace dlib
- D.nr() == data.nr()
- D.nc() == data.nc()
- fft(D) == data
- if DLIB_USE_FFTW is #defined then this function will use the very fast fftw
library when given matrix<double> objects instead of dlib's default fft
implementation. Note that you must also link to the fftw3 library to use
this feature.
!*/
// ----------------------------------------------------------------------------------------
......@@ -91,10 +83,6 @@ namespace dlib
- This function is identical to fft() except that it does the FFT in-place.
That is, after this function executes we will have:
- #data == fft(data)
- if DLIB_USE_FFTW is #defined then this function will use the very fast fftw
library when given double precision matrices instead of dlib's default fft
implementation. Note that you must also link to the fftw3 library to use
this feature.
!*/
// ----------------------------------------------------------------------------------------
......@@ -120,10 +108,6 @@ namespace dlib
- #data == ifft(data)*data.size()
- Note that the output needs to be divided by data.size() to complete the
inverse transformation.
- if DLIB_USE_FFTW is #defined then this function will use the very fast fftw
library when given double precision matrices instead of dlib's default fft
implementation. Note that you must also link to the fftw3 library to use
this feature.
!*/
// ----------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment