Skip to content

Use slice::align_to #135

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

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Use slice::align_to #135

merged 1 commit into from
Jul 25, 2024

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Jul 19, 2024

When checking that tensor data can be converted to a slice of T, we previously were checking the right things: is the length right? Is the alignment correct? Turns out there is a std function that does this for us: slice::align_to. Replacing the custom check with the std version should have no effect on the code other than clarity.

When checking that tensor data can be converted to a slice of `T`, we
previously were checking the right things: is the length right? Is the
alignment correct? Turns out there is a `std` function that does this
for us: `slice::align_to`. Replacing the custom check with the `std`
version should have no effect on the code other than clarity.
@abrown abrown requested a review from rahulchaphalkar July 19, 2024 17:55
@rahulchaphalkar rahulchaphalkar merged commit 190261d into intel:main Jul 25, 2024
15 checks passed
@abrown abrown deleted the tweak-alignment branch July 25, 2024 20:16
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.

2 participants