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
6b653ed6
Commit
6b653ed6
authored
13 years ago
by
Valerio Mariani
Browse files
Options
Downloads
Patches
Plain Diff
Dealing with QT dependencies in the img modules (when info support is off)
parent
331b1b0e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/img/alg/src/CMakeLists.txt
+2
-0
2 additions, 0 deletions
modules/img/alg/src/CMakeLists.txt
modules/img/alg/src/fft.cc
+9
-5
9 additions, 5 deletions
modules/img/alg/src/fft.cc
modules/img/base/src/CMakeLists.txt
+2
-1
2 additions, 1 deletion
modules/img/base/src/CMakeLists.txt
with
13 additions
and
6 deletions
modules/img/alg/src/CMakeLists.txt
+
2
−
0
View file @
6b653ed6
...
...
@@ -94,7 +94,9 @@ line_average.hh
rscrosscorr.hh
)
if
(
ENABLE_INFO
)
include
(
${
QT_USE_FILE
}
)
endif
()
module
(
NAME img_alg SOURCES
"
${
OST_IMG_ALG_SOURCES
}
"
HEADERS
"
${
OST_IMG_ALG_HEADERS
}
"
HEADER_OUTPUT_DIR ost/img/alg
...
...
This diff is collapsed.
Click to expand it.
modules/img/alg/src/fft.cc
+
9
−
5
View file @
6b653ed6
...
...
@@ -25,8 +25,12 @@
#include
<boost/shared_ptr.hpp>
#include
<fftw3.h>
#if OST_INFO_ENABLED
#include
<QThread>
#define IDEAL_NUMBER_OF_THREADS() QThread::idealThreadCount()
#else
#define IDEAL_NUMBER_OF_THREADS() 1
#endif
#include
<ost/message.hh>
#include
<ost/img/value_util.hh>
#include
<ost/img/image_state/image_state_def.hh>
...
...
@@ -130,7 +134,7 @@ reinterpret_cast<OST_FFTW_fftw_complex*>(out_state->Data().GetData());
for
(
size_t
i
=
0
;
i
<
block_count
;
i
++
)
{
std
::
copy
(
&
in_ptr
[
i
*
src_size
],
&
in_ptr
[(
i
+
1
)
*
src_size
],
&
fftw_in
[
i
*
2
*
dst_size
]);
}
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
QThread
::
idealThreadCount
()));
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
IDEAL_NUMBER_OF_THREADS
()));
OST_FFTW_fftw_plan
plan
=
OST_FFTW_fftw_plan_dft_r2c
(
rank
,
n
,
fftw_in
,
fftw_out
,
FFTW_ESTIMATE
);
...
...
@@ -213,7 +217,7 @@ ImageStateBasePtr FFTFnc::VisitState<Complex,HalfFrequencyDomain>(const ComplexH
Real
*
fftw_out
=
reinterpret_cast
<
Real
*>
(
out_ptr
);
assert
(
sizeof
(
OST_FFTW_fftw_complex
)
==
sizeof
(
Complex
));
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
QThread
::
idealThreadCount
()));
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
IDEAL_NUMBER_OF_THREADS
()));
OST_FFTW_fftw_complex
*
fftw_in
=
reinterpret_cast
<
OST_FFTW_fftw_complex
*>
(
out_ptr
);
...
...
@@ -259,7 +263,7 @@ ImageStateBasePtr FFTFnc::VisitState<Complex,SpatialDomain>(const ComplexSpatial
reinterpret_cast
<
OST_FFTW_fftw_complex
*>
(
out_state
->
Data
().
GetData
());
// in place transform
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
QThread
::
idealThreadCount
()));
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
IDEAL_NUMBER_OF_THREADS
()));
OST_FFTW_fftw_plan
plan
=
OST_FFTW_fftw_plan_dft
(
rank
,
n
,
fftw_out
,
fftw_out
,
dir
,
...
...
@@ -297,7 +301,7 @@ ImageStateBasePtr FFTFnc::VisitState<Complex,FrequencyDomain>(const ComplexFrequ
reinterpret_cast
<
OST_FFTW_fftw_complex
*>
(
out_state
->
Data
().
GetData
());
// in place transform
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
QThread
::
idealThreadCount
()));
OST_FFTW_fftw_plan_with_nthreads
(
std
::
max
<
int
>
(
1
,
IDEAL_NUMBER_OF_THREADS
()));
OST_FFTW_fftw_plan
plan
=
OST_FFTW_fftw_plan_dft
(
rank
,
n
,
fftw_out
,
fftw_out
,
dir
,
...
...
This diff is collapsed.
Click to expand it.
modules/img/base/src/CMakeLists.txt
+
2
−
1
View file @
6b653ed6
...
...
@@ -94,6 +94,7 @@ map.hh
if
(
ENABLE_INFO
)
list
(
APPEND OST_IMG_SOURCES mask_info_convert.cc
)
list
(
APPEND OST_IMG_HEADERS mask_info_convert.hh
)
set
(
INFO_DEPS ost_info
)
endif
()
foreach
(
fname
${
OST_IMG_IMAGE_STATE_SOURCES
}
)
...
...
@@ -108,4 +109,4 @@ module(NAME img SOURCES "${OST_IMG_SOURCES}"
HEADERS
${
OST_IMG_RASTER_IMAGE_HEADERS
}
IN_DIR raster_image
${
OST_IMG_IMAGE_STATE_HEADERS
}
IN_DIR image_state
${
OST_IMG_HEADERS
}
DEPENDS_ON ost_geom ost_base
ost_info
)
DEPENDS_ON ost_geom ost_base
${
INFO_DEPS
}
)
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