abs_diff() Returns absolute difference of x and y
| 80 | // abs_diff() |
| 81 | // Returns absolute difference of x and y |
| 82 | inline __device__ int abs_diff(const int x, const int y) { |
| 83 | int i = x - y; |
| 84 | return max(-i, i); |
| 85 | } |
| 86 | inline __device__ unsigned abs_diff(const unsigned x, const unsigned y) { |
| 87 | int i = (int)x - (int)y; |
| 88 | return max(-i, i); |
no test coverage detected