-
Notifications
You must be signed in to change notification settings - Fork 14
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
Initializing temp_array as a view of another array #38
Comments
So do you essentially want to create a view of a temporary array? What is the use case here? Because if the only difference is the offset, this view will be accessed in exactly the same way from a kernel. |
Wait, really? I thought macros like |
Except, of course, that you can't do that during a planned computation anyway, and outside that you can just use |
That actually bothers me a lot as well, and I have plans for a new API that will make writing and debugging computations easier. But that's a different story.
They do, I misunderstood you. So you want two temporary arrays pointing at the same physical buffer at different offsets? Not sure how to organize it better... |
Heh. Best of luck, then.
Pretty much, yeah. Ideally an equivalent to numpy's |
It'd be nice if there was a way to reinterpret an array "in place" - for example, taking an array with a non-zero offset and building from it a view with zero offset (so that the new 'array' starts, presumably, with some number of padding zeroes) - without creating an entire new array and copying all the data over for the purpose. This can now be done with
Thread.array(base=)
, but as far as I can tell there's no way to do in the planning stage, without access to the actualThread
object, and I'm not sure how it'd behave when called on a temporary array anyway.The text was updated successfully, but these errors were encountered: