Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Fitting and Finding algorithm function interface #922

Merged
merged 2 commits into from
Aug 6, 2021

Conversation

paulgessinger
Copy link
Member

Changes both the fitting and the finding algorithm to use a regular
interface with virtual methods rather than std::function to decouple the
actual fitter/finder instances. The decoupling is only for compile-time
memory usage reduction. The reason is that pybind11 does a round trip
throught python with std::function, which we want to avoid. This is
functionally equivalent, but uses a different mechanism.

Also adds factory functions for these decoupled objects. We don't
foresee these to be switchable, this decoupling is done for purely
technical reasons anyway.

Changes both the fitting and the finding algorithm to use a regular
interface with virtual methods rather than std::function to decouple the
actual fitter/finder instances. The decoupling is only for compile-time
memory usage reduction. The reason is that pybind11 does a round trip
throught python with std::function, which we want to avoid. This is
functionally equivalent, but uses a different mechanism.

Also adds factory functions for these decoupled objects. We don't
foresee these to be switchable, this decoupling is done for purely
technical reasons anyway.
@paulgessinger paulgessinger added this to the next milestone Aug 4, 2021
@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #922 (a4db3d5) into main (cc52918) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #922   +/-   ##
=======================================
  Coverage   48.66%   48.66%           
=======================================
  Files         331      331           
  Lines       17129    17129           
  Branches     8094     8094           
=======================================
  Hits         8336     8336           
  Misses       3087     3087           
  Partials     5706     5706           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc52918...a4db3d5. Read the comment docs.

@XiaocongAi XiaocongAi self-requested a review August 5, 2021 07:37
Copy link
Contributor

@XiaocongAi XiaocongAi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me.

@paulgessinger paulgessinger merged commit 6523cba into acts-project:main Aug 6, 2021
@paulgessinger paulgessinger deleted the py/fit_find_func branch August 6, 2021 14:20
@paulgessinger paulgessinger modified the milestones: next, v11.0.0 Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants