Skip to content

Commit

Permalink
removed ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
timosachsenberg committed Jan 30, 2024
1 parent c82ccb7 commit eadc920
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
31 changes: 0 additions & 31 deletions src/openms/include/OpenMS/KERNEL/MSSpectrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,37 +339,6 @@ namespace OpenMS

//@}

/*
/// @brief Branchless binary search for the lower bound of a value in a sorted range.
template<typename It, typename T, typename Cmp>
static inline It lower_bound(It begin, It end, const T& value, Cmp comp)
{
size_t n = end - begin;
if (n == 0) return begin;
size_t two_k = size_t(1) << (boost::core::bit_width(n) - 1);
size_t b = __builtin_unpredictable(comp(begin[n / 2], value) ? n - two_k : -1);
for (size_t bit = two_k >> 1; bit != 0; bit >>= 1) {
if (comp(begin[b + bit], value)) b += bit;
}
return begin + (b + 1);
}
/// @brief Branchless binary search for the upper bound of a value in a sorted range.
template<typename It, typename T, typename Cmp>
static inline It upper_bound(It begin, It end, const T& value, Cmp comp)
{
size_t n = end - begin;
size_t b = 0;
for (size_t bit = boost::core::bit_floor(n); bit != 0; bit >>= 1) {
size_t i = (b | bit) - 1;
if (i < n && !comp(value, begin[i])) b |= bit;
}
return begin + b;
}
*/


///@name Searching a peak or peak range
///@{
/**
Expand Down
4 changes: 0 additions & 4 deletions src/openms/source/KERNEL/MSExperiment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ namespace OpenMS
std::vector<CoordinateType> res;
res.resize(idcs.size());

#ifdef _OPENMP
#pragma omp parallel for
#endif
for (Size i = 0; i < idcs.size(); ++i)
{
CoordinateType acc = 0.0;
Expand All @@ -247,9 +245,7 @@ namespace OpenMS
std::vector<CoordinateType> res;
res.resize(idcs.size());

#ifdef _OPENMP
#pragma omp parallel for
#endif
for (Size i = 0; i < idcs.size(); ++i)
{
const auto& spec = spectra_[idcs[i]];
Expand Down

0 comments on commit eadc920

Please sign in to comment.