From 8ed8b94ca5da1d213d55e85248a19d3b5c6f9333 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 16 Apr 2021 17:21:47 +0100 Subject: [PATCH] in search for contiguous prb interval, skip already scanned prbs --- srsenb/src/stack/mac/schedulers/sched_base.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srsenb/src/stack/mac/schedulers/sched_base.cc b/srsenb/src/stack/mac/schedulers/sched_base.cc index 123eccf8f..0eb785a5f 100644 --- a/srsenb/src/stack/mac/schedulers/sched_base.cc +++ b/srsenb/src/stack/mac/schedulers/sched_base.cc @@ -25,7 +25,7 @@ RBInterval find_contiguous_interval(const RBMask& in_mask, uint32_t max_size) { RBInterval max_interv; - for (size_t n = 0; n < in_mask.size(); n++) { + for (size_t n = 0; n < in_mask.size();) { int pos = in_mask.find_lowest(n, in_mask.size(), false); if (pos < 0) { break; @@ -40,6 +40,7 @@ RBInterval find_contiguous_interval(const RBMask& in_mask, uint32_t max_size) if (interv.length() > max_interv.length()) { max_interv = interv; } + n = interv.stop(); } return max_interv; }