Skip to content

Commit

Permalink
ff/baby_bear.hpp: harmonize sqr() visibility with other implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Jul 31, 2024
1 parent 9e9cb9a commit c55ec2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ff/baby_bear.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c55ec2d

Please sign in to comment.