Where is cudaMemset in Alea GPU? I want to zero a big array on GPU global memory but I cannot find such function on Alea GPU.
Asked
Active
Viewed 109 times
1
-
cudaMemset just uses a `for` statement to index the mem ptr. If you have allocated your memory via AllocateUnified for example, you can just use `UnifiedMemory.Ptr.Set` and a for statement with the `UnifiedMemory .Length` to index over your memory locations. – SushiHangover Sep 09 '17 at 06:25
1 Answers
0
The easiest way to "zero" an array inside a kernel is this:
Gpu.Default.Launch(() =>
{
DeviceRuntime.Zero(YourDeviceMemory, length)
}, new LaunchParam(1, 1));

redb
- 512
- 8
- 22