Skip to content

Commit

Permalink
Merge pull request #3954 from randombit/jack/mp-constexpr
Browse files Browse the repository at this point in the history
Modify mp algos to be constexpr and templatized over the word type
  • Loading branch information
randombit committed Mar 29, 2024
2 parents 928fde6 + 514966e commit 5f47e7b
Show file tree
Hide file tree
Showing 8 changed files with 642 additions and 493 deletions.
2 changes: 1 addition & 1 deletion src/lib/math/bigint/bigint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ void BigInt::ct_cond_swap(bool predicate, BigInt& other) {
grow_to(max_words);
other.grow_to(max_words);

bigint_cnd_swap(predicate, this->mutable_data(), other.mutable_data(), max_words);
bigint_cnd_swap(static_cast<word>(predicate), this->mutable_data(), other.mutable_data(), max_words);
}

void BigInt::cond_flip_sign(bool predicate) {
Expand Down

0 comments on commit 5f47e7b

Please sign in to comment.