memset in cuda that allows to set values within kernel
问题 i am making several cudamemset calls in order to set my values to 0 as below: void allocateByte( char **gStoreR,const int byte){ char **cStoreR = (char **)malloc(N * sizeof(char*)); for( int i =0 ; i< N ; i++){ char *c; cudaMalloc((void**)&c, byte*sizeof(char)); cudaMemset(c,0,byte); cStoreR[i] = c; } cudaMemcpy(gStoreR, cStoreR, N * sizeof(char *), cudaMemcpyHostToDevice); } However, this is proving to be very slow. Is there a memset function on the GPU as calling it from CPU takes lot of