-
Notifications
You must be signed in to change notification settings - Fork 224
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
feat(math): add baby and koala bear fields #405
Conversation
a2a5225
to
ed4c61b
Compare
tachyon/math/finite_fields/mersenne31/packed_mersenne31_avx2.cc
Outdated
Show resolved
Hide resolved
tachyon/math/finite_fields/generator/prime_field_generator/build_defs.bzl
Outdated
Show resolved
Hide resolved
8e1026e
to
e78c839
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In commit body of 8df7697, typo exists. Please fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e78c839
to
79fa9f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the commit title and body of 8df7697 as such:
chore(math): update comments to contain montgomery form & fix minor errors
For the 31-bit prime field, the montgomery form is a * R
, where R is 2³² , so value a
can be in the range {0, ..., p}, where p is the modulus. The
comments are also updated to handle this case.
Additionally, this commit also contains minor fixes, such as changing P
to p
and removing commas and periods.
tachyon/math/finite_fields/mersenne31/packed_mersenne31_avx2.cc
Outdated
Show resolved
Hide resolved
tachyon/math/finite_fields/mersenne31/packed_mersenne31_avx2.cc
Outdated
Show resolved
Hide resolved
tachyon/math/finite_fields/mersenne31/packed_mersenne31_avx2.cc
Outdated
Show resolved
Hide resolved
c1648d4
to
f9313a2
Compare
f9313a2
to
fd9f1dd
Compare
…rrors For the 31-bit prime field, the montgomery form is `a * R`, where R is 2³², so value `a` can be in the range {0, ..., p}, where p is modulus. The comments are also updated to handle this case. Additionally, this commit also contains minor fixes, such as changing `P` to `p` and removing commas and periods.
See https://github.com/Plonky3/Plonky3/blob/6034010ae178439fffee55fd71f8105f62577a35/baby-bear/src/x86_64_avx2/packing.rs, https://github.com/Plonky3/Plonky3/blob/6034010ae178439fffee55fd71f8105f62577a35/baby-bear/src/x86_64_avx512/packing.rs and https://github.com/Plonky3/Plonky3/blob/6034010ae178439fffee55fd71f8105f62577a35/baby-bear/src/aarch64_neon/packing.rs.
See https://github.com/Plonky3/Plonky3/blob/6034010ae178439fffee55fd71f8105f62577a35/koala-bear/src/x86_64_avx2/packing.rs, https://github.com/Plonky3/Plonky3/blob/6034010ae178439fffee55fd71f8105f62577a35/koala-bear/src/x86_64_avx512/packing.rs and https://github.com/Plonky3/Plonky3/blob/6034010ae178439fffee55fd71f8105f62577a35/koala-bear/src/aarch64_neon/packing.rs.
fd9f1dd
to
8281077
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR adds baby bear and koala bear prime fields.