From 9b3ce3c743b233858234da627c659b5b2a6cc9d6 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Tue, 2 Jul 2024 08:01:46 -0400 Subject: [PATCH] removing unused function --- include/fastmod.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/include/fastmod.h b/include/fastmod.h index 2cb9c76..226648f 100644 --- a/include/fastmod.h +++ b/include/fastmod.h @@ -5,7 +5,6 @@ #include #include #else -// In C++ / are irelevant as bool is already a type #include #endif @@ -162,18 +161,6 @@ FASTMOD_API __uint128_t computeM_u64(uint64_t d) { return M; } -FASTMOD_API __uint128_t computeM_s64(int64_t d) { - if (d < 0) - d = -d; - __uint128_t M = UINT64_C(0xFFFFFFFFFFFFFFFF); - M <<= 64; - M |= UINT64_C(0xFFFFFFFFFFFFFFFF); - M /= d; - M += 1; - M += ((d & (d - 1)) == 0 ? 1 : 0); - return M; -} - FASTMOD_API uint64_t fastmod_u64(uint64_t a, __uint128_t M, uint64_t d) { __uint128_t lowbits = M * a; return mul128_u64(lowbits, d); @@ -209,9 +196,6 @@ template FASTMOD_API int32_t fastdiv(int32_t x) { } // fastmod #endif -// There's no reason to polute the global scope with this macro once its use -// ends This won't create any problems as the preprocessor will have done its -// thing once it reaches this point #undef FASTMOD_API #undef FASTMOD_CONSTEXPR