| 22 | namespace kernel { |
| 23 | |
| 24 | inline __device__ int idx_y(const int i) { |
| 25 | int j = i - 4; |
| 26 | int k = min(j, 8 - j); |
| 27 | return clamp(k, -3, 3); |
| 28 | } |
| 29 | |
| 30 | inline __device__ int idx_x(const int i) { return idx_y((i + 4) & 15); } |
| 31 |
no test coverage detected