Commit f863fa1c authored by Miguel Ramos Pernas's avatar Miguel Ramos Pernas
Browse files

Extend ThOr combiner to use neutrals

parent d1b0bf29
Pipeline #3129171 passed with stage
in 24 seconds
......@@ -164,11 +164,11 @@ namespace ThOr::detail::Combiner {
template <typename T0, typename T1>
auto have_overlap( T0 const& p0, T1 const& p1 ) {
using Sel::Utils::has_tracklike_API;
if constexpr ( Sel::Utils::has_tracklike_API<T0> && Sel::Utils::has_tracklike_API<T1> ) {
using Sel::Utils::has_basic_particle_API;
if constexpr ( Sel::Utils::has_basic_particle_API<T0> && Sel::Utils::has_basic_particle_API<T1> ) {
// track-like/track-like
return p0.unique_id() == p1.unique_id();
} else if constexpr ( Sel::Utils::has_tracklike_API<T0> && !Sel::Utils::has_tracklike_API<T1> ) {
} else if constexpr ( Sel::Utils::has_basic_particle_API<T0> && !Sel::Utils::has_basic_particle_API<T1> ) {
// track-like/composite
using mask_t = decltype( p0.unique_id() == p0.unique_id() );
mask_t mask{false};
......@@ -176,7 +176,7 @@ namespace ThOr::detail::Combiner {
mask = mask | ( p1.descendant_unique_id( i ) == p0.unique_id() );
}
return mask;
} else if constexpr ( !Sel::Utils::has_tracklike_API<T0> && Sel::Utils::has_tracklike_API<T1> )
} else if constexpr ( !Sel::Utils::has_basic_particle_API<T0> && Sel::Utils::has_basic_particle_API<T1> )
// composite/track-like
return have_overlap( p1, p0 );
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment