This project is read-only.

Set allocated memory to 0

Nov 15, 2012 at 2:51 PM

Hi,

I have observed that memory which I allocate by the means of _gpu.Allocate<double>(buf)   where buf is a 2D double array has values filled in. How can I ensure that the memory space I allocate is empty  (filled in with zeros)?

 

Best,

 

Chris

Nov 15, 2012 at 10:50 PM

What versions of CUDA and CUDAfy are you using?

Nov 16, 2012 at 2:45 AM

I just switched to Cuda  and Cudafy 1.11

Nov 16, 2012 at 3:34 AM
Edited Nov 16, 2012 at 3:34 AM

CUDA kernels are deliberatley re-entrant, saving state between invocations of the same kernel. Are you perhaps not releasing memory on each cycle, and just seeing the previous' cycles results still in place in consequence?