Skip to content

Conversation

yshekel
Copy link
Collaborator

@yshekel yshekel commented Jun 18, 2025

Some APIs operate on scalar elements rather than polynomials. To use them with polynomial data, we need to reinterpret polynomial slices as flat slices of their scalar coefficients.

This PR introduces four functions to safely flatten HostSlice and DeviceSlice—both mutable and immutable—into corresponding slices of scalar elements.

cuda-backend-branch: main
metal-backend-branch: main

where
P: Clone,
{
pub fn check_vector_alloc<P: PolynomialRing>() {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just removed the trait bound but actually it's a silly test. I will remove it

Copy link
Contributor

@LeonHibnik LeonHibnik left a comment

Choose a reason for hiding this comment

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

Nice, we should refactor the icicle-core/src/tests file in the future @yshekel

@yshekel
Copy link
Collaborator Author

yshekel commented Jun 18, 2025

Nice, we should refactor the icicle-core/src/tests file in the future @yshekel

agreed

@yshekel yshekel merged commit 82df3cb into main Jun 18, 2025
21 of 31 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