Skip to content

Commit

Permalink
perf: Use inline functions (#1884)
Browse files Browse the repository at this point in the history
Move to inline functions

---------

Co-authored-by: Carlo Varni <carlovarni@MacBook-Pro-di-Carlo-3.local>
Co-authored-by: Andreas Salzburger <asalzburger@gmail.com>
  • Loading branch information
3 people committed Feb 28, 2023
1 parent 466c03c commit 208290d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Core/include/Acts/Seeding/SeedFinderUtils.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

namespace Acts {
template <typename external_spacepoint_t>
LinCircle transformCoordinates(InternalSpacePoint<external_spacepoint_t>& sp,
InternalSpacePoint<external_spacepoint_t>& spM,
bool bottom) {
inline LinCircle transformCoordinates(
InternalSpacePoint<external_spacepoint_t>& sp,
InternalSpacePoint<external_spacepoint_t>& spM, bool bottom) {
auto extractFunction =
[](const InternalSpacePoint<external_spacepoint_t>& obj)
-> std::array<float, 6> {
Expand All @@ -24,9 +24,9 @@ LinCircle transformCoordinates(InternalSpacePoint<external_spacepoint_t>& sp,
}

template <typename external_spacepoint_t, typename callable_t>
LinCircle transformCoordinates(external_spacepoint_t& sp,
external_spacepoint_t& spM, bool bottom,
callable_t&& extractFunction) {
inline LinCircle transformCoordinates(external_spacepoint_t& sp,
external_spacepoint_t& spM, bool bottom,
callable_t&& extractFunction) {
// The computation inside this function is exactly identical to that in the
// vectorized version of this function, except that it operates on a single
// spacepoint. Please see the other version of this function for more
Expand Down Expand Up @@ -59,7 +59,7 @@ LinCircle transformCoordinates(external_spacepoint_t& sp,
}

template <typename external_spacepoint_t>
std::vector<std::size_t> transformCoordinates(
inline std::vector<std::size_t> transformCoordinates(
std::vector<InternalSpacePoint<external_spacepoint_t>*>& vec,
const InternalSpacePoint<external_spacepoint_t>& spM, bool bottom,
std::vector<LinCircle>& linCircleVec) {
Expand All @@ -76,7 +76,7 @@ std::vector<std::size_t> transformCoordinates(
}

template <typename external_spacepoint_t, typename callable_t>
std::vector<std::size_t> transformCoordinates(
inline std::vector<std::size_t> transformCoordinates(
std::vector<external_spacepoint_t*>& vec, const external_spacepoint_t& spM,
bool bottom, std::vector<LinCircle>& linCircleVec,
callable_t&& extractFunction) {
Expand Down Expand Up @@ -147,7 +147,7 @@ std::vector<std::size_t> transformCoordinates(
}

template <typename external_spacepoint_t, typename sp_range_t>
bool xyzCoordinateCheck(
inline bool xyzCoordinateCheck(
const Acts::SeedFinderConfig<external_spacepoint_t>& m_config,
sp_range_t sp, const double* spacepointPosition,
double* outputCoordinates) {
Expand Down

0 comments on commit 208290d

Please sign in to comment.