How to do C++ Memset?

Aug 30, 2012 at 3:09 AM
Edited Aug 30, 2012 at 3:20 AM

A google suggests that Cudafy has support for this, but how is it accomplished?  I need to zeroize some arrays at the start of my kernel, but doing CopyToDevice from the host seems like it would be amazingly inefficient.

Also, how does one upload new data to an already existing device array?  Is the only option to use CopyToDevice?  Does CopyToDevice overwrite existing arrays if you use the same array references?

Aug 30, 2012 at 12:37 PM

Use the GPGPU.Set<T>(T[] gpudata) method.

Aug 30, 2012 at 1:29 PM

Thanks again Nick!