chore: fix accumulation logic for PrimeField vectors#416
chore: fix accumulation logic for PrimeField vectors#416mdqst wants to merge 3 commits intomicrosoft:mainfrom
PrimeField vectors#416Conversation
|
Can you say more on what the issue with using sum is? |
|
srinathsetty, |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the accumulation logic for PrimeField vectors by replacing .sum() with an explicit .fold(F::zero(), |acc, x| acc + x) operation. This change ensures correct behavior when summing field elements in the sparse matrix-vector multiplication implementation.
Key Changes:
- Updated the accumulation method in
SparseMatrix::multiplyto use explicit folding instead of.sum()
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
srinathsetty, lets merge it |
Can we please fix CI failures? |
|
srinathsetty done |
|
srinathsetty lets merge it |
updated the accumulation from using
.sum()to an explicit.fold(F::zero(), |acc, x| acc + x).this ensures correct behavior for all
F: PrimeFieldtypes and resolves the issue with summing field elements.