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