| 23 | #include <cinttypes> |
| 24 | template <class Integer> |
| 25 | static typename std::make_unsigned<Integer>::type abs_diff(Integer a, Integer b) |
| 26 | { |
| 27 | using Unsigned = typename std::make_unsigned<Integer>::type; |
| 28 | Unsigned ua = a; |
| 29 | Unsigned ub = b; |
| 30 | Unsigned diff = ua - ub; |
| 31 | if (a < b) diff = -diff; |
| 32 | return diff; |
| 33 | } |
| 34 | |
| 35 | static int verify_absdiff_char( const void *p, const void *q, const void *r, size_t n, const char *sizeName, size_t vecSize ) |
| 36 | { |
no outgoing calls
no test coverage detected