Hi all,

Both in PyCUDA and PyOpenCL constructors of GPU arrays have
``strides`` keyword parameter, and you can create a non-contiguous
array, e.g.:

>>> import pyopencl as cl
>>> from pyopencl.array import Array
>>> import numpy
>>> ctx = cl.create_some_context()
>>> a = Array(ctx, (100,100), numpy.float32, strides=(512,4))
>>> a.strides
(512, 4)

But you cannot get it back to CPU:

>>> a.get()
...
AssertionError: Array in get() must be contiguous

And the size of the underlying buffer does not seem to correspond to
the strides:

>>> a.base_data.size
40000

So, my question is: is it just that the specific feature of
non-contiguous array support is missing at the moment, but in
principle can be implemented, or there was an actual design decision
of not supporting it at all? Or is it because the ``reorg`` fork of
compyte seems to support it, and we are waiting for it to be merged?

Best regards,
Bogdan

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to