Skip to content

Streamline proxy definition, add registry of headers for functors, Pr::Zip improvements

Olli Lupton requested to merge olupton_zip_improvements into master

This ended up bigger than intended. It goes with Rec!1742 (merged), Brunel!901 (merged) and Moore!260 (merged).

In brief:

  • Add macros to simplify proxy definitions (see below), these both reduce copy/pasted boilerplate and makes it easier to add new implementation-detail fields (in this case, used to generalise ALL and NONE)
namespace Some::Appropriate::Namespace {
  DECLARE_PROXY( Proxy ) {
    PROXY_METHODS( dType, unwrap, ContainerType, m_container );
    auto someField() const { return m_container->field<dType, unwrap>( this->offset() ); }
  };
} // namespace Some::Appropriate::Namespace

REGISTER_PROXY( ContainerType, Some::Appropriate::Namespace::Proxy );
  • Add LHCb::header_map<> helper, used to enable compile time "what header is type T defined in" queries that are needed for functor-using algorithms
  • Extend LHCb::Pr::is_zippable_v<T> to check a proxy is available for T
  • Take the changes in !2156 (merged) further to avoid SIMDWrapper classes as template arguments to Pr::Zip proxies/iterators. This fixes functors with signatures like float( fitted_forward_track_proxy const& ) when they are JIT compiled and the stack has been build with vector flags
    • Minor changes in SIMDWrapper to enable this
Edited by Olli Lupton

Merge request reports