From f3debb7a7004e0dec30b3b7577d500d38ee72555 Mon Sep 17 00:00:00 2001 From: csrichter Date: Thu, 11 May 2017 14:48:37 +0200 Subject: [PATCH] max 15 comparisons --- lib/sync_decim_impl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sync_decim_impl.cc b/lib/sync_decim_impl.cc index af31069..a32d9a4 100644 --- a/lib/sync_decim_impl.cc +++ b/lib/sync_decim_impl.cc @@ -139,9 +139,9 @@ namespace gr { float out_noskip; float out_skip; int skip_is_better_counter=0; - if (noutput_items>4)//TODO: what if there are never more than 9 outputs requested + if (noutput_items>4)//min 4 comparisons TODO: what if there are never more than 4 outputs requested { - for (int i = 0; i < noutput_items; i++) {//TODO set max loop length -> cpu load + for (int i = 0; i < std::max(15,noutput_items); i++) {//max 15 comparisons -> cpu load if(i==0){ out_skip=last_input-in[DECIM*i];} else{ @@ -170,7 +170,7 @@ namespace gr { //lout<<"\t,out_skip:"<3){//2017-05-02 lowered from 6 + if (skip_is_better_counter>3){ pmt::pmt_t meta(pmt::from_long(4)); pmt::pmt_t data(pmt::from_long(SKIP));