| 16 | namespace kernel { |
| 17 | |
| 18 | inline int idx_y(int i) { |
| 19 | using std::clamp; |
| 20 | if (i >= 8) return clamp(-(i - 8 - 4), -3, 3); |
| 21 | |
| 22 | return clamp(i - 4, -3, 3); |
| 23 | } |
| 24 | |
| 25 | inline int idx_x(int i) { |
| 26 | if (i < 12) return idx_y(i + 4); |
no test coverage detected