Skip to content

Commit

Permalink
refactor: remove constexpr from charge method (#765)
Browse files Browse the repository at this point in the history
In order to make compilers happier, and enable compilation for GPUs via hipSYCL, the `charge()` method of SingleBountTrackParameters and SingleFreeTrackParameters should not be marked constexpr, as the called method `get()` is not constexpr.

see #757
  • Loading branch information
cgleggett committed Apr 7, 2021
1 parent 5038ab6 commit 83e3d93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Core/include/Acts/EventData/SingleBoundTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class SingleBoundTrackParameters {
Vector3 momentum() const { return absoluteMomentum() * unitDirection(); }

/// Particle electric charge.
constexpr Scalar charge() const {
Scalar charge() const {
return m_chargeInterpreter.extractCharge(get<eBoundQOverP>());
}

Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/EventData/SingleFreeTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class SingleFreeTrackParameters {
Vector3 momentum() const { return absoluteMomentum() * unitDirection(); }

/// Particle electric charge.
constexpr Scalar charge() const {
Scalar charge() const {
return m_chargeInterpreter.extractCharge(get<eFreeQOverP>());
}

Expand Down

0 comments on commit 83e3d93

Please sign in to comment.