Hi Christian, On Wed, 27 Apr 2011 14:51:26 +0200, christian schilling <[email protected]> wrote: > first my comment: i think think it is a great idea to unify all > transfer functions into a single one. > > but i started to change my code but ran into problems: > I'll skip the class around the snippets but i think it should be clear > whats going on.. > > i create a in Image: > self.device_buffer = > cl.Image(ctx,self.flags,self.image_format,shape=self.shape) > > and after running some kernels on it read it back to the host: > output_array = numpy.empty(self.shape,dtype='float32') > cl.enqueue_read_image(queue,self.device_buffer,(0,0),output_array.shape,output_array).wait() > > this works as expected. but if i change the last line to: > cl.enqueue_copy(queue,output_array,self.device_buffer,origin=(0,0),region=output_array.shape).wait() > > i get: > File > "/usr/local/lib/python2.6/dist-packages/pyopencl-2011.1beta3-py2.6-linux-x86_64.egg/pyopencl/__init__.py", > line 553, in enqueue_copy > return _cl._enqueue_read_image(queue, src, dest, **kwargs) > Boost.Python.ArgumentError: Python argument types in > pyopencl._cl._enqueue_read_image(CommandQueue, Image, numpy.ndarray) > did not match C++ signature: > _enqueue_read_image(pyopencl::command_queue {lvalue} queue, > pyopencl::image {lvalue} mem, boost::python::api::object origin, > boost::python::api::object region, boost::python::api::object hostbuf, > unsigned long row_pitch=0, unsigned long slice_pitch=0, > boost::python::api::object wait_for=None, bool is_blocking=True, > boost::python::api::object host_buffer=None) >
Thanks for the report, this should be fixed in git. Andreas
pgpKdprz6Unuh.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
