Skip to content

Provide more direct mutable access to shape, strides, and owned Vec #429

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

Open
jturner314 opened this issue Mar 19, 2018 · 1 comment
Open

Comments

@jturner314
Copy link
Member

It would useful in some cases to have more direct mutable access to the shape, strides, and data representation. This could be resolved with setters that perform safety checks instead of just providing &mut references to the fields themselves. See #425, in particular this comment for some ideas. This does warrant some more discussion, so I'm creating this issue.

@bluss
Copy link
Member

bluss commented Mar 20, 2018

Vec -> We have a hard time exposing a Vec by reference. Ideally we should be able to use our own allocator (let's imagine one where we could request a 64-byte alignment for the data, or something like that).

Sounds good. With strides we have the issue of moving to the more type correct isize values for strides. (What we have today is isize values stored in usize memory.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants