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

fix: #include <algorithm> in HoughTransformUtils for std::sort #3758

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

wdconinc
Copy link
Contributor

With gcc-14, the following compilation failure is reported:

     438    In file included from /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.hpp:374,
     439                     from /home/wdconinc/git/acts/Examples/Algorithms/TrackFinding/include/ActsExamples/TrackFinding/MuonHoughSeeder.hpp:12,
     440                     from /home/wdconinc/git/acts/Examples/Algorithms/TrackFinding/src/MuonHoughSeeder.cpp:9:
     441    /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.ipp: In member function 'std::vector<Acts::HoughTransformUtils::PeakFinders::IslandsAroundMax<identifier_t>::Maximum> Acts::HoughTransformUtils::PeakFind
            ers::IslandsAroundMax<identifier_t>::findPeaks(const Acts::HoughTransformUtils::HoughPlane<identifier_t>&, const Acts::HoughTransformUtils::HoughAxisRanges&)':
  >> 442    /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.ipp:224:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
     443      224 |   std::sort(candidates.begin(), candidates.end(),
     444          |        ^~~~
     445          |        qsort
  >> 446    make[2]: *** [Examples/Algorithms/TrackFinding/CMakeFiles/ActsExamplesTrackFinding.dir/build.make:177: Examples/Algorithms/TrackFinding/CMakeFiles/ActsExamplesTrackFinding.dir/src/MuonHoughSeeder.cpp.o] Error 1
     447    make[2]: *** Waiting for unfinished jobs....

This appears to be due to a missing #include <algorithm> before the use of std::sort in the .ipp file. This PR adds the algorithm header to the .hpp file.

@github-actions github-actions bot added Component - Core Affects the Core module Seeding labels Oct 17, 2024
Copy link

github-actions bot commented Oct 17, 2024

📊: Physics performance monitoring for 9a3b067

Full contents

physmon summary

@paulgessinger paulgessinger added this to the next milestone Oct 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link

@kodiakhq kodiakhq bot merged commit 8925fb5 into acts-project:main Oct 18, 2024
42 checks passed
@paulgessinger paulgessinger modified the milestones: next, v37.2.0 Oct 24, 2024
Rosie-Hasan pushed a commit to Rosie-Hasan/acts that referenced this pull request Nov 13, 2024
…cts-project#3758)

With gcc-14, the following compilation failure is reported:
```
     438    In file included from /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.hpp:374,
     439                     from /home/wdconinc/git/acts/Examples/Algorithms/TrackFinding/include/ActsExamples/TrackFinding/MuonHoughSeeder.hpp:12,
     440                     from /home/wdconinc/git/acts/Examples/Algorithms/TrackFinding/src/MuonHoughSeeder.cpp:9:
     441    /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.ipp: In member function 'std::vector<Acts::HoughTransformUtils::PeakFinders::IslandsAroundMax<identifier_t>::Maximum> Acts::HoughTransformUtils::PeakFind
            ers::IslandsAroundMax<identifier_t>::findPeaks(const Acts::HoughTransformUtils::HoughPlane<identifier_t>&, const Acts::HoughTransformUtils::HoughAxisRanges&)':
  >> 442    /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.ipp:224:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
     443      224 |   std::sort(candidates.begin(), candidates.end(),
     444          |        ^~~~
     445          |        qsort
  >> 446    make[2]: *** [Examples/Algorithms/TrackFinding/CMakeFiles/ActsExamplesTrackFinding.dir/build.make:177: Examples/Algorithms/TrackFinding/CMakeFiles/ActsExamplesTrackFinding.dir/src/MuonHoughSeeder.cpp.o] Error 1
     447    make[2]: *** Waiting for unfinished jobs....
```
This appears to be due to a missing `#include <algorithm>` before the use of `std::sort` in the `.ipp` file. This PR adds the `algorithm` header to the `.hpp` file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Seeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants