cudaMemcpy2DFromArray -- docs unclear

I just tracked down a bug that resulted from my thinking that the “srcX” parameter in this function was an element index, where in fact it is a byte position within its row.

I think I assumed it would be an element index because when you use cudaMallocArray to create the array, you specify a number of elements, not a number of bytes. And the doc doesn’t explicitly say.

There are probably a few functions for which this should be clarified in the docs.


Nice, thanks!