On Sun, 21 Aug 2011 08:57:43 +0000 (UTC), Steven <[email protected]> wrote:
> The problem is that my_array.flatten[:16384] only returns an array with 
> 16384 elements if my_array is at least that large.  In my case, it's 
> actually slightly smaller in the edge case, since I have to add a dead zone 
> to the end of the image so that it slices into buffers of the same size. 
> However, the input image is unsliced and thus doesn't have this dead zone, 
> hence the final slice will go out of bounds and end up truncated.
> 
> This causes enqueue_copy to fail with an INVALID PARAMETER error, which I 
> strongly suspect is because the source array and destination buffer are of 
> different sizes.  Ideally, it would not fail, but rather simply copy 
> min(source_size,dest_size) bytes, which is the desired result in this case.

Copying a small source array into a big destination array is fine
according to my experiments. You can test this by simply allocating too
much memory in examples/demo.py. Can you post a simplified test that
exhibits the behavior you describe?

Andreas

Attachment: pgpPDITL7r6VC.pgp
Description: PGP signature

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

Reply via email to