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: Move Layer resolution functions to .cpp, reduce heap allocations #1119

Merged

Conversation

paulgessinger
Copy link
Member

With a simple forward declaration, Layer::compatibleSurfaces and Layer::surfaceOnApproach can be moved to the Layer.cpp file.

I also changed the way compatibleSurfaces resolves duplicates: instead of filling an auxiliary map, the vector of surface intersections is sorted by associated object first to remove duplicates, and only then sorted by path length.

@paulgessinger paulgessinger added this to the next milestone Dec 14, 2021
@codecov
Copy link

codecov bot commented Dec 14, 2021

Codecov Report

Merging #1119 (36baa64) into main (c62039a) will increase coverage by 0.04%.
The diff coverage is 52.80%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1119      +/-   ##
==========================================
+ Coverage   48.57%   48.62%   +0.04%     
==========================================
  Files         341      341              
  Lines       17506    17511       +5     
  Branches     8247     8244       -3     
==========================================
+ Hits         8504     8515      +11     
+ Misses       3239     3232       -7     
- Partials     5763     5764       +1     
Impacted Files Coverage Δ
Core/include/Acts/Geometry/Layer.hpp 100.00% <ø> (ø)
Core/include/Acts/Geometry/detail/Layer.ipp 77.14% <ø> (+21.21%) ⬆️
Core/src/Geometry/Layer.cpp 56.81% <52.27%> (-9.10%) ⬇️
Core/include/Acts/Surfaces/SurfaceArray.hpp 51.78% <100.00%> (ø)
Core/include/Acts/Utilities/Intersection.hpp 78.26% <0.00%> (+8.69%) ⬆️

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 c62039a...36baa64. Read the comment docs.

Copy link
Contributor

@robertlangenberg robertlangenberg left a comment

Choose a reason for hiding this comment

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

Zealous Paul at it again :)

@robertlangenberg robertlangenberg merged commit f509ede into acts-project:main Jan 5, 2022
@paulgessinger paulgessinger modified the milestones: next, v16.0.0 Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants