[PyOpenCL] boolean array -> pyopencl buffer
Andreas Kloeckner
lists at informa.tiker.net
Wed Mar 7 07:01:36 PST 2012
<#part sign=pgpmime>
On Wed, 07 Mar 2012 13:01:00 +0100, Omar <programming at toomuchcookies.net> 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.
Andreas
More information about the PyOpenCL
mailing list