diff options
Diffstat (limited to 'test/util.h')
| -rw-r--r-- | test/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/util.h b/test/util.h index 0c14ff8..e0d9b57 100644 --- a/test/util.h +++ b/test/util.h @@ -10,6 +10,14 @@ namespace INT {constexpr int INF = 0x3FFF'FFFF;} namespace LL {constexpr ll INF = 0x3FFF'FFFF'FFFF'FFFFll;} namespace LD {constexpr ld INF = numeric_limits<ld>::infinity();} +template<typename T> +T _lg_check(T n) { + assert(n > 0); + return __lg(n); +} + +#define __lg _lg_check + namespace details { template<typename T = ll> bool isPrime(T x) { |
