On Mittwoch 27 Januar 2010, Ian Ozsvald wrote:
> Hi Andreas/Ying Wai, I see a discussion you've had about complex number
> support:
> http://www.mail-archive.com/[email protected]/msg00788.html
> 
> I also see the 'complex' tag:
> http://git.tiker.net/pycuda.git/commit/296810d8c57f7620cfcc959f73f6aefbb021
> 5133 and I've merged the code with mine.

(It's a branch, actually.) The right way to get it is like so:

If you already have a complex branch (see 'git branch')
$ git checkout complex # switches you to your complex branch
$ git pull http://git.tiker.net/pycuda.git/ complex # fetch+merge changes

If you don't already have a complex branch
$ git fetch http://git.tiker.net/pycuda.git/ complex:complex

I'd advise against messing with raw commit SHAs.

> When I try to run demo_complex.py I get an error (below) - should the demo
> work without an error? 

Works for me, prints some small number. I just updated the complex
branch to current master--pull and try again.

> Given the discussion you were both having I'm not
> clear whether the complex support is finished or not?

It's not quite finished, the current hangup is to figure out how complex
scalars are to be passed to kernels. My current preference is to rely on
numpy's buffer interface, like so:

>>> import numpy
>>> x = numpy.complex64(123+456j)
>>> str(buffer(x))
'\x00\x00\xf6B\x00\x00\xe4C'

Let me know how things go.

Andreas

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyCUDA mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to