since line 73 has moved options backward by one space (towards head) when doNotMonitor is true, idx shouldn't increase in such case.
For example, we have two gpus with [1:doNotMonitor:false, 2:doNotMonitor:true], current code would first check gpu1 and move it to the tail, after that, gpus' options would become [2:doNotMonitor:true, 1:doNotMonitor:false]. Then in next iteration, code will check gpu1 again and gpu2's option is ignored.
since line 73 has moved options backward by one space (towards head) when doNotMonitor is true, idx shouldn't increase in such case.
For example, we have two gpus with [1:doNotMonitor:false, 2:doNotMonitor:true], current code would first check gpu1 and move it to the tail, after that, gpus' options would become [2:doNotMonitor:true, 1:doNotMonitor:false]. Then in next iteration, code will check gpu1 again and gpu2's option is ignored.