This seems like an obvious problem, but Google is not causing anything interesting. Is it legal to use memsetCUDA in the kernel, for example:
__device__ void myKernel()
{
int array[10];
memset(array, 0, sizeof(array));
}
(I know that int array[10] = {0};is probably better, but this is just an example of a more complex case.)
source
share