diff --git a/ff/baby_bear.hpp b/ff/baby_bear.hpp index 654f5f7..9792b04 100644 --- a/ff/baby_bear.hpp +++ b/ff/baby_bear.hpp @@ -88,10 +88,6 @@ class __align__(16) bb31_4_t { __host__ __device__ __forceinline__ bb31_4_t(int d, int f, int g, int h) { c[0] = bb31_t{d}; c[1] = bb31_t{f}; c[2] = bb31_t{g}; c[3] = bb31_t{h}; } -private: - static inline uint32_t final_sub(uint32_t& u) - { if (u >= MOD) u -= MOD; return u; } - // Polynomial multiplication/squaring modulo x^4 - BETA inline bb31_4_t& sqr() { @@ -232,6 +228,10 @@ class __align__(16) bb31_4_t { return *this = ret; } +private: + static inline uint32_t final_sub(uint32_t& u) + { if (u >= MOD) u -= MOD; return u; } + inline bb31_4_t& mul(const bb31_4_t& b) { bb31_4_t ret;