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

feat: add transmute for views #282

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

dkales
Copy link
Contributor

@dkales dkales commented Aug 6, 2024

This adds the transmute and transmute_mut methods to CudaView and CudaViewMut types, also adds them to the tests for basic functionality checks.

@dkales
Copy link
Contributor Author

dkales commented Aug 6, 2024

This has the same doc issues as #281, but it is fixed over there

@dkales
Copy link
Contributor Author

dkales commented Aug 6, 2024

One design decision is if transmutes should consume the view types via self instead. I don't think anything inherently bad can happen in the current design.

@coreylowman
Copy link
Owner

I think using references is fine since the returned values are hooked to the lifetime of the original view and therefore of the original data.

@coreylowman
Copy link
Owner

Thanks for the contribution!

@coreylowman coreylowman merged commit 5af0873 into coreylowman:main Aug 20, 2024
2 of 3 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