Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ff/mont32_t.cuh, a generalized template for <=32-bit moduli. #44

Merged
merged 12 commits into from
Jun 21, 2024

Conversation

dot-asm
Copy link
Collaborator

@dot-asm dot-asm commented Jun 16, 2024

[and some other adjustments.]

@sandsentinel sandsentinel self-requested a review June 17, 2024 13:13
@dot-asm dot-asm force-pushed the mont32_t branch 2 times, most recently from f2f7343 to a030ac3 Compare June 19, 2024 09:39
ff/baby_bear.hpp Outdated
# if defined(_GLIBCXX_IOSTREAM) || defined(_IOSTREAM_) // non-standard
friend std::ostream& operator<<(std::ostream& os, const bb31_4_t& a)
{
os << "[" << a.c[0] << ", " a.c[1] << ", " a.c[2] << ", " << a.c[3] << "]";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a missing << here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops. Fixed.

Users are more likely than not have to pass -DBABY_BEAR_CANONICAL to
the compiler, because not doing so aligns this implementation with a
noncanonical implementation in RISC Zero.
LDE_spread_distribute_powers was producing incorrect results in
lg_blowup > lg_domain_size cases, which can occur in tests.
Customarily one uses primitive root as generator, but RISC Zero
used an alternative generator, which remains the default choice.
@dot-asm dot-asm merged commit e4406a8 into supranational:main Jun 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants