Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
9a685def
Commit
9a685def
authored
Jan 31, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabled all bindings to FFTW because FFTW isn't threadsafe.
parent
ccb1c95f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
19 deletions
+16
-19
CMakeLists.txt
dlib/CMakeLists.txt
+2
-3
matrix_fft.h
dlib/matrix/matrix_fft.h
+14
-0
matrix_fft_abstract.h
dlib/matrix/matrix_fft_abstract.h
+0
-16
No files found.
dlib/CMakeLists.txt
View file @
9a685def
...
...
@@ -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
...
...
dlib/matrix/matrix_fft.h
View file @
9a685def
...
...
@@ -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
// ----------------------------------------------------------------------------------------
...
...
dlib/matrix/matrix_fft_abstract.h
View file @
9a685def
...
...
@@ -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.
!*/
// ----------------------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment