From c55ec2db584809417dec899cf4ebb930802ce1bd Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Wed, 31 Jul 2024 15:16:16 +0200 Subject: [PATCH] ff/baby_bear.hpp: harmonize sqr() visibility with other implementation. --- ff/baby_bear.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;