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

Reallocate/Reshape in Ctor #94

Open
ryanmrichard opened this issue Jul 18, 2022 · 0 comments
Open

Reallocate/Reshape in Ctor #94

ryanmrichard opened this issue Jul 18, 2022 · 0 comments

Comments

@ryanmrichard
Copy link
Member

For any of TensorWrapper's ctors which take a Buffer, the ctor should make sure that non-empty Buffers are consistent with the shape and allocators provided. This means the Buffer should be reshaped and/or reallocated as needed. If the Buffer is empty, then we assume that shape and allocator are being used as hints for how to eventually fill the Buffer (and nothing needs to be done until the buffer is filled).

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

No branches or pull requests

1 participant