Skip to content

Commit

Permalink
put Put_spectrum struct into anonymous namespace
Browse files Browse the repository at this point in the history
to help the compiler optimize it away
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Dec 2, 2016
1 parent 1021192 commit 822ab0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/librarylink.cpp.in
Expand Up @@ -558,12 +558,14 @@ void put_spectrum(const @ModelName@_slha<algorithm_type>& model, MLINK link)

/******************************************************************/

namespace {
struct Put_spectrum {
MLINK link;
explicit Put_spectrum(MLINK link_) : link(link_) {}
template<typename T>
void operator()(const T& model) const { put_spectrum(model, link); }
};
} // anonymous namespace

template<typename... Ts>
void put_spectra(const std::tuple<Ts...>& models, MLINK link)
Expand Down

0 comments on commit 822ab0e

Please sign in to comment.