| 165 | */ |
| 166 | template <typename value_t> |
| 167 | CUTLASS_HOST_DEVICE |
| 168 | CUTLASS_CONSTEXPR_IF_CXX17 |
| 169 | value_t gcd(value_t a, value_t b) { |
| 170 | for (;;) { |
| 171 | if (a == value_t{0}) return cutlass::abs_for_integer(b); |
| 172 | b %= a; |
| 173 | if (b == value_t{0}) return cutlass::abs_for_integer(a); |
| 174 | a %= b; |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Least common multiple |
no test coverage detected