Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BioEM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
MPIBP-Hummer
BioEM
Commits
65947e3b
Commit
65947e3b
authored
11 years ago
by
David Rohr
Browse files
Options
Downloads
Patches
Plain Diff
Do initialize buffers where not needed
parent
47c12f7a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bioem.cpp
+2
-10
2 additions, 10 deletions
bioem.cpp
map.cpp
+0
-4
0 additions, 4 deletions
map.cpp
with
2 additions
and
14 deletions
bioem.cpp
+
2
−
10
View file @
65947e3b
...
@@ -164,8 +164,8 @@ int bioem::configure(int ac, char* av[])
...
@@ -164,8 +164,8 @@ int bioem::configure(int ac, char* av[])
/****************** Precalculating Necessary Stuff *********************/
/****************** Precalculating Necessary Stuff *********************/
precalculate
();
precalculate
();
param
.
nTotGridAngles
=
10
;
param
.
nTotGridAngles
=
4
;
param
.
nTotCTFs
=
10
;
param
.
nTotCTFs
=
4
;
//param.param_device.maxDisplaceCenter = 0;
//param.param_device.maxDisplaceCenter = 0;
deviceInit
();
deviceInit
();
...
@@ -182,10 +182,6 @@ int bioem::precalculate()
...
@@ -182,10 +182,6 @@ int bioem::precalculate()
// Generating Grids of orientations
// Generating Grids of orientations
param
.
CalculateGridsParam
();
param
.
CalculateGridsParam
();
//Inizialzing crosscorrelations of Maps
memset
(
RefMap
.
sum_RefMap
,
0
,
BIOEM_MAX_MAPS
*
sizeof
(
*
RefMap
.
sum_RefMap
));
memset
(
RefMap
.
sumsquare_RefMap
,
0
,
BIOEM_MAX_MAPS
*
sizeof
(
*
RefMap
.
sum_RefMap
));
myfloat_t
sum
,
sumsquare
;
myfloat_t
sum
,
sumsquare
;
//Precalculating cross-correlations of maps
//Precalculating cross-correlations of maps
...
@@ -266,7 +262,6 @@ int bioem::run()
...
@@ -266,7 +262,6 @@ int bioem::run()
{
{
printf
(
"
\t\t
Convolution %d %d
\n
"
,
iProjectionOut
,
iConv
);
printf
(
"
\t\t
Convolution %d %d
\n
"
,
iProjectionOut
,
iConv
);
/*** Calculating convolutions of projection map and crosscorrelations ***/
/*** Calculating convolutions of projection map and crosscorrelations ***/
memset
(
conv_mapFFT
,
0
,
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
*
sizeof
(
*
conv_mapFFT
));
timer
.
ResetStart
();
timer
.
ResetStart
();
createConvolutedProjectionMap
(
iProjectionOut
,
iConv
,
proj_mapFFT
,
conv_map
,
conv_mapFFT
,
sumCONV
,
sumsquareCONV
);
createConvolutedProjectionMap
(
iProjectionOut
,
iConv
,
proj_mapFFT
,
conv_map
,
conv_mapFFT
,
sumCONV
,
sumsquareCONV
);
...
@@ -429,9 +424,6 @@ int bioem::calculateCCFFT(int iRefMap, int iConv, mycomplex_t* localConvFFT,myco
...
@@ -429,9 +424,6 @@ int bioem::calculateCCFFT(int iRefMap, int iConv, mycomplex_t* localConvFFT,myco
{
{
myfftw_plan
plan
;
myfftw_plan
plan
;
memset
(
lCC
,
0
,
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
*
sizeof
(
*
lCC
));
memset
(
localCCT
,
0
,
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
*
sizeof
(
*
localCCT
));
for
(
int
i
=
0
;
i
<
param
.
param_device
.
NumberPixels
;
i
++
)
for
(
int
i
=
0
;
i
<
param
.
param_device
.
NumberPixels
;
i
++
)
{
{
for
(
int
j
=
0
;
j
<
param
.
param_device
.
NumberPixels
;
j
++
)
for
(
int
j
=
0
;
j
<
param
.
param_device
.
NumberPixels
;
j
++
)
...
...
This diff is collapsed.
Click to expand it.
map.cpp
+
0
−
4
View file @
65947e3b
...
@@ -142,8 +142,6 @@ int bioem_RefMap::PreCalculateMapsFFT(bioem_param& param)
...
@@ -142,8 +142,6 @@ int bioem_RefMap::PreCalculateMapsFFT(bioem_param& param)
mycomplex_t
*
localout
;
mycomplex_t
*
localout
;
localout
=
(
mycomplex_t
*
)
myfftw_malloc
(
sizeof
(
mycomplex_t
)
*
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
);
localout
=
(
mycomplex_t
*
)
myfftw_malloc
(
sizeof
(
mycomplex_t
)
*
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
);
memset
(
localMap
,
0
,
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
*
sizeof
(
mycomplex_t
));
for
(
int
iRefMap
=
0
;
iRefMap
<
ntotRefMap
;
iRefMap
++
)
for
(
int
iRefMap
=
0
;
iRefMap
<
ntotRefMap
;
iRefMap
++
)
{
{
//Assigning localMap values to padded Map
//Assigning localMap values to padded Map
...
@@ -155,8 +153,6 @@ int bioem_RefMap::PreCalculateMapsFFT(bioem_param& param)
...
@@ -155,8 +153,6 @@ int bioem_RefMap::PreCalculateMapsFFT(bioem_param& param)
localMap
[
i
*
param
.
param_device
.
NumberPixels
+
j
][
1
]
=
0.0
;
localMap
[
i
*
param
.
param_device
.
NumberPixels
+
j
][
1
]
=
0.0
;
}
}
}
}
//setting elements of output map to 0
memset
(
localout
,
0
,
param
.
param_device
.
NumberPixels
*
param
.
param_device
.
NumberPixels
*
sizeof
(
mycomplex_t
));
//Calling FFT_Forward
//Calling FFT_Forward
plan
=
myfftw_plan_dft_2d
(
param
.
param_device
.
NumberPixels
,
param
.
param_device
.
NumberPixels
,
localMap
,
localout
,
FFTW_FORWARD
,
FFTW_ESTIMATE
);
plan
=
myfftw_plan_dft_2d
(
param
.
param_device
.
NumberPixels
,
param
.
param_device
.
NumberPixels
,
localMap
,
localout
,
FFTW_FORWARD
,
FFTW_ESTIMATE
);
...
...
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