[PyOpenCL] Passing a floatn directly to a kernel
David Libault
david.libault at gmail.com
Thu Dec 9 00:45:29 PST 2010
When making the kernel simple, I didn't get the problem, so the
problem is somewhere else in my code...
So, passing a floatn to a kernel directly using a numpy array of n
float32 does work.
Sorry for that.
David.
2010/12/8 Andreas Kloeckner <lists at informa.tiker.net>:
> On Wed, 8 Dec 2010 11:36:23 +0100, David Libault <david.libault at gmail.com> wrote:
>> Hi,
>>
>> In the mandelbrot example of the pyopencl source, a np.uint16 type is
>> passed "directly" to a kernel as a ushort const.
>> Is it possible to do the same thing with an opencl floatn vector type
>> instead of a ushort ?
>> If so what would be the corresponding numpy type ?
>>
>> I have tried passing directly a numpy.array of size n without success
>> : I get a crash. That doesn't surprise me as it probably tries to pass
>> a pointer instead of a value...
>
> Can you post the crashing code? I don't (yet?) see why it wouldn't work.
>
> Andreas
>
>
More information about the PyOpenCL
mailing list