[PyCuda] Odd results from PyCUDA port of options pricing example

2009-04-29 Thread Raefer Gabriel
Hi all, I am trying to port the binomial options example from the CUDA SDK to pyCuda as a learning exercise primarily, and I seem to be getting incorrect results and am having trouble tracking down the problem. I am new to CUDA and pyCuda. Source code is here (no external dependencies other

Re: [PyCuda] Odd results from PyCUDA port of options pricing example

2009-04-29 Thread Andreas Klöckner
I see one potential issue: b_gpu = cuda.mem_alloc(len(h_OptionData)) You probably mean len(h_OptionData)*numpy.dtype(numpy.float32).itemsize, which is a long way of saying len(h_OptionData)*4. Word of advice: Use gpuarrays. Less foot-shooting potential. Andreas On Mittwoch 29 April 2009,