Am 07.03.2012 16:01, schrieb Andreas Kloeckner:
<#part sign=pgpmime>
On Wed, 07 Mar 2012 13:01:00 +0100, Omar<[email protected]>  wrote:
Hi,

I'm trying to copy the content of a boolean numpy array into gpu-memory.
The problem is: numpy boolean dtype is actually a byte [1] so the
resulting buffer is much larger than what i need and i can't access it
correctly using booleans.
Not sure what you mean here--a C99 bool is also a byte. If you'd like
this packed into a bit array, you'd have to write a kernel that does
that.

Thank you very much. This was an information i needed. I was trying my luck with bitarrays and numpy buffers...

My problem is the following: I have a rather big boolean 3d-array (6000x1000x50) and i need to perform some processing (actually morphologic thinning). My program stops working if i input the whole array, but if i only input 500x500x30, it works. I thought it might be a memory issue (i should have 256mb) and i wanted to try to reduce the amount of memory used by using a bit for every cell (effectively reducing the memory consumption by 8).


Andreas


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

Reply via email to