[PyOpenCL] Problem with Images
christian schilling
initcrash at googlemail.com
Mon Nov 22 10:02:31 PST 2010
Hi list,
has anybody used the cl.Image functionality?
i tried, but something seems very wrong (code attached).
The code produces the output:
[[ 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 2. 2. 2.]
[ 2. 2. 3. 3. 3. 3. 3. 4. 4. 4. 4. 4. 5.]
[ 5. 5. 5. 5. 6. 6. 6. 6. 6. 7. 7. 7. 7.]
[ 7. 8. 8. 8. 8. 8. 9. 9. 9. 9. 9. 10. 10.]
[ 10. 10. 10. 11. 11. 11. 11. 11. 12. 12. 12. 12. 12.]]
while i'd expect:
[[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]
[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]
[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]
[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]
[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]]
a similar problem occours when reading images.
it seems like opencl uses a diffent buffer layout from numpy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageproblem.py
Type: text/x-python
Size: 738 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyopencl/attachments/20101122/b95367a8/attachment.py>
More information about the PyOpenCL
mailing list