(lanes: Lanes)
| 761 | } |
| 762 | |
| 763 | export function pickArbitraryLane(lanes: Lanes): Lane { |
| 764 | // This wrapper function gets inlined. Only exists so to communicate that it |
| 765 | // doesn't matter which bit is selected; you can pick any bit without |
| 766 | // affecting the algorithms where its used. Here I'm using |
| 767 | // getHighestPriorityLane because it requires the fewest operations. |
| 768 | return getHighestPriorityLane(lanes); |
| 769 | } |
| 770 | |
| 771 | function pickArbitraryLaneIndex(lanes: Lanes) { |
| 772 | return 31 - clz32(lanes); |
no test coverage detected