Skip to content

Commit

Permalink
changed the position of the define near to where it is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed May 15, 2024
1 parent b74c0a1 commit 30e4ec4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/tools/MergeVectorTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
#include <vector>
#include <algorithm>
#include <type_traits>
#ifdef __NVCOMPILER
#define PLMDAUTO typename C::value_type
#else
//I prefer letting gcc doing his work
#define PLMDAUTO auto
#endif

namespace PLMD {

namespace mergeVectorTools {
Expand All @@ -56,6 +51,12 @@ static void mergeSortedVectors(const C* const* vecs, std::size_t size, std::vect
/// to allow using a priority_queu, which selects the highest element.
/// we here (counterintuitively) define < as >
bool operator< (Entry const& rhs) const { return top() > rhs.top(); }
#ifdef __NVCOMPILER
#define PLMDAUTO typename C::value_type
#else
//I prefer letting gcc doing his work
#define PLMDAUTO auto
#endif
const PLMDAUTO & top() const { return *fwdIt; }
void next() { ++fwdIt;};
};
Expand Down

0 comments on commit 30e4ec4

Please sign in to comment.