Skip to content

Conversation

yshekel
Copy link
Collaborator

@yshekel yshekel commented Jun 29, 2025

This PR changes the balanced base-b decomposition for Zq scalars to use a digit-major layout, consistent with the existing behavior for Rq polynomials. This enables unified and consolidated implementation across scalar and polynomial types.

Also testing case where input values are small and a user allocates a smaller output buffer for digits.

cuda-backend-branch: yshekel/balanced_decomposition_zq_digit_major_digit

@yshekel yshekel force-pushed the yshekel/balanced_decomposition_zq_digit_major branch from 4964227 to 6210f89 Compare June 29, 2025 13:08
@@ -322,5 +206,4 @@ static eIcicleError cpu_recompose_from_balanced_digits_PolyRing(
return eIcicleError::SUCCESS;
}

REGISTER_BALANCED_DECOMPOSITION_POLYRING_BACKEND(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should REGISTER_BALANCED_DECOMPOSITION_POLYRING_BACKEND be removed from vec_ops_backend.h?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, good catch. I will fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@yshekel yshekel merged commit 318eee9 into main Jun 30, 2025
19 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.

3 participants