DLSCH sched: only sort relevant part of list

This reduces the amount of elements to compare.

See also: 7ee8e8eaba ("Fix bug: only sort relevant part of list")
This commit is contained in:
Robert Schmidt
2025-08-21 10:32:23 +02:00
parent 9e37a2cf94
commit 8a091a0b84
@@ -613,7 +613,7 @@ static void pf_dl(module_id_t module_id,
int remainUEs[num_beams];
for (int i = 0; i < num_beams; i++)
remainUEs[i] = max_num_ue;
int curUE = 0;
int numUE = 0;
int CC_id = 0;
int slots_per_frame = mac->frame_structure.numb_slots_frame;
@@ -704,13 +704,13 @@ static void pf_dl(module_id_t module_id,
tbs,
coeff_ue);
/* Create UE_sched list for UEs eligible for new transmission*/
UE_sched[curUE].coef=coeff_ue;
UE_sched[curUE].UE=UE;
curUE++;
UE_sched[numUE].coef = coeff_ue;
UE_sched[numUE].UE = UE;
numUE++;
}
}
qsort(UE_sched, sizeofArray(UE_sched), sizeof(UEsched_t), comparator);
qsort(UE_sched, numUE, sizeof(UEsched_t), comparator);
UEsched_t *iterator = UE_sched;
const int min_rbSize = 5;