Skip to content

Commit bd60850

Browse files
committed
perf: inline compute_pair_coordnum and switching_function
Inlining the functions is required to avoid the performance loss after refactoring.
1 parent 7eedec3 commit bd60850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/colvarcomp_coordnums.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class colvar::h_bond : public colvar::cvc {
165165

166166

167167
template <int flags>
168-
cvm::real colvar::coordnum::switching_function(cvm::real const &l2, cvm::real &dFdl2,
168+
inline cvm::real colvar::coordnum::switching_function(cvm::real const &l2, cvm::real &dFdl2,
169169
int en, int ed,
170170
cvm::real pairlist_tol)
171171
{
@@ -224,7 +224,7 @@ cvm::real colvar::coordnum::switching_function(cvm::real const &l2, cvm::real &d
224224

225225

226226
template<int flags>
227-
cvm::real colvar::coordnum::compute_pair_coordnum(cvm::rvector const &inv_r0_vec,
227+
inline cvm::real colvar::coordnum::compute_pair_coordnum(cvm::rvector const &inv_r0_vec,
228228
cvm::rvector const &inv_r0sq_vec,
229229
int en,
230230
int ed,

0 commit comments

Comments
 (0)