54 panic_if(!sched_list->size(),
"OF scheduling policy sched list is "
58 int selected_wave_id = -1;
59 int selected_position = 0;
61 for (
int position = 0; position < sched_list->size(); ++position) {
62 Wavefront *cur_wave = sched_list->at(position);
63 int cur_wave_id = cur_wave->
wfDynId;
66 if (selected_wave_id == -1 || cur_wave_id < selected_wave_id) {
67 selected_wave_id = cur_wave_id;
68 selected_wave = cur_wave;
69 selected_position = position;
74 panic_if(!selected_wave,
"No wave found by OF scheduling policy.\n");
75 sched_list->erase(sched_list->begin() + selected_position);