Skip to content

Commit

Permalink
ff/{bb31,gl64}_t.cuh: harmonize unary operator-() implementations.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Jan 7, 2024
1 parent 370916e commit 65739f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ff/bb31_t.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ public:

return *this;
}
friend inline bb31_t cneg(bb31_t a, bool flag)
static inline bb31_t cneg(bb31_t a, bool flag)
{ return a.cneg(flag); }
inline bb31_t operator-() const
{ bb31_t ret = *this; return ret.cneg(true); }
{ return cneg(*this, true); }

static inline const bb31_t one() { return bb31_t{ONE}; }
inline bool is_one() const { return val == ONE; }
Expand Down
4 changes: 2 additions & 2 deletions ff/gl64_t.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ public:

return *this;
}
friend inline gl64_t cneg(gl64_t a, bool flag)
static inline gl64_t cneg(gl64_t a, bool flag)
{ return a.cneg(flag); }
inline gl64_t operator-() const
{ gl64_t ret = *this; return ret.cneg(true); }
{ return cneg(*this, true); }

static inline const gl64_t one()
{ gl64_t ret; ret.val = 1; return ret; }
Expand Down

0 comments on commit 65739f4

Please sign in to comment.