Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
Rec
Commits
e8153d0f
Commit
e8153d0f
authored
Nov 26, 2021
by
Arthur Marius Hennequin
Committed by
Rosen Matev
Jan 11, 2022
Browse files
Use mask in gather proxy behaviour
Moved from
Phys@92b16926
parent
7bd4bdf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Phys/ParticleCombiners/include/CombKernel/ThOrCombiner.h
View file @
e8153d0f
...
...
@@ -690,7 +690,7 @@ namespace ThOr {
auto
const
fit_success_mask
=
m_vertex_fitter
.
fitComposite
(
tmp_storage
,
mask
,
new_composite_pids
,
Sel
::
ParticleCombination
{
detail
::
Combiner
::
invoke_or_visit_returning_variant
(
[
&
](
auto
const
&
container
)
{
return
container
.
gather
(
indices
[
IInput
]
);
},
[
&
](
auto
const
&
container
)
{
return
container
.
gather
(
indices
[
IInput
]
,
mask
);
},
std
::
get
<
IInput
>
(
in
)
)...}
);
if
(
tmp_storage
.
size
()
!=
simd_t
::
size
)
{
throw
exception
(
"tmp_storage didn't have simd_t::size elements."
);
...
...
@@ -840,9 +840,10 @@ namespace ThOr {
auto
const
particles1_mask
=
simd_t
::
loop_mask
(
i1
,
indices1
.
size
()
);
// Note that this is only *not* reading from beyond the end of
// indices1 because of the convoluted .resize() in get_indices()
auto
const
p1_inds
=
select
(
particles1_mask
,
int_v
{
std
::
next
(
indices1
.
data
(),
i1
)}
,
int_v
{
indices1
[
i1
]}
)
;
auto
const
p1_inds
=
int_v
{
std
::
next
(
indices1
.
data
(),
i1
)};
auto
const
particles1
=
detail
::
Combiner
::
invoke_or_visit_returning_variant
(
[
&
](
auto
const
&
container
)
{
return
container
.
gather
(
p1_inds
);
},
std
::
get
<
1
>
(
in
)
);
[
&
](
auto
const
&
container
)
{
return
container
.
gather
(
p1_inds
,
particles1_mask
);
},
std
::
get
<
1
>
(
in
)
);
// The "triangle" inefficiency comes in from the `loop_mask`:
// d
// c d
...
...
@@ -1026,7 +1027,7 @@ namespace ThOr {
// one
new_comb_t
const
comb
{
detail
::
Combiner
::
invoke_or_visit_returning_variant
(
[
inds
=
indices
[
Particle
]](
auto
const
&
container
)
{
return
container
.
gather
(
inds
);
},
[
inds
=
indices
[
Particle
]
,
mask
](
auto
const
&
container
)
{
return
container
.
gather
(
inds
,
mask
);
},
std
::
get
<
Particle
>
(
in
)
)...,
detail
::
Combiner
::
invoke_or_visit_returning_variant
(
[
&
](
auto
const
&
container
)
{
return
container
.
scalar_fill
(
new_indices
[
i
]
);
},
...
...
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