Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima2
Commits
355d2dc8
Commit
355d2dc8
authored
Jun 07, 2022
by
Samuel Debionne
Browse files
[SMX] Use acc_nb_frames_xfer as main switch to enable accumulation
parent
37be4fa1
Pipeline
#77149
passed with stages
in 9 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
processings/common/fai/include/lima/processing/fai/peak_finder.hpp
View file @
355d2dc8
...
...
@@ -117,7 +117,7 @@ namespace processing::fai
bool
do_absorption
=
!
absorption_d
.
empty
();
bool
do_mask
=
!
mask_d
.
empty
();
bool
do_dummy
=
false
;
bool
do_acc
=
(
acc_nb_frames_
reset
>
0
);
bool
do_acc
=
(
acc_nb_frames_
xfer
>
0
);
bcl
::
vector
<
bcl
::
float4_
>
preprocessed_d
(
nb_pixels
,
context
);
//!< Preprocessed data
bcl
::
copy
(
mask
.
begin
(),
mask
.
end
(),
mask_d
.
begin
(),
queue
);
bcl
::
kernel
stage2
(
stage2_program
,
"corrections4"
);
...
...
@@ -150,7 +150,6 @@ namespace processing::fai
bcl
::
vector
<
float
>
acc_peak_d
(
acc_nb_pixels
,
0.0
f
,
queue
);
//!< Accum pixels after peak find
std
::
uint32_t
curr_acc_frames
=
0
;
const
bool
reset_acc
=
false
;
return
[
=
,
//
gain
=
std
::
move
(
gain_d
),
...
...
@@ -248,16 +247,21 @@ namespace processing::fai
// Stage 6 - Accumulate corr & peaks
std
::
size_t
ret_acc_frames
=
0
;
if
(
do_acc
)
{
// Increment nb of accumulated samples and check if update is needed
if
((
++
curr_acc_frames
%
acc_nb_frames_xfer
==
0
)
||
acc_always_xfer
)
{
// Increment nb of accumulated frames
curr_acc_frames
++
;
// Check if transfer is needed
if
((
curr_acc_frames
%
acc_nb_frames_xfer
==
0
)
||
acc_always_xfer
)
{
ret_acc_frames
=
curr_acc_frames
;
bcl
::
copy
(
acc_corr_d
.
begin
(),
acc_corr_d
.
end
(),
acc_corr
.
begin
(),
queue
);
bcl
::
copy
(
acc_peak_d
.
begin
(),
acc_peak_d
.
end
(),
acc_peak
.
begin
(),
queue
);
if
(
reset_acc
)
{
curr_acc_frames
=
0
;
bcl
::
fill
(
acc_corr_d
.
begin
(),
acc_corr_d
.
end
(),
0.0
f
,
queue
);
bcl
::
fill
(
acc_peak_d
.
begin
(),
acc_peak_d
.
end
(),
0.0
f
,
queue
);
}
}
// Check if reset is needed (0 means "accumulate indefinitely")
if
((
acc_nb_frames_reset
)
&&
(
curr_acc_frames
%
acc_nb_frames_reset
==
0
))
{
curr_acc_frames
=
0
;
bcl
::
fill
(
acc_corr_d
.
begin
(),
acc_corr_d
.
end
(),
0.0
f
,
queue
);
bcl
::
fill
(
acc_peak_d
.
begin
(),
acc_peak_d
.
end
(),
0.0
f
,
queue
);
}
}
...
...
processings/smx/src/pipeline_smx.cpp
View file @
355d2dc8
...
...
@@ -160,11 +160,11 @@ namespace processing::pipelines
checkpoint_hdf5_sparse
.
emplace
(
m_graph
,
tbb
::
flow
::
unlimited
,
m_nb_frames_sparse_saved
);
// Accumulation HDF5 node
bool
do_acc
=
(
proc_params
.
fai
.
acc_nb_frames_
reset
>
0
);
bool
do_acc
=
(
proc_params
.
fai
.
acc_nb_frames_
xfer
>
0
);
if
(
do_acc
)
{
accum_split
.
emplace
(
m_graph
);
auto
acc_nb_frames
=
(
acq_params
.
xfer
.
time_slice
.
count
-
1
)
/
proc_params
.
fai
.
acc_nb_frames_
reset
+
1
;
(
acq_params
.
xfer
.
time_slice
.
count
-
1
)
/
proc_params
.
fai
.
acc_nb_frames_
xfer
+
1
;
acc_saving_corrected
.
emplace
(
m_graph
,
proc_params
.
saving_accumulation_corrected
,
rank
,
acc_nb_frames
,
frame_info
.
dimensions
(),
pixel_enum
::
gray32f
);
checkpoint_hdf5_acc_corrected
.
emplace
(
m_graph
,
tbb
::
flow
::
unlimited
,
...
...
Write
Preview
Supports
Markdown
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