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

Impl sub, mul and div for actual objects #3

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

Cesar199999
Copy link

@Antonio95
Copy link

Antonio95 commented Jun 25, 2024

Very sorely needed, thanks. Maybe there's a reason why it wasn't implemented in Arkworks (maybe Marcin knows about it; avoiding cloning?), but the syntax it requires is a nightmare

@mmagician
Copy link

I'm not sure, maybe @Pratyush knows?

@Pratyush
Copy link

Pratyush commented Jun 25, 2024

I think adding the APIs makes sense; I just hadn't added them because these versions move the input polynomials, so the caller will have to do a.clone() - b.clone() (for example).

@Cesar199999
Copy link
Author

I'd say adding pass-by-value arithmetic shouldn't be too problematic since (1) it's already there for polynomial sum and (2) the user can still use the reference analogues if he doesn't want to consume the objects.

@mmagician
Copy link

@Cesar199999 probably worth adding upstream directly, then

Copy link

@Antonio95 Antonio95 left a comment

Choose a reason for hiding this comment

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

Very cool! Not cloning or moving data.

Co-authored-by: Antonio Mejías Gil <anmegi.95@gmail.com>
@Cesar199999
Copy link
Author

@Cesar199999 probably worth adding upstream directly, then

Sure, arkworks-rs#843

@Antonio95 Antonio95 merged commit c2fc330 into master Jun 26, 2024
38 checks 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.

4 participants