Hello,

I have run into a question while using 1d arrays in OpenCL. I am able to multiply a 1d array*=scalar. When I try to multiply a 1d array by another 1d array, it works fine as: newarray=a*b but when I try a*=b, I run into problems.

Here is the output:

    a_gpu*=b_gpu
  File "/home/andrewmiller/dev/root/pyopencl/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py", line 631, in __imul__
    self._axpbz(self, scalar, self, self.dtype.type(0))
  File "/home/andrewmiller/dev/root/pyopencl/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py", line 155, in kernel_runner
    knl = kernel_getter(*args)
  File "/home/andrewmiller/dev/root/pyopencl/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/array.py", line 407, in _axpbz
    a.dtype, x.dtype, b.dtype, out.dtype)
  File "<string>", line 2, in get_axpbz_kernel
  File "/home/andrewmiller/dev/root/pyopencl/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/tools.py", line 83, in first_arg_dependent_memoize
    result = func(cl_object, *args)
  File "/home/andrewmiller/dev/root/pyopencl/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/elementwise.py", line 417, in get_axpbz_kernel
    "tp_a": dtype_to_ctype(dtype_a),
  File "/home/andrewmiller/dev/root/pyopencl/lib/python2.6/site-packages/pyopencl-2011.2-py2.6-linux-x86_64.egg/pyopencl/compyte/dtypes.py", line 114, in dtype_to_ctype
    raise ValueError, "unable to map dtype '%s'" % dtype
ValueError: unable to map dtype 'object'

a_gpu and b_gpu are both pyopencl arrays, and they are both 1d, 2-element, float32

Is there a way to do this with pyopencl, and I'm just going about it wrong? 

Thanks for the help!

-Andrew Miller