Update minisketch subtree to latest master

This commit is contained in:
fanquake
2026-08-15 15:05:06 +01:00
2 changed files with 17 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
#include "../int_utils.h" #include "../int_utils.h"
#include "../lintrans.h" #include "../lintrans.h"
#include "../util.h"
namespace { namespace {
@@ -28,7 +29,7 @@ namespace {
# define NO_SANITIZE_MEMORY # define NO_SANITIZE_MEMORY
#endif #endif
template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY I MulWithClMulReduce(I a, I b) template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY MAYBE_UNUSED I MulWithClMulReduce(I a, I b)
{ {
static constexpr I MASK = Mask<BITS, I>(); static constexpr I MASK = Mask<BITS, I>();
@@ -65,7 +66,7 @@ template<typename I, int BITS, I MOD> NO_SANITIZE_MEMORY I MulWithClMulReduce(I
} }
} }
template<typename I, int BITS, int POS> NO_SANITIZE_MEMORY I MulTrinomial(I a, I b) template<typename I, int BITS, int POS> NO_SANITIZE_MEMORY MAYBE_UNUSED I MulTrinomial(I a, I b)
{ {
static constexpr I MASK = Mask<BITS, I>(); static constexpr I MASK = Mask<BITS, I>();

View File

@@ -26,6 +26,20 @@
#define EXPECT(x,c) (x) #define EXPECT(x,c) (x)
#endif #endif
#if defined(__has_cpp_attribute)
# if __has_cpp_attribute(maybe_unused)
# define MAYBE_UNUSED [[maybe_unused]]
# endif
#endif
#ifndef MAYBE_UNUSED
# if defined(__GNUC__)
# define MAYBE_UNUSED __attribute__((unused))
# else
# define MAYBE_UNUSED
# endif
#endif
/* Assertion macros */ /* Assertion macros */
/** /**