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

61bit field #1019

Merged
merged 7 commits into from
Apr 24, 2024
Merged

61bit field #1019

merged 7 commits into from
Apr 24, 2024

Conversation

danielmasny
Copy link
Collaborator

straightforward implementation of 61bit fields, i.e. prime fields for prime 2^61-1

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.61%. Comparing base (032e9c5) to head (4c2bc7e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1019      +/-   ##
==========================================
+ Coverage   90.57%   90.61%   +0.04%     
==========================================
  Files         170      170              
  Lines       24763    25137     +374     
==========================================
+ Hits        22428    22779     +351     
- Misses       2335     2358      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andyleiserson
Copy link
Collaborator

Is it necessary to add the new field to enum FieldType? In #1009 I make FieldType a no-op for IPA queries and add a new type parameter HV for the output histogram values (which will itself need to be changed, along with TV, BK, and TS, for #953).

ipa-core/src/ff/prime_field.rs Outdated Show resolved Hide resolved
ipa-core/src/ff/prime_field.rs Outdated Show resolved Hide resolved
ipa-core/src/ff/prime_field.rs Outdated Show resolved Hide resolved
<$store_multiply>::MAX >> $bits
>= <$store_multiply>::try_from(<$store>::MAX).unwrap()
);
const_assert!((<$store_multiply>::MAX >> $bits) as u128 >= (<$store>::MAX) as u128);
Copy link
Collaborator

Choose a reason for hiding this comment

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

hopefully the compiler will optimize it, but you could also lift this statement outside of this function because it belongs to the macro itself

@danielmasny danielmasny merged commit 050a20f into private-attribution:main Apr 24, 2024
11 checks passed
@danielmasny danielmasny deleted the 61bit_field branch April 24, 2024 01:02
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

3 participants