Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
a150de43
Commit
a150de43
authored
14 years ago
by
Andreas Schenk
Browse files
Options
Downloads
Patches
Plain Diff
added fftw_cleanup to FFT dtor to release memory used by fftw
parent
253ebcf6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/img/alg/src/fft.cc
+4
-0
4 additions, 0 deletions
modules/img/alg/src/fft.cc
modules/img/alg/src/fft.hh
+1
-1
1 addition, 1 deletion
modules/img/alg/src/fft.hh
modules/img/alg/src/fftw_helper.hh
+7
-0
7 additions, 0 deletions
modules/img/alg/src/fftw_helper.hh
with
12 additions
and
1 deletion
modules/img/alg/src/fft.cc
+
4
−
0
View file @
a150de43
...
@@ -64,6 +64,10 @@ FFTFnc::FFTFnc(bool f): ori_flag_(f)
...
@@ -64,6 +64,10 @@ FFTFnc::FFTFnc(bool f): ori_flag_(f)
OST_FFTW_fftw_init_threads
();
OST_FFTW_fftw_init_threads
();
}
}
FFTFnc
::~
FFTFnc
()
{
OST_FFTW_fftw_cleanup
();
}
// real spatial -> complex half-frequency
// real spatial -> complex half-frequency
template
<
>
template
<
>
...
...
This diff is collapsed.
Click to expand it.
modules/img/alg/src/fft.hh
+
1
−
1
View file @
a150de43
...
@@ -37,7 +37,7 @@ struct DLLEXPORT FFTException: public Error {
...
@@ -37,7 +37,7 @@ struct DLLEXPORT FFTException: public Error {
struct
DLLEXPORT_IMG_ALG
FFTFnc
{
struct
DLLEXPORT_IMG_ALG
FFTFnc
{
FFTFnc
();
FFTFnc
();
FFTFnc
(
bool
);
FFTFnc
(
bool
);
~
FFTFnc
();
template
<
typename
T
,
class
D
>
template
<
typename
T
,
class
D
>
ImageStateBasePtr
VisitState
(
const
ImageStateImpl
<
T
,
D
>&
s
)
const
;
ImageStateBasePtr
VisitState
(
const
ImageStateImpl
<
T
,
D
>&
s
)
const
;
...
...
This diff is collapsed.
Click to expand it.
modules/img/alg/src/fftw_helper.hh
+
7
−
0
View file @
a150de43
...
@@ -72,15 +72,22 @@ Author: Juergen Haas
...
@@ -72,15 +72,22 @@ Author: Juergen Haas
#if OST_FFT_USE_THREADS
#if OST_FFT_USE_THREADS
#if OST_DOUBLE_PRECISION
#if OST_DOUBLE_PRECISION
#define OST_FFTW_fftw_init_threads fftw_init_threads
#define OST_FFTW_fftw_init_threads fftw_init_threads
#define OST_FFTW_fftw_cleanup fftw_cleanup_threads
#define OST_FFTW_fftw_plan_with_nthreads fftw_plan_with_nthreads
#define OST_FFTW_fftw_plan_with_nthreads fftw_plan_with_nthreads
#else
#else
#define OST_FFTW_fftw_init_threads fftwf_init_threads
#define OST_FFTW_fftw_init_threads fftwf_init_threads
#define OST_FFTW_fftw_cleanup fftwf_cleanup_threads
#define OST_FFTW_fftw_plan_with_nthreads fftwf_plan_with_nthreads
#define OST_FFTW_fftw_plan_with_nthreads fftwf_plan_with_nthreads
#endif
#endif
#else
#else
void
fftw_noop
(
unsigned
int
i
=
0
){}
void
fftw_noop
(
unsigned
int
i
=
0
){}
#define OST_FFTW_fftw_init_threads fftw_noop
#define OST_FFTW_fftw_init_threads fftw_noop
#define OST_FFTW_fftw_plan_with_nthreads fftw_noop
#define OST_FFTW_fftw_plan_with_nthreads fftw_noop
#if OST_DOUBLE_PRECISION
#define OST_FFTW_fftw_cleanup fftw_cleanup
#else
#define OST_FFTW_fftw_cleanup fftwf_cleanup
#endif
#endif
#endif
#endif
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment