Zac Diggum <[email protected]> writes:

> Hi there,
>
> I've got a newbie question:
> Imagine some cl.array on the device. Now I'd like to overwrite part of it 
> with another array or constant. Let's say I want to set half of the array to 
> 0 or something. How would I do that? array[0:y,0:x]=0. gives me a non-
> contiguous error...

Right. There are two things in what you're writing that aren't really
supported: (1) broadcasting, and (2) non-contiguous transfers. (You
realize why your transfer is non-contiguous, right?) For (2), Toby
Smithe wrote a patch a while ago:

https://github.com/pyopencl/pyopencl/pull/54

For (1), you'd need to create a correctly sized host array first and
then transfer that. (Lame, I know. Better tools are on the way. :)

Andreas

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to