I want to create a CUDA array associated with a texture and my idea is to initialize the array to zeros. The problem is that to work with arrays I have not found any memset kind of function. Am I supposed to
use memcpy to initialize to zeros or is there any equivalent memset to be used with textures?
Next is the code I am trying to use:
cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc(32, 0, 0, 0, cudaChannelFormatKindFloat);
cudaArray *cu_array;
cudaMallocArray(&cu_array, &channelDesc, width, height);
cudaMemset2D(cu_array, * FLSIZE, 0, width * sizeof(float), height);