34 #ifndef __GPU_COMPUTE_OF_SCHEDULING_POLICY_HH__
35 #define __GPU_COMPUTE_OF_SCHEDULING_POLICY_HH__
53 panic_if(!sched_list->size(),
"OF scheduling policy sched list is "
57 int selected_wave_id = -1;
58 int selected_position = 0;
60 for (
int position = 0; position < sched_list->size(); ++position) {
61 Wavefront *cur_wave = sched_list->at(position);
62 int cur_wave_id = cur_wave->
wfDynId;
65 if (selected_wave_id == -1 || cur_wave_id < selected_wave_id) {
66 selected_wave_id = cur_wave_id;
67 selected_wave = cur_wave;
68 selected_position = position;
73 panic_if(!selected_wave,
"No wave found by OF scheduling policy.\n");
74 sched_list->erase(sched_list->begin() + selected_position);
80 #endif // __GPU_COMPUTE_OF_SCHEDULING_POLICY_HH__