On Sat, 16 Jul 2011 22:46:53 +0200, Kevin Bullmann <[email protected]> wrote:
>   Hi
> 
> I was trying to get my head around reduction kernels and wanted to run 
> the example from the doctumentation. I ran in some trouble doing so.
> Here is the complete code I tried to run:
> 
> import pyopencl as cl
> import pyopencl.array
> import pyopencl.reduction
> import numpy
> 
> if __name__ == '__main__':
>      context = cl.Context(None, 
> [(cl.context_properties.PLATFORM,cl.get_platforms()[0])], 
> cl.device_type.GPU)
>      queue = cl.CommandQueue(context)
> 
>      a = cl.array.arange(400, dtype=numpy.float32)
>      b = cl.array.arange(400, dtype=numpy.float32)

arange takes a queue as a first argument.

Andreas

Attachment: pgp6i7xruzEBf.pgp
Description: PGP signature

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

Reply via email to