However - I get the same build error in nvcc on Windows. On my MacBook with gcc I don't get an error, just a very small number (1.83253e-06) as you say.
I'll test on the Mac for a bit, cheers (I've still got a way to go to understand kernels etc) Ian. 2010/1/27 Andreas Klöckner <[email protected]> > 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 > > _______________________________________________ > PyCUDA mailing list > [email protected] > http://tiker.net/mailman/listinfo/pycuda_tiker.net > > -- Ian Ozsvald (Professional Screencaster) [email protected] http://ProCasts.co.uk/examples.html http://TheScreencastingHandbook.com http://IanOzsvald.com + http://ShowMeDo.com http://twitter.com/ianozsvald
_______________________________________________ PyCUDA mailing list [email protected] http://tiker.net/mailman/listinfo/pycuda_tiker.net
