is it possible to memset a cudaArray?

I am using a cudaArray allocated with cudaMalloc3DArray and I would like to call a memset function. The problem is there does not seem to be a function in the API that works with cudaArrays. The closest call I can find is cudaMemset3D, but that takes a pitched pointer as an argument, not a cudaArray.

Is there a way to do this? I would like to accomplish this without calling a kernel to explicitly set the memory.

I’ve often wondered the same thing (just yesterday!) but I think it’s missing by design since CUDA arrays are so tied to interoperability with the graphics hardware and APIs.

I would be interested in hearing more of the history and thinking behind CUDA Arrays.

Why not file an enhancement request with NVIDIA? To do so, use the bug reporting form linked from the CUDA registered developer website and prefix the subject line with “RFE:” (request for enhancement) to clearly mark it as an enhancement request rather than a functional bug.

I guess it can’t hurt to ask. For now, I’ll just set the memory in a kernel.